Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> JDBC type-2 SQL connection supporting multiple concurent threads?
Environment:
Server A
Server B
Description:
From Server Aour application code (Java servlets) use the IBM Connection
Manager (from Websphere) to manage a pool of connections to the database
on Server B . So, our servlets get an IBM Connection (which is a
wrapper for an SQL connection) from the pool, then get the corresponding
SQL connection from the IBM Connection, and then they do straight SQL to
the database on Server B . The servlets create threads which take the
connection that the servlet had and use it to get real data from the
database. In some instances we probably have around 20-30 threads
spawned by a servlet per user. All threads use the same connection they
got from the servlet which is run by a user. This seems to be working
pretty good for one or two users, however, once we get 5 users or above
hitting the application at the same time, we get a hang. Sometimes,
everybody hangs, once somebody actually got through and the others
didn't, etc. This is using a type 2 JDBC driver. We tried a type-4 but
that gave us some deadlocks, invalid SQL exceptions (invalid column
name, etc), incomplete data in some instances (that's with 7 concurent
users - again, with only one or two users, everything appears normal).
With type-2, it looks like the Oracle SQL connection does pretty good
with serialization so we don't use synchronized methods in Java.
Question:
Do we have a problem if 50 threads try to use the same JDBC type-2 SQL
connection at the same time ? Any answer will be greatly appreciated.
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Thu Sep 16 1999 - 13:56:29 CDT
![]() |
![]() |