• 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:
  • Devaka Cooray
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
Bartenders:

To provide vcap properties (of stored value for a key in credhub) to server.xml (liberty server)

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Require to get and use the vcap properties ${vcap.services.credhub.credentials.key} for DB password in my server.xml in a liberty application deployed in PCF.

I tried but the value is not coming as expected.

But for spring boot application the value is getting resolved from credhub (to store credentials) and resolved in manifest environment variable which is then used in server.xml.

Just like spring boot application how can we get vcap property value in server.xml?

I tried to read manually using cfenv library and assigned to some environment variable and that variable used in server.xml to pick. But where to place this logic? is ServletContextListener(contextInitialized method) is a good fit. But that seems not working for me.


How can we set some environment variable before the server.xml is read initially in liberty server to set connection pool ready?
Thanks all..
 
Saloon Keeper
Posts: 29002
214
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This question appears to be related to IBM's WebSphere Liberty server, which is an OSGi container, I think. The server.xml file mentioned is, as far as I know, not related to the better-known server.xml file for the Tomcat webapp server.

I've added this question to the WebSphere forum in the hopes that someone there might have some insight.
 
It was the best of times. It was the worst of times. It was a tiny ad.
The new gardening playing cards kickstarter is now live!
https://www.kickstarter.com/projects/paulwheaton/garden-cards
reply
    Bookmark Topic Watch Topic
  • New Topic