[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - JAAS Enabled Datasource

jplessinger do-not-reply at jboss.com
Fri Sep 5 13:01:39 EDT 2008


Hi,

I am using JAAS to pass the password and username of the user  to the JDBC driver. The problem I get is I when the server starts it connects to the database but has no username or password and fails.

Basically with this exception.


  | 10:55:57,197 WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Throwable while attempting to get a new connection: null
  | org.jboss.resource.JBossResourceException: No matching credentials in Subject!
  | 

I need to provide a default username and password so startup can connect to the database server and have no idea how I can configure JAAS
to do this.

This is my datasource config


	<local-tx-datasource>
	<jndi-name>MYDS</jndi-name> 
	
	<!-- domain should be the windows domain the sql server is on -->
	<connection-url>jdbc:jtds:sqlserver://myserver:143/Coors;domain=MY.DOMAN</connection-url> 
	<driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class> 
	
<user-name>user</user-name>
	user
	
	<security-domain-and-application>PAE</security-domain-and-application>
      <check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
	
  		<type-mapping>MS SQLSERVER2000</type-mapping> 
  	
	</local-tx-datasource>



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4174671#4174671

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4174671



More information about the jboss-user mailing list