• 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

JNDI-programatically set the password on datasource defined in the appcontext.xml

 
Ranch Hand
Posts: 63
Oracle Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi fellow ranchers,

for my project,i am using WAS 6.1.0.25 server.my application uses mybatis and spring3.x and struts 2 as well.

now i have configured the datasource on WAS and provided the datasource bean as below:


we cannot store the password in the App server(in WAS we can store it as a custom property). It is coming from a java application. PwdGen.java which has a method .I have to set the database pwd using this method. can i set it before i make the get connection() call? the problem here is that the datasource is injected in the application. so how can i handle this scenario ? How will i programmatically set the password on the datasource and make the datasource available for the entire application?


 
Vinny Menon
Ranch Hand
Posts: 63
Oracle Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i solved this problem by using my custom DataSourceAdapter. now the password is not stored anywhere in the custom property of the app server.
 
I will suppress my every urge. But not this shameless plug:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic