Hi Phil,

I don't understand the issue ... If you put your lookup call to the EJB home
method in your testXXX() method, it will be executed on the server side (not
that it matters as far as I know - you would also be able to put it in
beginXXX() if you wanted - or am I missing someething?). What is the JNDI
ref. problem that you mention ? You'll just need to get an InitialContext
from you app .server and then do a lookup from the JNDI service of your app
server ... If you're doing it on the client side (i.e. in beginXXX()) you'll
just have to make sure you have your app server client jars on your client
classpath.

It seems there is something obvious that I must be missing ?
Thanks
-Vincent

----- Original Message -----
From: "Phil Magill" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 26, 2001 10:14 AM
Subject: RE: [Announcement] Mock Object project


> Hi Abhishek
>
> I've managed to test ejbs with cactus, but i'm sure there is a more
slicker
> way of doing it.
>
> The problem i had was that cactus couldn't resolve the JNDI reference on
the
> client side.
>
> Because of the client and sever aspects of cactus i've had to create Proxy
> Objects for each EJB. These Proxy Objects create the EJB and call the
> methods. Its a one to one method mapping. These ProxyObjects are on the
> class path for App Server and the cactus client. In the testEJBMethod in
> your test case, create the proxy object, this will also create an object
on
> the server and then the JNDI ref can be resolved.
>
> Hope this helps, if you need for info let me know, its was sometime ago
and
> i may have forgotten something.
>
> Thanks
>
> Phil
>
> PS If there is a better way OR I missed something fundamental with Cactus
> let me know.
>
>
>
>
>
> -----Original Message-----
> From: Abhishek Srivastava [mailto:[EMAIL PROTECTED]]
> Sent: 26 July 2001 10:03
> To: [EMAIL PROTECTED]; 'Vincent Massol'
> Subject: RE: [Announcement] Mock Object project
>
>
> Hello All,
>
> Can I use Cactus to test EJBs?
>
> The web page says J2ee unit... but talks only about servlets and http.
> I'll greatly appreciate any help.
>
> regards,
> Abhishek.
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> ]On Behalf Of Vincent Massol
> Sent: Thursday, July 26, 2001 2:20 PM
> To: [EMAIL PROTECTED]
> Subject: [Announcement] Mock Object project
>
>
> Hi all,
>
> I have decided to help the SourceForge Mock Object project
> (http://sourceforge.net/projects/mockobjects or
http://www.mockobjects.com)
> in making it a thriving and reference project in the domain of Mock
Objects
> !
>
> My idea is that I think it would be stupid to reinvent the wheel within
> Cactus and redevelop a mock object implementation for the Servlet API,
> Taglib API, filter API, EJB API, .... I much prefer to integrate with a
> well-known and thriving existing framework for MO ! As there is no such
> project at the current time, the goal is to transform the SF mockobjects
> project into that and rely on it within Cactus.
>
> I would like to have your opinion on that and I would very much like to
have
> your support and everyone interested in Mock Objects should also come and
> help us in this endeavour ... lets unite our forces and make a reference
MO
> project !
>
> We'll have to write a bridge in Cactus to be able to use as is the classes
> from the mockobjects project but we'll be in a good position to do so if
we
> are participating in both projects (that's also the idea). I also believe
in
> mockobjects and actually would like to explore more this domain as I still
> consider myself a novice in that domain.
>
> The goal is still to make Cactus the preferred framework for doing server
> side unit testing, as it is obviously adding new features on top of a mock
> object framework (methodology, IC, PF, unit testing integrated with an
> automatic builds strategy, ...). However there will be an easy path for
> persons who start developing using the mockobjects classes and then who
> later want to use Cactus because they need its additional features. So I
see
> the 2 projects as complementary rather than in competition.
>
> Your thoughts ?
>
> Thanks
> -Vincent
>
>

Reply via email to