Steve Maring [
http://community.jboss.org/people/stevemaring] created the discussion
"JAAS LoginModule as source of DB conn creds?"
To view the discussion, visit:
http://community.jboss.org/message/633098#633098
--------------------------------------------------------------
Normally, we develop apps that use a single set of credentials to create database
connections within the pool.
We specifiy those in the login.xml using SecureIdentityLoginModule
Now, I'm developing an application that is for support personel. They are granted
specific write permission to the production database for short periods of time while they
make specific modifications. They connect with their own set of credentials.
So, I would like to prompt the user for their database credentials and use those as a
basis for creating connections.
I know I could declare <application-managed-security/> in the datasource config, and
then do a DataSource.getConnection(username,password) in my DAOs to get a connection, but
I don't want to do straight JDBC. I have a nice set of JPA entities and a whole bunch
of criteria queries.
Is there a way to have more control over the connection process, using a specific set of
credentials at runtime, and still make use of EntityManager?
Thanks for your thoughts.
-Steve Maring
Tampa, FL
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/633098#633098]
Start a new discussion in Datasource Configuration at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]