jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robertson, Jason" <Jason.Robert...@acs-inc.com>
Subject RE: Testing EJB implementing EJBLocalObject interface with Cactus
Date Wed, 27 Mar 2002 16:46:00 GMT
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:nick@eblox.com]
Sent: Wednesday, March 27, 2002 11:08 AM
To: Cactus Users List; franck@beanlab.com
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" <Jason.Robertson@acs-inc.com> 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:frasolo@yahoo.com]
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 <nick@eblox.com> 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:imeshev@yahoo.com]
> 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" <Jason.Robertson@acs-inc.com> 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:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:cactus-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:
<mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:cactus-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message