This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 17249
    
    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.
 
Similar Threads
Spring Hibernate Iceface configuration file get DTD and workoffline
Testing the spring configuration file
Need help on JNDI DataSource in JBOSS?
How to Externalize properties outside WAR file
exception in jndi configuration - spring framework