FW: Connection pooling with sql server

2002-12-20 Thread Ashruf Hussain
Hi Peng,

Given below are server.xml and web.xml entries and code to access dbcp
resource from servlet.
When servlet is looking up for jndi name server hangs up with no response,
wiht 100% cpu busy signal.

With no exception message logged logs files.

Thanks in advance.
--
DBCP entry in server.xml :***

Resource name=jdbc/Resourcesdb scope=Shareable
type=javax.sql.DataSource/
  ResourceParams name=jdbc/Resourcesdb
parameter
  namevalidationQuery/name
  value/value
/parameter
parameter
  namemaxWait/name
  value5000/value
/parameter
parameter
  namemaxActive/name
  value4/value
/parameter
parameter
  namepassword/name
  valueresourcesdb/value
/parameter
parameter
  nameurl/name
 
valuejdbc:datadirect:sqlserver://serverName:1433;databaseName=name;User=na
me;Password=name/value
/parameter
parameter
  namedriverClassName/name
  valuecom.ddtek.jdbc.sqlserver.SQLServerDriver/value
/parameter
parameter
  namemaxIdle/name
  value2/value
/parameter
parameter
  nameusername/name
  valueresourcesdb/value
/parameter
  /ResourceParams

Entry for accessing DBCP resource in web.xml:**

resource-ref
 descriptionDatasource example/description
 res-ref-namejdbc/Resourcesdb/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
/resource-ref

Servlet code:***

System.out.println(LoginServlet: Getting
InitialContext...);
InitialContext initCtx = new InitialContext();
System.out.println(LoginServlet: Got
InitialContext);

System.out.println(NameInNamespace ==  +
initCtx.getNameInNamespace());

DataSource ds =
(DataSource)initCtx.lookup(java:comp/env/jdbc/Resourcesdb);

if (ds != null)
{
conn = ds.getConnection();

if (conn != null)
{
System.out.println(Got Connection == \n +
conn);

}
else
{
System.out.println(Failed to get
connection.);
}
}
else
{
System.out.println(Failed to get datasource.);
}

---



-Original Message-
From: Peng Tuck Kwok [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 16, 2002 8:43 AM
To: Tomcat Users List
Subject: Re: Connection pooling with sql server


I've never managed to get tomcat to hang on a mis-configured db-pool, 
just got it to throw exceptions. Post your server.xml and web.xml and 
let the mailling list have a look. Your jsp or servlet if you are using 
any would be helpful.

Ashruf Hussain wrote:
 Hi all,
 
 I am new user of tomcat 4.1, using jdbc driver from datadirect to connect
to
 sqlserver database. 
 I am able to get normal individual connections without pooling. 
 Now, I want to get connections from connection pool. 
 I tried with all my efforts (followed pooling documentation) to get
 connection pooling done with sql server, but tomcat hangs up at start up.
 
 Anybody who has done it all, pls help.
 
 Thanks in advance,
 
 Ashruf
 
 ---
 Regards, 
 Mohammed Ashruf Hussain
 Software Engineer.
 Virtusa, Corp. (formerly erunway)
 Work 040 23414200 ext(303)
 www.virtusa.com 
 
 
 
 --
 To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
mailto:[EMAIL PROTECTED]
 
 



--
To unsubscribe, e-mail:
mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
mailto:[EMAIL PROTECTED]

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




RE: Connection pooling with sql server

2002-12-16 Thread Turner, John

Not sure what you mean by jdbc driver from datadirect but if you mean the
free JDBC driver from Microsoft, we were never able to get it to support
pooling after several weeks of trying.

We ended up purchasing a license to a third-party driver.  Benefits were
actual pooling, and on top of that, support for CachedRowSet which was a key
feature we needed for our apps.

John

 -Original Message-
 From: Ashruf Hussain [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, December 15, 2002 9:44 PM
 To: [EMAIL PROTECTED]
 Subject: Connection pooling with sql server
 
 
 Hi all,
 
 I am new user of tomcat 4.1, using jdbc driver from 
 datadirect to connect to
 sqlserver database. 
 I am able to get normal individual connections without pooling. 
 Now, I want to get connections from connection pool. 
 I tried with all my efforts (followed pooling documentation) to get
 connection pooling done with sql server, but tomcat hangs up 
 at start up.
 
 Anybody who has done it all, pls help.
 
 Thanks in advance,
 
 Ashruf
 
 ---
 Regards, 
 Mohammed Ashruf Hussain
 Software Engineer.
 Virtusa, Corp. (formerly erunway)
 Work 040 23414200 ext(303)
 www.virtusa.com 
 
 
 
 --
 To unsubscribe, e-mail:   
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: 
 mailto:[EMAIL PROTECTED]
 

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Connection pooling with sql server

2002-12-15 Thread Ashruf Hussain
Hi all,

I am new user of tomcat 4.1, using jdbc driver from datadirect to connect to
sqlserver database. 
I am able to get normal individual connections without pooling. 
Now, I want to get connections from connection pool. 
I tried with all my efforts (followed pooling documentation) to get
connection pooling done with sql server, but tomcat hangs up at start up.

Anybody who has done it all, pls help.

Thanks in advance,

Ashruf

---
Regards, 
Mohammed Ashruf Hussain
Software Engineer.
Virtusa, Corp. (formerly erunway)
Work 040 23414200 ext(303)
www.virtusa.com 



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: Connection pooling with sql server

2002-12-15 Thread Peng Tuck Kwok
I've never managed to get tomcat to hang on a mis-configured db-pool, 
just got it to throw exceptions. Post your server.xml and web.xml and 
let the mailling list have a look. Your jsp or servlet if you are using 
any would be helpful.

Ashruf Hussain wrote:
Hi all,

I am new user of tomcat 4.1, using jdbc driver from datadirect to connect to
sqlserver database. 
I am able to get normal individual connections without pooling. 
Now, I want to get connections from connection pool. 
I tried with all my efforts (followed pooling documentation) to get
connection pooling done with sql server, but tomcat hangs up at start up.

Anybody who has done it all, pls help.

Thanks in advance,

Ashruf

---
Regards, 
Mohammed Ashruf Hussain
Software Engineer.
Virtusa, Corp. (formerly erunway)
Work 040 23414200 ext(303)
www.virtusa.com 



--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]





--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]