Skip to main content

Problem:

What happen in the matchManagedconnection method when Versant Resource Adaptor throws a exception?

Resolution:

  • Product Name: Borland Enterprise Server, AppServer Edition 
  • Product Version: 6.0.1
  • Product Component: JCA 1.0
  • Platform/OS Version: All 
  • Versant Version: 6.0

Versant will iterates through the set of passed connection-set to match the connect. It will check if the given managedConnection is valid.

If the check returns a negative result, Versant will do the following:

  1. send an event with a ResourceAdapterInternalException saying it is a EJC_BAD_SESSION
  2. log it in debug logs
  3. throw the above mentioned ResourceAdapterInternalException

Versant throws the error as soon as it hits the first bad connection. At this point, Versant does not remove the bad connection from the passed-in connection set.

When the resource adapter throws an exception, ConnectionEventListener observer instance in ManagedConnection will be notified -- by connectionErrorOccurred method being invoked (since the connection instance is not invalid and unusable). 

Application Server tries to clean up those "bad" connections. Hence the connection will be closed and the resources will be released. 

The ManagedConnection object will be destroyed and NOT return to the connection pool any more.

Author: Foo Chee Yong

Old KB# 15588

#JCA
#BorlandApplicationServer
#Security
#VisiBroker