I have situation where i need to destroy the underlying physical EIS
connection from my application code.
Here is the scenario i would likes to destroy the physical connection.
1. Have a pool of connections in my weblogic wls 8.1 sp5 container.
2. Unfortunatenly the physical mainframe system has recycled when i send
the request (Say RequestA).
3. Now i got the ResourceException due to the unavailability of the backend
systems, I have closed the connection (Say ConnectionA).
4. Now its available in the pool for use. [ It's actually a bad
connection/faulty ]
5. The container should trigger the the event "CONNECTION_ERROR_OCCURRED"
6. So that the RA could destroy the physical connection.
7. This does not happen ( I hope so)
8. When there is a new request (Say RequestB) using the same connection
(Say ConnectionA)and got the response of the first request (RequestA).
9. I need to destroy the physical connection which is referenced with
ConnectionA
10. Is there any way to destroy the physical connection from application
code.
here is the code which i am using.
protected javax.resource.cci.Connection m_conn = null;
protected javax.resource.cci.ResultSet m_rs = null;
try
{
String stmtStr = m_fmtStr.toString(); // formatted message to be
sent to CICS
if(m_conn==null)
{
m_conn = DBUtils.getCICSConnection(); // get connection from the
pool
}
m_ix = m_conn.createInteraction ();
ispec = new com.neon.jca.InteractionSpec ();
ispec.setStatement (stmtStr);
m_rs = (javax.resource.cci.ResultSet) m_ix.execute (ispec, null);
}
catch(ResourceException re)
{
// All kinds of connectivity issues between Unix and Mainframe via
Neon.
// Includes timeouts. Let's destroy connection in this case.
try
{
((com.neon.jca.Connection)m_conn).getManagedConnection().destroy
(); // Here unfortunately i got the class cast exception at runtime.
}
}
===========================================================================
To unsubscribe, send email to
listserv@... and include in the body
of the message "signoff CONNECTOR-INTEREST". For general help, send email to
listserv@... and include in the body of the message "help".