commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pablo Lalloni <plall...@afip.gov.ar>
Subject Re: [Slightly OT] JNDI question
Date Tue, 03 May 2005 17:32:40 GMT
We actually have a TestCase base class with methods for setting up individual 
mechanisms or the whole environment (jndi, jta/jts, datasources, hibernate's 
session factories, etc.).

We're currently using ObjectWeb's Carol for JNDI & JOTM for JTA, all starts up 
in less than a sec.

The datasources are created and binded in the JNDI tree programmatically in 
the test case.

JOTM is binded automatically at startup, we just have to rebind the 
TransactionManager and UserTransaction to the JNDI addresses where the app 
expects to find them.

Before current setup using JOTM/Carol, we used to setup Sun's JNDI filesystem 
SPI for test cases but now we're happier people ;-)

El Mar 03 May 2005 12:41, WHIRLYCOTT escribió:
> I'm wondering if somone has any creative ideas here.  I'm working on a
> project that gets javax.sql.DataSource instances via Tomcat's JNDI
> provider.  This works fine, except when we are developing code and need
> to run Junit tests.
>
> Because the tests need to run outside Tomcat, getting access to a
> DataSource via JNDI becomes a pain in the neck.
>
> I'm assuming that this is a very common situation and I'm wondering if
> anybody has slick tricks for your dev environments that allow you do get
> DataSource objects via JNDI...?
>
> phil.

-- 
Pablo I. Lalloni <plalloni@afip.gov.ar>
Teléfono +54 (11) 4347-3177 
Proyecto Pampa
Dirección Informática Tributaria
AFIP

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If I have not seen so far it is because I stood in giant's footsteps.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message