aspose file tools*
The moose likes Spring and the fly likes  How to Load Database Configuration from property file to JNDI bean. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark " How to Load Database Configuration from property file to JNDI bean." Watch " How to Load Database Configuration from property file to JNDI bean." New topic
Author

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

sanuji pillai
Greenhorn

Joined: Jul 05, 2010
Posts: 24
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

Joined: Feb 05, 2001
Posts: 17259
    
    6

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to Load Database Configuration from property file to JNDI bean.