Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Load Database Configuration from property file to JNDI bean.

 
sanuji pillai
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using Spring MVC in my Project. My requirement is to load Database Configuration from property file to JNDI bean (org.springframework.jndi.JndiObjectFactoryBean).
Usually this method is used for loading JNDI Database configuration from Context.xml( i am using Tomcat ).
But currently i moved to Embedded Jetty Server and planning to load Database Configuration from Property file without changing the JNDI settings in Spring.

Thanks,

Sanuji PIllai.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well in Jetty. The data source is put into JNDI by Jetty. And it is configured by Jetty.

The JndiObjectFactoryBean is just doing a JNDI lookup. So you can't change the datasources configuration from Spring, it has to be in Jetty.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic