• Post Reply Bookmark Topic Watch Topic
  • New Topic

JNDI & Authentication  RSS feed

 
Roel De Nijs
Sheriff
Posts: 11333
177
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

I am using JNDI and JTDS to connect to a MS SQL Server database. So in my server.xml of Tomcat i have an entry:

<GlobalNamingResources>
<!-- database -->
<Resource name="jdbc/ontwikkelingDB" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/ontwikkelingDB">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>net.sourceforge.jtds.jdbc.Driver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:jtds:sqlserver://TESTGIS:1433/AquaGis_Test</value>
</parameter>
<parameter>
<name>username</name>
<value>***</value>
</parameter>
<parameter>
<name>password</name>
<value>***</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>1000</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>200</value>
</parameter>
</ResourceParams>
</GlobalNamingResources>

Is it possible to connect to the database with the username and password of Windows authentication, so with a username and a password that is for each user different, instead of one password and username for all users

Thanks in advance!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!