Hi David...

First of all, thanks a lot for your feedback, please see my comments below



On 2/28/07, David Blevins <[EMAIL PROTECTED]> wrote:


On Feb 13, 2007, at 8:50 AM, Mohammad Nour El-Din wrote:

> Hi David...
>
> I have attached a patch with my changes
> http://issues.apache.org/jira/browse/OPENEJB-438 . Meanwhile I will
> play
> with the subject of annotated test clients.

So I finally was able to scrape up some time to look into this and it
looks like things are working.  It's very simple and well
implemented, just what we needed!  Very excellent.

The only issue was that the AnnotatedFieldInjectionStatefulBean
wasn't implementing the new business methods you added to the
EncStatefulObject interface.  There was a log message that appears to
be broken that would have said so and likely saved you a bunch of
time.  Instead it just printed out:

ERROR - FAIL ... AnnotatedFieldInjectionStatelessBean:  [Missing
message 2.no.busines.method]
ERROR - FAIL ... AnnotatedFieldInjectionStatelessBean:  [Missing
message 2.no.busines.method]
ERROR - FAIL ... AnnotatedFieldInjectionStatelessBean:  [Missing
message 2.no.busines.method]
ERROR - FAIL ... AnnotatedFieldInjectionStatelessBean:  [Missing
message 2.no.busines.method]
ERROR - FAIL ... AnnotatedFieldInjectionStatelessBean:  [Missing
message 2.no.busines.method]
ERROR - FAIL ... AnnotatedFieldInjectionStatelessBean:  [Missing
message 2.no.busines.method]
ERROR - FAIL ... AnnotatedFieldInjectionStatelessBean:  [Missing
message 2.no.busines.method]
ERROR - FAIL ... AnnotatedFieldInjectionStatelessBean:  [Missing
message 2.no.busines.method]
ERROR - FAIL ... AnnotatedFieldInjectionStatelessBean:  [Missing
message 2.no.busines.method]
ERROR - FAIL ... AnnotatedFieldInjectionStatelessBean:  [Missing
message 2.no.busines.method]
ERROR - FAIL ... AnnotatedFieldInjectionStatelessBean:  [Missing
message 2.no.busines.method]
ERROR - FAIL ... AnnotatedFieldInjectionStatelessBean:  [Missing
message 2.no.busines.method]
WARN - Jar not loaded. /Users/dblevins/.m2/repository/org/apache/
openejb/openejb-itests-beans/3.0-incubating-SNAPSHOT/openejb-itests-
beans-3.0-incubating-SNAPSHOT.jar.  Jar failed validation.  Use the
validation tool for more details


The [Missing message 2.no.busines.method] part should list the method
name not implemented.  Seems that's broken in trunk and not related
to your changes -- we'll have to get that fixed asap.

Anyway, once I added the stuff to AnnotatedFieldInjectionStatefulBean
just as you had it in AnnotatedFieldInjectionStatelessBean the tests
ran fine sans a couple minor things.

First, it seems like a bug in xbean-reflect's File property editor
(haven't looked too hard yet).  We're supplying the string "C:/temp"
and it's giving back "/private/tmp/openejb3/container/openejb-core/C:/
temp".  So clearly it's calling new File(string).getAbsoulteFile()
and returning that.  Something to look into fixing as I don't think
it's xbean reflect's place to be resolving relative paths.


For the above two issues they do not appear at my machine, maybe I forgot to
include something into the patch. I would like to work on them, as I already
finished the subject of annotated test clients, I will submit its patch at
the end of this week, I made a very simple framework for developing
annotated test clients.

Second is a completely trival issues.  Seems the calling of equals on
two properties instances isn't kosher.  It complains "expected:<
{key2=value2, key1=value1}> but was:<{key1=value1
key2=value2}>", so obviously they are equal and something else going
wrong.


They are nor equal :), the problem here is that the Properties object
created from the value of the env-entry has only one entry as *key1* is the
key and *value1\nkey2=value2* is the value, it is something related to new
line within XML files I think, if you are running the tests in the debug
mode and made a break point in this test case you will find the *expected*
properties object has two entries, while the *actual* properties object has
only one entry. I tries everything, starting from encoding issues to
representing new line in XML using it special referenced entities, @see
http://www.w3.org/TR/2006/REC-xml11-20060816/#sec-line-ends , and even using
the CDATA sections, but nothing worked :(, I hope you have other ideas.

I think we can go ahead and check in the code and fix these two
issues later as the functionality overall is completely working --
just these two type converters may need some love.  One important
note though, we definitely do not want to integrate the testing of
this into the itests as that test suite is strictly javaee5 compliant
only.  Any tests that are specific to OpenEJB or OpenEJB value-add
should go somewhere else.  For this situation a simple unit test
should do the trick.  I'll see if I can't whip up something that you
can add your beans to.

On a completely unrelated note, I was shocked and amazed at some java
syntax you used.  I had no idea that the following was possible!

    public static class Foo {
        private final URL url = new URL("http://foo";);

        public Foo() throws java.net.MalformedURLException {
        }
    }

You learn something new everyday!  That's awesome.  Where did you
learn that?


which part you it is new, the whole code snippet ??? or a specific part of
it ???

All in all, very great new functionality.  People will love it.

-David




--
Thanks
- Mohammad Nour

Reply via email to