You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Raphaël Piéroni <ra...@gmail.com> on 2007/07/04 17:55:27 UTC

[M2] creating Jndi context programmatically

Hi,

In my database access (using) hibernate
i define the usage of the datasource by jndi.

But i don't know how to inject the datasource in the jndi context
nor how to inject the jndi context in the testCase.setup method.

Any help is welcome.


Regards,


Raphaël

RE: [M2] creating Jndi context programmatically

Posted by LAMY Olivier <Ol...@accor.com>.
Hi, 
Have a look at plexus-naming [1] which can certainly help.

Configure a component as this [2], add this component in loadOnStartup.

Note : Your testCase must extends PlexusTestCase.

--
Olivier

[1] http://fisheye.codehaus.org/browse/plexus/plexus-components/trunk/plexus-naming 
[2] http://fisheye.codehaus.org/browse/~raw,r=6444/plexus/plexus-components/trunk/plexus-naming/src/test/resources/org/codehaus/plexus/naming/NamingTest.xml

-----Message d'origine-----
De : Raphaël Piéroni [mailto:raphaelpieroni@gmail.com] 
Envoyé : mercredi 4 juillet 2007 17:55
À : Maven Users List
Objet : [M2] creating Jndi context programmatically

Hi,

In my database access (using) hibernate
i define the usage of the datasource by jndi.

But i don't know how to inject the datasource in the jndi context nor how to inject the jndi context in the testCase.setup method.

Any help is welcome.


Regards,


Raphaël


This e-mail, any attachments and the information contained therein ("this message") are confidential and intended solely for the use of the addressee(s). If you have received this message in error please send it back to the sender and delete it. Unauthorized publication, use, dissemination or disclosure of this message, either in whole or in part is strictly prohibited.
********************************************************************** 
Ce message électronique et tous les fichiers joints ainsi que  les informations contenues dans ce message ( ci après "le message" ), sont confidentiels et destinés exclusivement à l'usage de la  personne à laquelle ils sont adressés. Si vous avez reçu ce message par erreur, merci  de le renvoyer à son émetteur et de le détruire. Toutes diffusion, publication, totale ou partielle ou divulgation sous quelque forme que se soit non expressément autorisées de ce message, sont interdites.
********************************************************************** 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org