Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Kyle please help

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm developing a J2EE app in WSAD and WAS4.0 with DB2 as the back end. I'm looking for some sort of method thru which I can configure the database url, usename, password, the mail server ip etc thru a config file or properties file(as we can do in weblogic). Please advice me on where shall I put this file, so that I can bundle it with the EJB jar and how can I access it from my EJBs and is there any naming protocols thru which I can locate this file at runtime(like the T3 protocol in Weblogic) please do help.
Thanks In Advance
Praveen
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Praveen Prakash:
Hi,
I'm developing a J2EE app in WSAD and WAS4.0 with DB2 as the back end. I'm looking for some sort of method thru which I can configure the database url, usename, password, the mail server ip etc thru a config file or properties file(as we can do in weblogic). Please advice me on where shall I put this file, so that I can bundle it with the EJB jar and how can I access it from my EJBs and is there any naming protocols thru which I can locate this file at runtime(like the T3 protocol in Weblogic) please do help.
Thanks In Advance
Praveen


This isn't the way WebSphere works. You can't (or at least shouldn't) do things that way. You have to preconfigure a DataSource with a URL (and userid/password, too) and configure a Mail resource with its IP address as well. This could all be scripted using XMLConfig, but it won't work programatically like you're describing. This is all outside of the specs, so you shouldn't be surprised that every server does this differently.
Kyle
 
Would you like to try a free sample? Today we are featuring tiny ads:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic