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/04 21:50:31 UTC

svn commit: r1346120 - in /openejb/trunk/openejb: container/openejb-core/src/main/java/org/apache/openejb/config/ examples/ examples/local-on-localview-bean/ examples/local-on-localview-bean/src/ examples/local-on-localview-bean/src/main/ examples/loca...

Author: rmannibucau
Date: Mon Jun  4 19:50:30 2012
New Revision: 1346120

URL: http://svn.apache.org/viewvc?rev=1346120&view=rev
Log:
@Local on class with no interfaces

Added:
    openejb/trunk/openejb/examples/local-on-localview-bean/
    openejb/trunk/openejb/examples/local-on-localview-bean/pom.xml
    openejb/trunk/openejb/examples/local-on-localview-bean/src/
    openejb/trunk/openejb/examples/local-on-localview-bean/src/main/
    openejb/trunk/openejb/examples/local-on-localview-bean/src/main/java/
    openejb/trunk/openejb/examples/local-on-localview-bean/src/main/java/org/
    openejb/trunk/openejb/examples/local-on-localview-bean/src/main/java/org/superbiz/
    openejb/trunk/openejb/examples/local-on-localview-bean/src/main/java/org/superbiz/bean/
    openejb/trunk/openejb/examples/local-on-localview-bean/src/main/java/org/superbiz/bean/LocalBeanWithLocal.java
    openejb/trunk/openejb/examples/local-on-localview-bean/src/test/
    openejb/trunk/openejb/examples/local-on-localview-bean/src/test/java/
    openejb/trunk/openejb/examples/local-on-localview-bean/src/test/java/org/
    openejb/trunk/openejb/examples/local-on-localview-bean/src/test/java/org/superbiz/
    openejb/trunk/openejb/examples/local-on-localview-bean/src/test/java/org/superbiz/bean/
    openejb/trunk/openejb/examples/local-on-localview-bean/src/test/java/org/superbiz/bean/LocalBeanWithLocalTest.java
Modified:
    openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java
    openejb/trunk/openejb/examples/pom.xml

Modified: openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java?rev=1346120&r1=1346119&r2=1346120&view=diff
==============================================================================
--- openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java (original)
+++ openejb/trunk/openejb/container/openejb-core/src/main/java/org/apache/openejb/config/AnnotationDeployer.java Mon Jun  4 19:50:30 2012
@@ -2795,13 +2795,26 @@ public class AnnotationDeployer implemen
                         for (Class<?> intrfce : interfaces) {
                             interfaceNames.add(intrfce.getName()+".class");
                         }
-                        if (impliedLocal) validation.fail(ejbName, "ann.local.noAttributes", join(", ", interfaceNames));
-                        if (impliedRemote) validation.fail(ejbName, "ann.remote.noAttributes", join(", ", interfaceNames));
 
