BTW, this was not dependency injection. I went back to the old way of
doing a lookup.

Cheers
Prasad

On 3/15/07, Prasad Kashyap <[EMAIL PROTECTED]> wrote:
Hey.. it works ! It works ! It works !

I cleaned out the openejb-core code and did a full build again. This
time it worked.

All along, I was just doing a 'mvn test' in the core pkg.

Cheers
Prasad

On 3/15/07, Mohammad Nour El-Din <[EMAIL PROTECTED]> wrote:
> Hi David and Prasad...
>
> Thanks David for your feedback, and I will take your comments into
> consideration. Prasad give me some time and I will look at your code
> changes. Did you attach your current code to the JIRA ?? If not please
> attach all your changes to it so I can apply it locally and look more at
> when I come back to home.
>
> On 3/15/07, Prasad Kashyap <[EMAIL PROTECTED]> wrote:
> >
> > On 3/14/07, David Blevins <[EMAIL PROTECTED]> wrote:
> > >
> > > On Mar 14, 2007, at 7:13 PM, Prasad Kashyap wrote:
> > >
> > > > OK.. I tried both BasicStatelessInterceptorBusinessLocal   and
> > > > BasicStatelessInterceptorBusinessRemote. Same NameNotFoundException.
> > > >
> > > > http://rifers.org/paste/show/3942
> > > >
> > > > The bean and it's business interfaces are purely annotated and has no
> > > > entries in either the plan or the DD. But since the ejb.jar has them
> > > > both, I guess as per the rules here
> > > > http://incubator.apache.org/openejb/jndi-names.html, the jndi name is
> > > > deploymentId + "BusinessRemote" (or deploymentId + "BusinessLocal").
> > > >
> > > > Anyways that didn't work.
> > >
> > > That should definitely work.  Can you try just looking up the name
> > > rather than using the experimental annotation stuff.  Just extend
> > > StatefulTestClient, use the already created initialContext from the
> > > super class and lookup("BasicStatelessInterceptorBusinessRemote").
> >
> > Same NameNotFoundException. Tried to lookup
> > "BasicStatelessInterceptor",  "BasicStatelessInterceptorRemote", and
> > "BasicStatelessInterceptorBusinessRemote".
> >
> > http://rifers.org/paste/show/3943
> >
> > >
> > > Assuming you have a business remote interface, not sure how you're
> > > declaring that.  Could be you don't have any interfaces.
> >
> > Have use @Remote to declare a remote interface. Bean simply implements
> > this.
> > http://rifers.org/paste/show/3944
> >
> > >
> > > > What I am unsure is why Mohammad had to implement a
> > > > processFieldInjection() in TestClient. Chap 8 of the simplified spec
> > > > says client can expect to find resources by using annotations.
> > >
> > > That doesn't apply to test cases or any non-javaee components.  Were
> > > our test suite an official app client (which we do have such a mode)
> > > it would still only apply to the app client main-class itself and
> > > then limited only to static methods and fields.
> > >
> > > Annotated injection for "plain java" code that want's to lookup an
> > > ejb is way outside the spec.
> >
> > Thanx for the explanation David.
> >
> > >
> > >
> > > -David
> >
> > Cheers
> > Prasad
> > >
> > >
> > > > Cheers
> > > > Prasad
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On 3/14/07, David Blevins <[EMAIL PROTECTED]> wrote:
> > > >>
> > > >> On Mar 14, 2007, at 8:33 AM, Prasad Kashyap wrote:
> > > >>
> > > >> > Thanks Mohammad.
> > > >> >
> > > >> > I did apply your patch and had my test extend from
> > > >> > *AnnotatedFieldInjectionStatelessLocalTestClient*.  See
> > > >> > http://rifers.org/paste/show/3923
> > > >> >
> > > >> > I get a NameNotFoundException: Name
> > > >> > "BasicStatelessInterceptorLocal" not found.
> > > >>
> > > >> The name would be BasicStatelessInterceptorBusinessLocal if you're
> > > >> using a business local interface.
> > > >>
> > > >> On a different note, definitely use a remote or business remote
> > > >> interface where possible.  Tests that use only local interfaces
> > > >> pretty much only run in OpenEJB embedded.
> > > >>
> > > >> -David
> > > >>
> > > >>
> > > >> >
> > > >> > But that bean seems to have been created and deployed.
> > > >> > INFO - Created Ejb(deployment-id=BasicStatelessInterceptor,
> > > >> > ejb-name=BasicStatelessInterceptor, container=Default Stateless
> > > >> > Container)
> > > >> > 10:56:07,592 INFO  [startup] Created
> > > >> > Ejb(deployment-id=BasicStatelessInterceptor,
> > > >> > ejb-name=BasicStatelessInterceptor, container=Default Stateless
> > > >> > Container)
> > > >> >
> > > >> >
> > > >> > Cheers
> > > >> > Prasad
> > > >> >
> > > >> >
> > > >> >
> > > >> > On 3/13/07, Mohammad Nour El-Din <[EMAIL PROTECTED]> wrote:
> > > >> >> Hi Prasad...
> > > >> >>
> > > >> >> I came home late so I took a speed look on your code. First, if
> > > >> >> this is a
> > > >> >> local test client you should extend from
> > > >> >> BasicStatelessLocalTestClient.
> > > >> >> Second, in your case you are using a field annotated local test
> > > >> >> client so
> > > >> >> you have to extend from
> > > >> >> *AnnotatedFieldInjectionStatelessLocalTestClient*
> > > >> >> class. To have a better idea look at
> > > >> >> http://issues.apache.org/jira/browse/OPENEJB-519, and take a look
> > > >> >> at this
> > > >> >> mail on how to use and create annotated test clients
> > > >> >> http://mail-archives.apache.org/mod_mbox/incubator-openejb-dev/
> > > >> >> 200703.mbox/%
> > > >> >> [EMAIL PROTECTED]
> > > >> >> .
> > > >> >> But this code is not applied on the src code repository yet, it
> > > >> >> was supposed
> > > >> >> to be reviewed and then applied if it is OK. But I think I can
> > > >> >> apply it
> > > >> >> myself, as - as I think - I've been given the Karma to do so. But
> > > >> >> I will
> > > >> >> this tomorrow as I so tired and its too late here. You can take
> > > >> >> the patch
> > > >> >> and apply it locally, following the guidelines in the mail link
> > > >> >> provided
> > > >> >> above. If you still face problems please let me know, this is the
> > > >> >> second annotated test written and I need to know to how far
> > > >> >> annotated tests
> > > >> >> code is well implemented.
> > > >> >>
> > > >> >>
> > > >> >>
> > > >> >> On 3/13/07, Prasad Kashyap <[EMAIL PROTECTED]> wrote:
> > > >> >>
> > > >> >> > Mine seems to be the only testcase which has a dependency
> > > >> >> injection on
> > > >> >> > the client side of itests.   http://rifers.org/paste/show/3902
> > > >> >> >
> > > >> >> > However, when executing this test (container/openejb-core), it
> > > >> >> fails
> > > >> >> > while doing an assertNotNull of the injected bean (line 38 in
> > > >> >> the code
> > > >> >> > above).
> > > >> >> >
> > > >> >> > Bug ? User-error ?
> > > >> >> >
> > > >> >> > Please advise.
> > > >> >> >
> > > >> >> > Cheers
> > > >> >> > Prasad
> > > >> >> >
> > > >> >>
> > > >> >>
> > > >> >>
> > > >> >> --
> > > >> >> Thanks
> > > >> >> - Mohammad Nour
> > > >> >>
> > > >> >
> > > >>
> > > >>
> > > >
> > >
> > >
> >
>
>
>
> --
> Thanks
> - Mohammad Nour
>

Reply via email to