Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB 2.1 - Database connection for multiple users in Entity Bean (BMP)

 
Mathias Mueller
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have a J2EE web application with session beans invoking entity beans (bmp). My question is: Where is the best place to pass the login credentials for the database connection to the entity bean because the login to the database depends on the user login (which comes from a LDAP server) to the web application? Should I set the login credentials in the entity context or should I pass the login credentials when ejbCreate is called and save this login credentials in the entity bean? The data source comes from a properties file but this is not the problem. I can't configure any xml-files in application servers. It must be vendor independent.

Thanks for your help and best regards.

Mathias
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic