• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

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

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic