How to create JNDI for Unittests using Spring from XML configuration?

Is there an easy way to configure the JNDI environment for Unittests from the Spring XML file and export some materials (e.g. data sources)? This is SimpleNamingContextBuilder , but it will require code to set up the JNDI environment, and I would like to be able to simply include the XML file in @ContextConfiguration.

+3
source share
2 answers

I would recommend using SimpleJNDI . You can get it from Maven Central .

0
source

In many cases, you can avoid the main problem of this issue with these solutions:

  • Spring , JNDI JUnit-Tests, . ( , , , .)
  • XML XML- Unittests, bean, JNDI-.

, JVM, JNDI, , , .

0

All Articles