Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using database roles in a J2EE application

 
rivka zam
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are going to use a connection pool DataSource on the Websphere application server.

DataSource uses standard JDBC properties to connect to the DB.

In our IDS we use DB roles.

I would like to know if there is a way to use DB roles with this connection pool DataSource?

Generally, I would like to know if database roles are still used in a J2EE application (that uses DataSource objects in order to connect to the DB)? Or is there a general trend to stop using DB roles and move to J2EE roles?
 
Scott Selikoff
author
Saloon Keeper
Posts: 4033
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would say no, they are not used much these days to provide user-level security although there may be people out there who still use them to a large degree. Usually DB roles are too limited in functionality to be used in any great degree so most db systems I have worked on use the same set of username/passwords for all users with the condition that the J2EE server ultimately protects the database server from unauthorized access (assuming the DB server is not exposed externally).
 
Reid M. Pinchback
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to use your DB roles, check to see if your DB exports them via an LDAP or similar implementation. You may be able to wrap a JAAS provider around your DB roles that way.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic