Jason,

There are couple issues.
I'm using sun refrenence implementation that behavious very strangly.
There are new elements in web/ejb/deployement description such as
<ejb-local-ref>.
If I reference my local ejb using the above entry I cannot deploy the ear
inluding my apps to
the web server.  I'm getting

java.lang.ClassCastException;
I guss the app server tries to load it as remote bean

When I try to fake tha app server and use standard ejb-ref with with my
local home and local interface I get
jndi name not found.

I know it's wrong because when I specify the remote home and interface
instead
without modifing anthing in discription files,
it works.

Maybe it will work on other app servers.

I think to make repeatable,portable tests on various appservers there has to
be a
special version of "ejb test case" class that calles
the method of specified local ejb inside a container.  It should be deployed
as a statless session bean.

Rgds,
Jacek

----- Original Message -----
From: "Robertson, Jason" <[EMAIL PROTECTED]>
To: "'Cactus Users List'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Wednesday, March 27, 2002 4:46 PM
Subject: RE: Testing EJB implementing EJBLocalObject interface with Cactus


> I found this page:
>
> http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/EJBConcepts6.html
>
> And from the section "Deciding on Remote or Local Access" it says:
>
> Type of client: ... If an enterprise bean's clients are Web components or
> other enterprise beans, then the type of access depends on how you want to
> distribute your components.
>
> To me, "Web components" equals a servlet or a JSP and this paragraph
implies
> local access from a web component is fine if it meets your distribution
> needs, which for cactus testing isn't an issue.
>
> Jacek, when you try to access the local interface in the reference
> implementation, what error are you getting?
>
> Jason
>
> -----Original Message-----
> From: Nicholas Lesiecki [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, March 27, 2002 11:08 AM
> To: Cactus Users List; [EMAIL PROTECTED]
> Subject: RE: Testing EJB implementing EJBLocalObject interface with
> Cactus
>
>
> Thanks Franck!
>
> I found that paragraph, but to quote from earlier in the thread:
>
> <<<
> To be exact, it's possible to access locals while war and ejb-jar
> are both in the same *ear*.
>
> Regards,
>
> Slava Imeshev
>
> --- "Robertson, Jason" <[EMAIL PROTECTED]> wrote:
> > You can access the local interfaces from within a servlet as long as (I
> > think) the servlet container and the EJB container are running in the
same
> > JVM. If it has to jump JVM boundaries then a remote interface is needed.
> >>>
>
> These don't imply that clients are limited to EJBS only. However, the spec
> says:
>
> <<<
> A local client of a session bean or an entity bean may be another
enterprise
> bean (a session bean, entity bean, or message-driven bean).
> >>>
>
> What I'm wondering is: can you have spec compliant local clients who
reside
> in the same JVM but are not enterprise beans? (I have heard conflicting
> reports.)
>
> Cheers,
>
> Nicholas Lesiecki
> Principal Software Engineer
> eBlox, Inc.
> (520) 615-9345 x104
> Check out my new book!:
> Java Tools for Extreme Programming: Mastering Open Source Tools, including
> Ant, JUnit, and Cactus
>
> http://www.amazon.com/exec/obidos/ASIN/047120708X/
>
> Check out my article on AspectJ:
> http://www-106.ibm.com/developerworks/java/?loc=dwmain
>
>
>
>
> -----Original Message-----
> From: Franck Rasolo [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 26, 2002 6:18 PM
> To: Cactus Users List
> Subject: RE: Testing EJB implementing EJBLocalObject interface with
> Cactus
>
>
> Nicholas,
>
> I believe Jason got it right according to the first two paragraphs of
> section 5.3 (page 52) of the EJB 2.0 specification:
>
> <snip>
> 5.3 Local Clients
>
> Session and entity beans may have local clients. A local client is a
client
> that is collocated in the same JVM with the session or entity bean that
> provides the local client view and which may be tightly coupled to the
bean.
> A local client of a session bean or an entity bean may be another
enterprise
> bean (a session bean, entity bean, or message-driven bean).
>
> Unlike the remote client view, the local client view of a bean is not
> location
> independent. Access to an enterprise bean through the local client view
> requires the collocation in the same JVM of both the local client and the
> enterprise bean that provides the local client view. The local client view
> therefore does not provide the location transparency provided by the
remote
> client view.
> </snip>
>
> Cheers,
>
> Franck Rasolo
> Independent Consultant
> London, UK
>
> --- Nicholas Lesiecki <[EMAIL PROTECTED]> wrote:
> > Does anyone have the spec chapter and verse on these issues? I'd like to
> > read up. I checked the EJB spec but couldn't find anything in a couple
of
> > quick scans. Does anyone have page numbers in front of them?
> >
> >
> > Cheers,
> >
> > Nicholas Lesiecki
> > Principal Software Engineer
> > eBlox, Inc.
> > (520) 615-9345 x104
> > Check out my new book!:
> > Java Tools for Extreme Programming: Mastering Open Source Tools,
including
> > Ant, JUnit, and Cactus
> >
> > http://www.amazon.com/exec/obidos/ASIN/047120708X/
> >
> > Check out my article on AspectJ:
> > http://www-106.ibm.com/developerworks/java/?loc=dwmain
> >
> > -----Original Message-----
> > From: Slava Imeshev [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, March 26, 2002 2:08 PM
> > To: Cactus Users List
> > Subject: RE: Testing EJB implementing EJBLocalObject interface with
> > Cactus
> >
> >
> > To be exact, it's possible to access locals while war and ejb-jar
> > are both in the same *ear*.
> >
> > Regards,
> >
> > Slava Imeshev
> >
> > --- "Robertson, Jason" <[EMAIL PROTECTED]> wrote:
> > > You can access the local interfaces from within a servlet as long as
(I
> > > think) the servlet container and the EJB container are running in the
> same
> > > JVM. If it has to jump JVM boundaries then a remote interface is
needed.
> > >
> > > I'm testing my Entity beans with local interfaces just fine by
extending
> > > ServletTestCase and accessing them in the traditional fashion.
> > >
> > > Jason
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Movies - coverage of the 74th Academy Awards.
> http://movies.yahoo.com/
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to