jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacek Skrzypiec" <ja...@learning-media.net>
Subject Re: Testing EJB implementing EJBLocalObject interface with Cactus
Date Fri, 29 Mar 2002 07:37:18 GMT
Vincent,

I would love to join you on the Cactus project because I find it very
exciting, brilliant piece if software and useful
however I don't think I cannot do it because of time limit.  Maybe when my
company grows
a little bit.

Nevertheless, I will look closely at it.

I will use Cactus on my project and I will feed back what I find.

Relating to my problem, maybe local ejb can work if the reference
implementation (RI) is configured
differently.  I didn't have time to work on various configurations and I
could not find any useful information on net.

I believe that RI runs web container and ejb container in different JVMs and
consequently as EJB specs says it will not
work.

To get cactus working on RI had to put cactus.jar, junit.jar and other jars
in J2EE_HOME\lib\system directory and specify them on
them  J2EE_CLASSPATH.  If I didn't to it I was getting
ClassDefNotFoundException with trace pointing to ServletTestCase class.

My war was including all necessary liberies  as required by web application
specification and when deploy to standalone Tomcat it worked fine.


Best regards,
Jacek


----- Original Message -----
From: "Vincent Massol" <vmassol@octo.com>
To: "'Cactus Users List'" <cactus-user@jakarta.apache.org>
Sent: Thursday, March 28, 2002 4:11 PM
Subject: RE: Testing EJB implementing EJBLocalObject interface with Cactus


> Yes, Jacek, this is scheduled (see the todo list :
> http://jakarta.apache.org/cactus/todo.html). It is the EJB Redirector
> feature.
>
> However, I would find it very strange that the RI does not support
> calling local interfaces from a war. I can't confirm as I have not tried
> it myself.
>
> However, we are going to add a new sample to Cactus, in addition to the
> sample-servlet : the sample-j2ee. We'll try to make scripts to run it on
> the RI, JBoss and WL 6.1 to start with. We just need to find some time
> to do it ... If you want to contribute, please come and join us ! :-)
>
> Thanks
> -Vincent
>
> > -----Original Message-----
> > From: Jacek Skrzypiec [mailto:jacek@learning-media.net]
> > Sent: 28 March 2002 15:27
> > To: Cactus Users List
> > Subject: Re: Testing EJB implementing EJBLocalObject interface with
> Cactus
> >
> > 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" <Jason.Robertson@acs-inc.com>
> > To: "'Cactus Users List'" <cactus-user@jakarta.apache.org>;
> > <franck@beanlab.com>
> > 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: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>
> > >
> >
> >
> >
> >
> > --
> > 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