• 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 ...
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown

DB config with datasource in local properties file

Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am SOOO close to having what I want work. The plan is to move 99% of our properties to database. But we want the datasource's jndi setting to remain in a local properties file as it has always been. Everything works if I hardcode the ds name in the app.xml, but when I specify ${ds.jndi} to point to our property file, it fails. Here's what I got:

The error basically just says "WTF is ${ds.jndi}?" It's trying to resolve that literally as a jndi name. Clearly, the creation of the databaseConfigurator is happening BEFORE the propertyConfigurer pointed at the local property file can do it's job. I tried setting order, and many other permutations, and none work. I have apps using spring 4 and spring 3.2, so ideally a solution that works in both is preferred, but if I had to, I could live with hard-coding in 3.2 until we get permission to upgrade those apps. Any ideas?
    Bookmark Topic Watch Topic
  • New Topic