You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Vincent Massol <vm...@octo.com> on 2002/04/14 21:14:06 UTC

RE: one time setup in server...

Bala,

Your question triggered some thoughts for me ... I have started writing
an email a week ago and actually started a proposal in my answer but I
found that it would not work perfectly well and thus have gone back into
research mode ... :-)

For the moment the simplest way to achieve what you want would be by
using static variables. Would that work for you ?

Thanks
-Vincent

> -----Original Message-----
> From: BALA KRISHNA [mailto:ebalki2002@yahoo.com]
> Sent: 27 March 2002 03:40
> To: Cactus Users
> Subject: one time setup in server...
> 
> 
> Hi,
> 
> How to do a one time setup for lot of tests in the
> server?
> 
> I am new and I might be wrong here..... but my
> understanding is that when I use TestSetup (returning
> a TestSetup wrapper from static suite method), it is
> running on the client. How to extend this to onetime
> setup on server?
> 
> Another related question is, how can I initialize a
> database connection only once for all tests and have
> access to it in all tests?
> 
> Thanks,
> balki
> 
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Movies - coverage of the 74th Academy AwardsR
> 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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: one time setup in server...

Posted by Nicholas Lesiecki <ni...@eblox.com>.
You should also be able to place something in the servlet context under a
known name, or look up something out of JNDI. Either of these approaches
would allow "one time setup". For instance, my tests use the same connection
pool (fished out of JNDI) as my regular code does.

Cheers,

Nick

-----Original Message-----
From: Vincent Massol [mailto:vmassol@octo.com]
Sent: Sunday, April 14, 2002 12:14 PM
To: 'Cactus Users List'
Subject: RE: one time setup in server...


Bala,

Your question triggered some thoughts for me ... I have started writing
an email a week ago and actually started a proposal in my answer but I
found that it would not work perfectly well and thus have gone back into
research mode ... :-)

For the moment the simplest way to achieve what you want would be by
using static variables. Would that work for you ?

Thanks
-Vincent

> -----Original Message-----
> From: BALA KRISHNA [mailto:ebalki2002@yahoo.com]
> Sent: 27 March 2002 03:40
> To: Cactus Users
> Subject: one time setup in server...
>
>
> Hi,
>
> How to do a one time setup for lot of tests in the
> server?
>
> I am new and I might be wrong here..... but my
> understanding is that when I use TestSetup (returning
> a TestSetup wrapper from static suite method), it is
> running on the client. How to extend this to onetime
> setup on server?
>
> Another related question is, how can I initialize a
> database connection only once for all tests and have
> access to it in all tests?
>
> Thanks,
> balki
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Movies - coverage of the 74th Academy AwardsR
> 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:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>