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.
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.
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?
All in all, very great new functionality. People will love it.
-David