I have JAAS and my connection pool set up in JBoss to assume the users login and password when accessing the database. This is a customer requirement so that the database can track transactions by the users login.
After a user has accessed JBoss the connection pool contains connection(s) that the database recognizes as theirs. This causes problems with our System Admin application since you can not change database roles on a user with an active database connection. Connections on the pool remain connected as the last user who accessed them until they are reused or recycled. Performing connection.close() appears to release the connection back to the pool but it is still live and connected as the last user.
Is there a configuration to reset a users pooled connections back to the default login and password after they are finished with them? Is there some step that I may have missed?