I have a application where the user can change de datasource used by a session atribute.
I'm using Jaas DatabaseServerLoginModule for authentication but the datasource used by this configuration is static (writen in login-config.xml if JBoss 6, and standalone.xml in JBoss7)
Is there a way to change the datasource used dynamically?
I would have to write a custom login module or there's a way to do this with the existing JBoss modules?
if somebody needs something like that too:
Don't know if it's the better way to do it, but I created a custom login module and concatenate a identifier for the chosen datasource in the login.
inside the login module, the login is splited and the datasource is looked up based on it.
Retrieving data ...