users@glassfish.java.net

Re: Configuration of jdbc connection pool with mssql

From: <forums_at_java.net>
Date: Thu, 30 Jun 2011 09:26:48 -0500 (CDT)

 I got the solve.. :)

I will mention how i connect Glassfish with Micrsoft SQL 2008 server.. to
help any other programmer..

I am using "jtds-1.2.5" and you can download it from this
link:  http://jtds.sourceforge.net/ [1]

1) after you download the "jtds-1.2.5-dist.zip", unzip the file and you will
find "jtds-1.2.5.jar", copy this file to lib folder on GlassFish folder,
almost be on "c:". for example "C:\Program
Files\glassfish\glassfish-3.1\glassfish\lib\".

2) then go to you GlassFish admin and create your JDB Connection Pool.

- Resources => JDBC => JDBC Connection Pools => New

Pool Name: any name
Resource Type: javax.sql.DataSource
Database Driver Vendor: jtds

Next

DatabaseName: yourDBname
User: SQL Server login name, which usual be 'sa'
Password: ****
ServerName: localhost
PortNumber: 1433

Thats All.... but i got an *error*..

"*Ping Connection Pool for microsoft_jtds_pool is Failed. Ping failed
Exception - Connection could not be allocated because: Network error
IOException: Connection refused: connect Please check the server.log for more
details.*"

To solve it go to: Start => all programs => Microsoft SQL Server 2008
=> Configuration Tools => SQL Server Configuration Manager.

then:  SQL Server Network Configuration => Protocols for MSSQLSERVER => and
then Enable TCP/IP protocal.

I hope it help any one get same error..

and thanks for whos gave me his time to solve this problem.

:)


[1] http://jtds.sourceforge.net/

--
[Message sent by forum member 'rumex']
View Post: http://forums.java.net/node/816236