Reconect to oracle database on a java collaboration

Hi everyone,

How can I reconect to database in a java collaboration?.

That is.

I have a jcd, which use a oracle otd.

I did a test which I disconect my pc from network.

When I re-connect my pc to network on my java collaboration definition appear next error:

[#|2007-01-15T16:37:20.750-0500|WARNING|IS5.1.1|javax.enterprise.system.stream. err|_ThreadID=16; ThreadName=Worker: 87;|

java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: Excepcin de E/S: The Network Adapter could not establish the connection

at com.stc.connector.oracleadapter.OracleConnector.open(OracleConnector.java:94)

at com.stc.connector.oracleadapter.appconn.OracleApplicationConnection.<init> ;(OracleApplicationConnection.java:63)

at com.stc.connector.oracleadapter.appconn.OracleApplicationConnection.<init> ;(OracleApplicationConnection.java:50)

at com.stc.connector.oracleadapter.appconn.OracleApplicationConnectionFactory.getC onnection(OracleApplicationConnectionFactory.java:133)

at com.stc.oracle.runtime.ejb.OracleEWayRuntimeHandler.initializeService(OracleEWa yRuntimeHandler.java:256)

at runtime.cmS3TCPOrigenAutorizador_jcdS3OrigenAutorizador1.jcdS3OrigenAutorizador _Runtime_Handler.handleRequest(jcdS3OrigenAutorizador_Runtime_Handler.java:361)

............................

How can I reconect jcd again to database?

Any help will be appreciated

[1496 byte] By [conectora] at [2007-11-26 15:10:33]
# 1
HiYou can use <OracleOTDInstance>.getConnection() api to reestablish connection (ignore the return value of this api)Hope this works.- Sandeep
AlanWakea at 2007-7-8 9:01:24 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 2
Thanks for your response.Ok, I can use OracleOTDInstance for reconect, but I have a problem because I can磘 capture sqlException on my java collaboration. Java collaboration don磘 generate a sqlException so, I can磘 capture it and try to reconnect.Thanks
conectora at 2007-7-8 9:01:24 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 3

Agree... We had had to install one of the ESR's for the same problem (due to database connection kills), but that was for ICAN 505 and Sybase eWay... that patch provided us the option to set the retry count and retry delay to re-establish the connection at the Integration Server level automatically...

not sure with jCAPS though...

AlanWakea at 2007-7-8 9:01:24 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 4

perhaps you can try out setting the connection idle timeout for the server pool settings in the Oracle ES. Also configure the number of connection retries and retry interval accordingly. If a connection is killed manually (say the network cable is unplugged), it becomes idle and after the timeout server will remove that idle connection and establish a new one.

I think this is the only workaround that I can see at this moment. If you have already come up with an alternative, please let us know.

AlanWakea at 2007-7-8 9:01:24 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...