• 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 ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

How to define a datasource to DB2 in WSAD 5?

Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried every means to make it, just failed always. seems everything is fine, just cannot use it. is there any step by step tutorial? pls help me.
what I did is:
1, define a datasource in Server configuration->datasurce page. a DB2 datasource, I use v5. but don't know where to add username and password information. and used the jndi name of "jdbc/epc".
2, later, i look up in my bmp like this: lookup("java:comp/env/jdbc/epc"), everytime failed. said could not find the name specified.
3, later, i set the datasource i defined as a default datasource. thought websphere still didn't find, it used the default. then another error message was no auth**.
I am really comfused by this, help me pls.
How to configure? How to use? step by step, as specific as possiable. thanks!
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You set up a database user in the 'security' section, then assign this user to the datasource.
In the server configuraton, select the 'Security' tab at the bottom.
In the "JAAS Authentication Entries", add a new alias called "Database user" with the datasource username and password.
Go back to your datasource, edit, at the bottom it refers to the "Component-managed authentication alias" and "Container-managed authentication allias", you should be able to select your new database user in both of these lists.
I've heard it's also possible to set the username and password as name-value pairs in the datasource properties, but I haven't tried this and it isn't the recommended way to do it.
Sean Li
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you. fix it. got it.
We don't have time to be charming! Quick, read this tiny ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic