jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@octo.com>
Subject RE: Testing EJB local interfaces
Date Wed, 07 Aug 2002 07:25:37 GMT
Hi Michael,

You're completely right. Using our Cactus redirector servlet as a way
inside the EJB container only works for Local interfaces if everyone is
running in the same JVM. This is a current limitation (maybe we should
add it somewhere on the web site).

This is why I had never been completely satisfied with this approach and
it's the reason I have always wanted to add the EJBRedirector stuff that
is on the TODO list ... 

I have never found the time to implement it, especially as I always put
the web tier and the business tier on the same JVM in all my projects,
for better performance (So far, I have always used a front end load
balancer instead of internal clustering to load balance from web tier to
business tier).

We are actually waiting for someone to help us here ... hint hint ...

I don't think it's a big deal. Especially as I have done all the needed
refactorings on Cactus client side to support different protocols (and
not only HTTP). I have actually already started implementing an MDB
redirector to unit tests MDBs using JMS from cactus client side. So the
structure and ability is there.

If you wish to help us, I can show exactly what has to be done.
Unfortunately I can't do it myself at this point in time as I'm
completely swamped by work (by daytime and nighttime :-)).

Tell us what you think ?


> -----Original Message-----
> From: Michael Mattox [mailto:michael@idtect.com]
> Sent: 06 August 2002 15:48
> To: cactus-user@jakarta.apache.org
> Subject: Testing EJB local interfaces
> 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
> current design:  This only works if the servlet engine & EJB server
> 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
> when using a configuration with the servlet engine and EJB server in
> 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
> 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>

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

View raw message