jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shane Duan <sd...@borland.com>
Subject Re: Testing EJB local interfaces
Date Tue, 06 Aug 2002 16:27:30 GMT
Can you create the test case to act like a remote test client, so that 
you can connect to a remote EJB server?

When you compile an EJB class in JBuilder, it generates Stub and 
Skeleton classes for you.  This is how the EJB Test Client connects to 
the server.  I think if you create an EJB Test Client through the wizard 
and follow the same set of code to write your test case, you should be 
able to connect to your EJB server through another VM.

Shane

Michael Mattox wrote:

>I was hoping to use Cactus to unit test my EJB 2.0 local interface
>entity beans.  I read on the Cactus website that Cactus supports local
>interfaces, but after reading the documentation I saw a big flaw in the
>current design:  This only works if the servlet engine & EJB server are
>using the same JVM.  While evaluating JBuilder, I was using the tomcat
>built into JBuilder but deploying EJBs to JBoss.  With this
>configuration, Cactus would not work for local EJB interfaces.  But even
>when using a configuration with the servlet engine and EJB server in the
>same JVM, I think routing tests through a servlet is not the best
>design.  I think it'd be more efficient to have a standard Java class
>talk directly to an EJB Session Bean (via a remote interface), which
>would in turn execute tests with local interfaces.  In fact, this
>approach (a command pattern) is what most people talk about doing to
>test their entity beans but I haven't found any testing tools or
>frameworks that implement this.
>
>I see on the Cactus TODO list an EJBRedirector, which I think would
>solve all of these issues.  Is anybody working on this?  Once Cactus has
>this feature, I think it will gain even more support for unit testing
>EJBs.
>
>Thanks,
>Michael
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
>For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>
>
>  
>

-- 
Disclaimer:  I join all the news groups out of my own interest.  All opinions expressed here
are my own and not necessarily those of my employer.

Borland -- Enabling the digital world where our customers have the freedom of choice to develop,
deploy, and integrate applications across the enterprise and  the Internet. http://www.borland.com

This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named
herein and may contain legally privileged and/or confidential information.  If you are not
the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution
or copying of this e-mail, and any attachments thereto, is strictly prohibited.  If you have
received this e-mail in error, please immediately and permanently delete the original and
any copy of any e-mail and any printout thereof.




--
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