-                        /**
-                         * This bean is invalid, so do not bother looking at the other interfaces or the superclass
-                         */
-                        return;
+                        // just warn for @Local since Glassfish supports it even if it is weird
+                        // still fail for @Remote!
+                        if (impliedLocal && local.value().length == 0 && interfaces.size() == 0) {
+                            validation.warn(ejbName, "ann.local.noAttributes", join(", ", interfaceNames));
+                            // we don't go out to let be deployed
+                        } else if (impliedLocal) {
+                            validation.fail(ejbName, "ann.local.noAttributes", join(", ", interfaceNames));
+                            /**
+                             * This bean is invalid, so do not bother looking at the other interfaces or the superclass
+                             */
+                            return;
+                        }
+                        if (impliedRemote) {
+                            validation.fail(ejbName, "ann.remote.noAttributes", join(", ", interfaceNames));
+                            /**
+                             * This bean is invalid, so do not bother looking at the other interfaces or the superclass
+                             */
+                            return;
+                        }
                     } else if (strict && impliedLocal && impliedRemote) {
                         Class<?> interfce = interfaces.remove(0);
                         /**

Added: openejb/trunk/openejb/examples/local-on-localview-bean/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/examples/local-on-localview-bean/pom.xml?rev=1346120&view=auto
==============================================================================
--- openejb/trunk/openejb/examples/local-on-localview-bean/pom.xml (added)
+++ openejb/trunk/openejb/examples/local-on-localview-bean/pom.xml Mon Jun  4 19:50:30 2012
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+    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.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.superbiz</groupId>
+  <artifactId>local-on-localview-bean</artifactId>
+  <packaging>jar</packaging>
+  <version>1.1-SNAPSHOT</version>
+  <name>OpenEJB :: Examples :: @Local without Interface</name>
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+  </properties>
+  <build>
+    <defaultGoal>install</defaultGoal>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>2.4</version>
+        <configuration>
+          <source>1.6</source>
+          <target>1.6</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+  <repositories>
+    <repository>
+      <id>apache-m2-snapshot</id>
+      <name>Apache Snapshot Repository</name>
+      <url>http://repository.apache.org/snapshots</url>
+    </repository>
+  </repositories>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>javaee-api</artifactId>
+      <version>6.0-3</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.10</version>
+      <scope>test</scope>
+    </dependency>
+    <!-- The <scope>test</scope> guarantees that none of your runtime code
+      is dependent on any OpenEJB classes. -->
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>openejb-core</artifactId>
+      <version>4.1.0-SNAPSHOT</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.openejb</groupId>
+      <artifactId>arquillian-openejb-embedded-4</artifactId>
+      <version>4.1.0-SNAPSHOT</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <!-- This section allows you to configure where to publish libraries for
+    sharing. It is not required and may be deleted. For more information see:
+    http://maven.apache.org/plugins/maven-deploy-plugin/ -->
+  <distributionManagement>
+    <repository>
+      <id>localhost</id>
+      <url>file://${basedir}/target/repo/</url>
+    </repository>
+    <snapshotRepository>
+      <id>localhost</id>
+      <url>file://${basedir}/target/snapshot-repo/</url>
+    </snapshotRepository>
+  </distributionManagement>
+
+</project>

Added: openejb/trunk/openejb/examples/local-on-localview-bean/src/main/java/org/superbiz/bean/LocalBeanWithLocal.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/examples/local-on-localview-bean/src/main/java/org/superbiz/bean/LocalBeanWithLocal.java?rev=1346120&view=auto
==============================================================================
--- openejb/trunk/openejb/examples/local-on-localview-bean/src/main/java/org/superbiz/bean/LocalBeanWithLocal.java (added)
+++ openejb/trunk/openejb/examples/local-on-localview-bean/src/main/java/org/superbiz/bean/LocalBeanWithLocal.java Mon Jun  4 19:50:30 2012
@@ -0,0 +1,12 @@
+package org.superbiz.bean;
+
+import javax.ejb.Local;
+import javax.ejb.Stateless;
+
+@Local
+@Stateless(mappedName = "Foo")
+public class LocalBeanWithLocal {
+    public String msg() {
+        return "@Local shouldn't be put on a bean without interface. It works with glassfish so tolerating it.";
+    }
+}

Added: openejb/trunk/openejb/examples/local-on-localview-bean/src/test/java/org/superbiz/bean/LocalBeanWithLocalTest.java
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/examples/local-on-localview-bean/src/test/java/org/superbiz/bean/LocalBeanWithLocalTest.java?rev=1346120&view=auto
==============================================================================
--- openejb/trunk/openejb/examples/local-on-localview-bean/src/test/java/org/superbiz/bean/LocalBeanWithLocalTest.java (added)
+++ openejb/trunk/openejb/examples/local-on-localview-bean/src/test/java/org/superbiz/bean/LocalBeanWithLocalTest.java Mon Jun  4 19:50:30 2012
@@ -0,0 +1,32 @@
+package org.superbiz.bean;
+
+import javax.ejb.EJB;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertThat;
+import static org.junit.matchers.JUnitMatchers.containsString;
+
+@RunWith(Arquillian.class)
+public class LocalBeanWithLocalTest {
+    @EJB
+    private LocalBeanWithLocal bean;
+
+    @Deployment
+    public static JavaArchive jar() {
+        return ShrinkWrap.create(JavaArchive.class)
+                .addClass(LocalBeanWithLocal.class);
+    }
+
+    @Test
+    public void checkItIsDeployed() {
+        assertNotNull(bean);
+        System.out.println(bean.msg()); // print it to show it is bad
+        assertThat(bean.msg(), containsString("@Local"));
+    }
+}

Modified: openejb/trunk/openejb/examples/pom.xml
URL: http://svn.apache.org/viewvc/openejb/trunk/openejb/examples/pom.xml?rev=1346120&r1=1346119&r2=1346120&view=diff
==============================================================================
--- openejb/trunk/openejb/examples/pom.xml (original)
+++ openejb/trunk/openejb/examples/pom.xml Mon Jun  4 19:50:30 2012
@@ -66,6 +66,7 @@
     <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>



Re: @Local with no interfaces

Posted by Romain Manni-Bucau <rm...@gmail.com>.
are you sure it is not done ;)?

well good catch, thanks

- Romain


2012/6/5 David Blevins <da...@gmail.com>

>
> On Jun 5, 2012, at 12:25 AM, Romain Manni-Bucau wrote:
>
> >
> http://svn.apache.org/repos/asf/openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/LocalBeanAnnotatedLocalTest.java
> >
> > and we have a strict mode: -Dopenejb.strict.interface.declaration=true
>
> Can you move that to the place where all the other rules live?
>
>
> http://svn.apache.org/repos/asf/openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/rules/
>
>
> -David
>
> > 2012/6/5 Jean-Louis MONTEIRO <je...@gmail.com>
> >
> >> My answer is Yes as soon as it's possible and as soon as it isn't
> against
> >> the spec.
> >> As it is not tested by TCK right now, we could allow it and just output
> a
> >> log.
> >>
> >> If we could have a strict mode as suggested by Neale or as I proposed
> some
> >> years ago, that'd be definitely a good point. For the moment, we don't
> have
> >> such a mechanism, so IMHO that'd be better to clarify the message and to
> >> let the suer know that his app is wrong.
> >>
> >> JLouis
> >>
> >>
> >>
> >>
> >> 2012/6/5 Romain Manni-Bucau <rm...@gmail.com>
> >>
> >>> ok i'll move the sample,
> >>>
> >>> about the default behavior: it should pass or not? The question is
> >> "should
> >>> an app develop on GF work out of the box". You know my opinion ;)
> >>>
> >>> - Romain
> >>>
> >>>
> >>> 2012/6/5 Jean-Louis MONTEIRO <je...@gmail.com>
> >>>
> >>>> My personal feeling is that we don't want to teach bad things so
> >>> definitely
> >>>> -1 for an example.
> >>>> Then, it is not tested (yet) by tck so we can detect that an output a
> >>> WARN
> >>>> with a clearer message.
> >>>>
> >>>> But, IMO just changing the message to make it more understandable with
> >> an
> >>>> advice to fix the code is my preferred solution.
> >>>>
> >>>> Jean-Louis
> >>>>
> >>>> 2012/6/5 David Blevins <da...@gmail.com>
> >>>>
> >>>>>
> >>>>> On Jun 4, 2012, at 9:34 PM, David Blevins wrote:
> >>>>>
> >>>>>>
> >>>>>> On Jun 4, 2012, at 12:50 PM, rmannibucau@apache.org wrote:
> >>>>>>
> >>>>>>> Author: rmannibucau
> >>>>>>> Date: Mon Jun  4 19:50:30 2012
> >>>>>>> New Revision: 1346120
> >>>>>>>
> >>>>>>> URL: http://svn.apache.org/viewvc?rev=1346120&view=rev
> >>>>>>> Log:
> >>>>>>> @Local on class with no interfaces
> >>>>>>
> >>>>>> We definitely do not want an example that teaches this
> >> non-compliant
> >>>>> behavior.
> >>>>>>
> >>>>>> This would be the right place to test it:
> >>>>>>
> >>>>>>
> >>>>>
> >>>>
> >>>
> >>
> http://svn.apache.org/repos/asf/openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/rules/
> >>>>>
> >>>>> I wonder what thoughts there are on leaving this an error condition.
> >>>>>
> >>>>> In this particular situation, the user ended up with a better app and
> >>> is
> >>>>> happy with us for watching their back.
> >>>>>
> >>>>> Seems like we won for doing the right thing.
> >>>>>
> >>>>> Side note, I have brought this up to the EJB 3.2 EG.
> >>>>>
> >>>>>
> >>>>> -David
> >>>>>
> >>>>>
> >>>>
> >>>
> >>
>
>

Re: @Local with no interfaces

Posted by David Blevins <da...@gmail.com>.
On Jun 5, 2012, at 12:25 AM, Romain Manni-Bucau wrote:

> http://svn.apache.org/repos/asf/openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/LocalBeanAnnotatedLocalTest.java
> 
> and we have a strict mode: -Dopenejb.strict.interface.declaration=true

Can you move that to the place where all the other rules live?

http://svn.apache.org/repos/asf/openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/rules/


-David

> 2012/6/5 Jean-Louis MONTEIRO <je...@gmail.com>
> 
>> My answer is Yes as soon as it's possible and as soon as it isn't against
>> the spec.
>> As it is not tested by TCK right now, we could allow it and just output a
>> log.
>> 
>> If we could have a strict mode as suggested by Neale or as I proposed some
>> years ago, that'd be definitely a good point. For the moment, we don't have
>> such a mechanism, so IMHO that'd be better to clarify the message and to
>> let the suer know that his app is wrong.
>> 
>> JLouis
>> 
>> 
>> 
>> 
>> 2012/6/5 Romain Manni-Bucau <rm...@gmail.com>
>> 
>>> ok i'll move the sample,
>>> 
>>> about the default behavior: it should pass or not? The question is
>> "should
>>> an app develop on GF work out of the box". You know my opinion ;)
>>> 
>>> - Romain
>>> 
>>> 
>>> 2012/6/5 Jean-Louis MONTEIRO <je...@gmail.com>
>>> 
>>>> My personal feeling is that we don't want to teach bad things so
>>> definitely
>>>> -1 for an example.
>>>> Then, it is not tested (yet) by tck so we can detect that an output a
>>> WARN
>>>> with a clearer message.
>>>> 
>>>> But, IMO just changing the message to make it more understandable with
>> an
>>>> advice to fix the code is my preferred solution.
>>>> 
>>>> Jean-Louis
>>>> 
>>>> 2012/6/5 David Blevins <da...@gmail.com>
>>>> 
>>>>> 
>>>>> On Jun 4, 2012, at 9:34 PM, David Blevins wrote:
>>>>> 
>>>>>> 
>>>>>> On Jun 4, 2012, at 12:50 PM, rmannibucau@apache.org wrote:
>>>>>> 
>>>>>>> Author: rmannibucau
>>>>>>> Date: Mon Jun  4 19:50:30 2012
>>>>>>> New Revision: 1346120
>>>>>>> 
>>>>>>> URL: http://svn.apache.org/viewvc?rev=1346120&view=rev
>>>>>>> Log:
>>>>>>> @Local on class with no interfaces
>>>>>> 
>>>>>> We definitely do not want an example that teaches this
>> non-compliant
>>>>> behavior.
>>>>>> 
>>>>>> This would be the right place to test it:
>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>>> 
>> http://svn.apache.org/repos/asf/openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/rules/
>>>>> 
>>>>> I wonder what thoughts there are on leaving this an error condition.
>>>>> 
>>>>> In this particular situation, the user ended up with a better app and
>>> is
>>>>> happy with us for watching their back.
>>>>> 
>>>>> Seems like we won for doing the right thing.
>>>>> 
>>>>> Side note, I have brought this up to the EJB 3.2 EG.
>>>>> 
>>>>> 
>>>>> -David
>>>>> 
>>>>> 
>>>> 
>>> 
>> 


Re: @Local with no interfaces

Posted by Romain Manni-Bucau <rm...@gmail.com>.
http://svn.apache.org/repos/asf/openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/core/stateless/LocalBeanAnnotatedLocalTest.java

and we have a strict mode: -Dopenejb.strict.interface.declaration=true

- Romain


2012/6/5 Jean-Louis MONTEIRO <je...@gmail.com>

> My answer is Yes as soon as it's possible and as soon as it isn't against
> the spec.
> As it is not tested by TCK right now, we could allow it and just output a
> log.
>
> If we could have a strict mode as suggested by Neale or as I proposed some
> years ago, that'd be definitely a good point. For the moment, we don't have
> such a mechanism, so IMHO that'd be better to clarify the message and to
> let the suer know that his app is wrong.
>
> JLouis
>
>
>
>
> 2012/6/5 Romain Manni-Bucau <rm...@gmail.com>
>
> > ok i'll move the sample,
> >
> > about the default behavior: it should pass or not? The question is
> "should
> > an app develop on GF work out of the box". You know my opinion ;)
> >
> > - Romain
> >
> >
> > 2012/6/5 Jean-Louis MONTEIRO <je...@gmail.com>
> >
> > > My personal feeling is that we don't want to teach bad things so
> > definitely
> > > -1 for an example.
> > > Then, it is not tested (yet) by tck so we can detect that an output a
> > WARN
> > > with a clearer message.
> > >
> > > But, IMO just changing the message to make it more understandable with
> an
> > > advice to fix the code is my preferred solution.
> > >
> > > Jean-Louis
> > >
> > > 2012/6/5 David Blevins <da...@gmail.com>
> > >
> > > >
> > > > On Jun 4, 2012, at 9:34 PM, David Blevins wrote:
> > > >
> > > > >
> > > > > On Jun 4, 2012, at 12:50 PM, rmannibucau@apache.org wrote:
> > > > >
> > > > >> Author: rmannibucau
> > > > >> Date: Mon Jun  4 19:50:30 2012
> > > > >> New Revision: 1346120
> > > > >>
> > > > >> URL: http://svn.apache.org/viewvc?rev=1346120&view=rev
> > > > >> Log:
> > > > >> @Local on class with no interfaces
> > > > >
> > > > > We definitely do not want an example that teaches this
> non-compliant
> > > > behavior.
> > > > >
> > > > > This would be the right place to test it:
> > > > >
> > > > >
> > > >
> > >
> >
> http://svn.apache.org/repos/asf/openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/rules/
> > > >
> > > > I wonder what thoughts there are on leaving this an error condition.
> > > >
> > > > In this particular situation, the user ended up with a better app and
> > is
> > > > happy with us for watching their back.
> > > >
> > > > Seems like we won for doing the right thing.
> > > >
> > > > Side note, I have brought this up to the EJB 3.2 EG.
> > > >
> > > >
> > > > -David
> > > >
> > > >
> > >
> >
>

Re: @Local with no interfaces

Posted by Jean-Louis MONTEIRO <je...@gmail.com>.
My answer is Yes as soon as it's possible and as soon as it isn't against
the spec.
As it is not tested by TCK right now, we could allow it and just output a
log.

If we could have a strict mode as suggested by Neale or as I proposed some
years ago, that'd be definitely a good point. For the moment, we don't have
such a mechanism, so IMHO that'd be better to clarify the message and to
let the suer know that his app is wrong.

JLouis




2012/6/5 Romain Manni-Bucau <rm...@gmail.com>

> ok i'll move the sample,
>
> about the default behavior: it should pass or not? The question is "should
> an app develop on GF work out of the box". You know my opinion ;)
>
> - Romain
>
>
> 2012/6/5 Jean-Louis MONTEIRO <je...@gmail.com>
>
> > My personal feeling is that we don't want to teach bad things so
> definitely
> > -1 for an example.
> > Then, it is not tested (yet) by tck so we can detect that an output a
> WARN
> > with a clearer message.
> >
> > But, IMO just changing the message to make it more understandable with an
> > advice to fix the code is my preferred solution.
> >
> > Jean-Louis
> >
> > 2012/6/5 David Blevins <da...@gmail.com>
> >
> > >
> > > On Jun 4, 2012, at 9:34 PM, David Blevins wrote:
> > >
> > > >
> > > > On Jun 4, 2012, at 12:50 PM, rmannibucau@apache.org wrote:
> > > >
> > > >> Author: rmannibucau
> > > >> Date: Mon Jun  4 19:50:30 2012
> > > >> New Revision: 1346120
> > > >>
> > > >> URL: http://svn.apache.org/viewvc?rev=1346120&view=rev
> > > >> Log:
> > > >> @Local on class with no interfaces
> > > >
> > > > We definitely do not want an example that teaches this non-compliant
> > > behavior.
> > > >
> > > > This would be the right place to test it:
> > > >
> > > >
> > >
> >
> http://svn.apache.org/repos/asf/openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/rules/
> > >
> > > I wonder what thoughts there are on leaving this an error condition.
> > >
> > > In this particular situation, the user ended up with a better app and
> is
> > > happy with us for watching their back.
> > >
> > > Seems like we won for doing the right thing.
> > >
> > > Side note, I have brought this up to the EJB 3.2 EG.
> > >
> > >
> > > -David
> > >
> > >
> >
>

Re: @Local with no interfaces

Posted by Romain Manni-Bucau <rm...@gmail.com>.
ok i'll move the sample,

about the default behavior: it should pass or not? The question is "should
an app develop on GF work out of the box". You know my opinion ;)

- Romain


2012/6/5 Jean-Louis MONTEIRO <je...@gmail.com>

> My personal feeling is that we don't want to teach bad things so definitely
> -1 for an example.
> Then, it is not tested (yet) by tck so we can detect that an output a WARN
> with a clearer message.
>
> But, IMO just changing the message to make it more understandable with an
> advice to fix the code is my preferred solution.
>
> Jean-Louis
>
> 2012/6/5 David Blevins <da...@gmail.com>
>
> >
> > On Jun 4, 2012, at 9:34 PM, David Blevins wrote:
> >
> > >
> > > On Jun 4, 2012, at 12:50 PM, rmannibucau@apache.org wrote:
> > >
> > >> Author: rmannibucau
> > >> Date: Mon Jun  4 19:50:30 2012
> > >> New Revision: 1346120
> > >>
> > >> URL: http://svn.apache.org/viewvc?rev=1346120&view=rev
> > >> Log:
> > >> @Local on class with no interfaces
> > >
> > > We definitely do not want an example that teaches this non-compliant
> > behavior.
> > >
> > > This would be the right place to test it:
> > >
> > >
> >
> http://svn.apache.org/repos/asf/openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/rules/
> >
> > I wonder what thoughts there are on leaving this an error condition.
> >
> > In this particular situation, the user ended up with a better app and is
> > happy with us for watching their back.
> >
> > Seems like we won for doing the right thing.
> >
> > Side note, I have brought this up to the EJB 3.2 EG.
> >
> >
> > -David
> >
> >
>

Re: @Local with no interfaces

Posted by Jean-Louis MONTEIRO <je...@gmail.com>.
My personal feeling is that we don't want to teach bad things so definitely
-1 for an example.
Then, it is not tested (yet) by tck so we can detect that an output a WARN
with a clearer message.

But, IMO just changing the message to make it more understandable with an
advice to fix the code is my preferred solution.

Jean-Louis

2012/6/5 David Blevins <da...@gmail.com>

>
> On Jun 4, 2012, at 9:34 PM, David Blevins wrote:
>
> >
> > On Jun 4, 2012, at 12:50 PM, rmannibucau@apache.org wrote:
> >
> >> Author: rmannibucau
> >> Date: Mon Jun  4 19:50:30 2012
> >> New Revision: 1346120
> >>
> >> URL: http://svn.apache.org/viewvc?rev=1346120&view=rev
> >> Log:
> >> @Local on class with no interfaces
> >
> > We definitely do not want an example that teaches this non-compliant
> behavior.
> >
> > This would be the right place to test it:
> >
> >
> http://svn.apache.org/repos/asf/openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/rules/
>
> I wonder what thoughts there are on leaving this an error condition.
>
> In this particular situation, the user ended up with a better app and is
> happy with us for watching their back.
>
> Seems like we won for doing the right thing.
>
> Side note, I have brought this up to the EJB 3.2 EG.
>
>
> -David
>
>

Re: @Local with no interfaces

Posted by Romain Manni-Bucau <rm...@gmail.com>.
If it doesnt pass by default i dont see any interest to keep it...
Le 5 juin 2012 07:01, "David Blevins" <da...@gmail.com> a écrit :

>
> On Jun 4, 2012, at 9:34 PM, David Blevins wrote:
>
> >
> > On Jun 4, 2012, at 12:50 PM, rmannibucau@apache.org wrote:
> >
> >> Author: rmannibucau
> >> Date: Mon Jun  4 19:50:30 2012
> >> New Revision: 1346120
> >>
> >> URL: http://svn.apache.org/viewvc?rev=1346120&view=rev
> >> Log:
> >> @Local on class with no interfaces
> >
> > We definitely do not want an example that teaches this non-compliant
> behavior.
> >
> > This would be the right place to test it:
> >
> >
> http://svn.apache.org/repos/asf/openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/rules/
>
> I wonder what thoughts there are on leaving this an error condition.
>
> In this particular situation, the user ended up with a better app and is
> happy with us for watching their back.
>
> Seems like we won for doing the right thing.
>
> Side note, I have brought this up to the EJB 3.2 EG.
>
>
> -David
>
>

Re: @Local with no interfaces

Posted by David Blevins <da...@gmail.com>.
On Jun 4, 2012, at 9:34 PM, David Blevins wrote:

> 
> On Jun 4, 2012, at 12:50 PM, rmannibucau@apache.org wrote:
> 
>> Author: rmannibucau
>> Date: Mon Jun  4 19:50:30 2012
>> New Revision: 1346120
>> 
>> URL: http://svn.apache.org/viewvc?rev=1346120&view=rev
>> Log:
>> @Local on class with no interfaces
> 
> We definitely do not want an example that teaches this non-compliant behavior.
> 
> This would be the right place to test it:
> 
> http://svn.apache.org/repos/asf/openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/rules/

I wonder what thoughts there are on leaving this an error condition.

In this particular situation, the user ended up with a better app and is happy with us for watching their back.

Seems like we won for doing the right thing.

Side note, I have brought this up to the EJB 3.2 EG.


-David


@Local with no interfaces

Posted by David Blevins <da...@gmail.com>.
On Jun 4, 2012, at 12:50 PM, rmannibucau@apache.org wrote:

> Author: rmannibucau
> Date: Mon Jun  4 19:50:30 2012
> New Revision: 1346120
> 
> URL: http://svn.apache.org/viewvc?rev=1346120&view=rev
> Log:
> @Local on class with no interfaces

We definitely do not want an example that teaches this non-compliant behavior.

This would be the right place to test it:

 http://svn.apache.org/repos/asf/openejb/trunk/openejb/container/openejb-core/src/test/java/org/apache/openejb/config/rules/


-David