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...@pivolis.com> on 2005/03/04 12:53:13 UTC
JNDI JBoss configuration (was RE: jboss, cactus 1.7 and tempdir)
> -----Original Message-----
> From: Milan Trajkovic [mailto:milant@gmail.com]
> Sent: vendredi 25 février 2005 18:12
> To: Cactus Users List
> Subject: Re: jboss, cactus 1.7 and tempdir
[snip]
> I have introduced class BaseTestCase as root for my test class
> hierarchy. It has just one method getInitialContext that should be
> used for fetching initial context in order to lookup for EJB
> interfaces.
> I have wrote test that has setup method, which instantiate class
> necessary for test. That class within itself fetch some other EJB
> interfaces within itself ( so it make usage of context). This context
> is not the one from BaseTestCase, but is obtained from service locator
> class that has already present in the application.
> This is where the problem occurs.
> InitialContext in existing Service locator, could not be
> instantiated/fetched, since it miss Naming Factory class. This
> property is in jndi.properties file.
> I use JBoss 3.2.3 and jndi.properties is placed in conf directory.
> When application is regularly executed (by jboss run script)
> everything is ok, and properties are reguraly loaded.
> When I execute ant script (from Eclipse 3.1M4) that actually performs
> testing, those properties cannot be found, and therefore class cannot
> be instantiated.
>
> Where to put jndi.properties to make them available?
ATM, the JBoss container implementation does not support passing a custom
jndi.properties file. The current solution is for you to use a custom JBoss
server configuration (using the "config" and possibly the "configDir"
attributes of the <jboss3x> element).
-Vincent