Re: WebLogic
Deb June <[email protected]> Tue, 25 Feb 2003 12:31:48 -0500
| Newsgroups | gmane.comp.java.sun.connector |
|---|---|
| Message-ID | <[email protected]> |
Sorry for the delay folks. Ok, here's the scoop. When a connection request is made, WebLogic Server returns to the client (via the resource adapter) a Proxy object that wraps the connection object. WebLogic Server uses this proxy to provide features that assist applications using the WebLogic Server implementation of the J2EE Connector Architecture. These features include (1) connection leak detection capabilities and (2) late XAResource enlistment when a connection request is made before starting a global transaction that uses that connection. This proxy wrapper was designed for reasons similar to the proxy that is returned from createEndPoint() discussed in the Connector 1.5 spec. If the connection object returned from a connection request is cast as a Connection class, a ClassCastException can occur. This exception is caused by either (1) the resource adapter doing the cast or (2) the client doing the cast during a connection request. In the next version of WLS - WebLogic Server 8.1 - an attempt is made to detect the ClassCastException caused by the resource adapter (case (1), above). If the server detects that this cast is failing, it turns off the proxy wrapper feature and proceeds by returning the connection object during a connection request (unwrapped). The server logs a warning message to indicate that the proxy wrapper has been turned off. If the client is doing the cast and getting a ClassCastException OR for pre-8.1 WLS, the customer (client) code can be modified as follows: Example: The client is casting the connection object to MyConnection 1) Instead of MyConnection being a class that implements the resource adapter's Connection interface, modify it to be an interface that extends Connection. 2) Implement a MyConnectionImpl class that implements the MyConnection interface. > > If so, there is a > > good reason for this > > (which I'll explain). > > >The suspense is killing me :)