cancel
Showing results for 
Search instead for 
Did you mean: 

Lost connection during calling a stored procedure

frank_schmitt3
Participant
0 Kudos

Hallo,

my webservice runs in a sql-exception

--> java.sql.SQLException: Getrennte Verbindung

(lost connection). This is probably during handling the response (conerting oracle types in java types). How i can avoid that the connection will be lost?

Thanks in advance,

Frank

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

do you use the connection pool of the j2ee container (obtaining the connection via jndi)??

frank_schmitt3
Participant
0 Kudos

Hallo,

yes thats right --> using a data source.

InitialContext ctx = new InitialContext();

DataSource ds = (DataSource) ctx.lookup("jdbc/DataSource_Awel");

ConnectionHandle handle = (ConnectionHandle) ds.getConnection();

conn = handle.getPhysicalConnection();

Former Member
0 Kudos

Hi Frank,

that is strange. The container should validate the connection and remove it from the pool if it is disconnected...

Try to monitor the connection pool and see what happens there:

Visual Admin

Resources -> DataSources -> <applicationName> tree, and then go to the Monitoring tab.

Former Member
0 Kudos

> InitialContext ctx = new InitialContext();

> DataSource ds = (DataSource)

> ctx.lookup("jdbc/DataSource_Awel");

> ConnectionHandle handle = (ConnectionHandle)

> ds.getConnection();

> conn = handle.getPhysicalConnection();

Why are you using directly physical connection to DB ? Use connection object that you get while invoking:

ds.getConnection();

Regards,

Marcin Zduniak