I have Websphere Application Server version 7.0, running on Windows. I created a JAAS Login Module that implements the javax.security.auth.spi.LoginModule interface and created a data source that uses this login module (under Mapping-Configuration alias). Since this data source should get the credentials for the connection from the login module, there are no authentication alias configured on the data source.
I want to use this data source on my application, but my application uses direct JNDI lookup for the data source. According to this article, when using direct JNDI lookup, websphere creates a default resource-reference that is configured with res-auth=application. Since the res-auth is application my login module is never invoked, but I get a logon denied error because the "Component-Managed Authentication Alias" is empty. I tried to create a resource reference manually with res-auth=Container but it didn't help.
Is there any way to change the default res-auth to be Container? Is there any way to make a login module work when the res-auth is set to Application?
Thanks.