Re: WebLogic

David Jencks <[email protected]> Tue, 25 Feb 2003 12:49:37 -0500
Newsgroups gmane.comp.java.sun.connector
Message-ID <[email protected]>
On Tuesday, February 25, 2003, at 12:31 PM, Deb June wrote:

> 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.

I'm rather curious as to why you made this design decision since as far 
as I can see the same information is available through the 
ConnectionManager.   Using the connection manager seems to work fine in 
JBoss.  Is there something in the spec that requires this style of 
implementation?

>
> 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.

By wrapping the connection factory as well, can't you provide the proxy 
wrapper after  it has passed through the ra's connection factory, thus 
eliminating this source of cce?
> 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.

I would guess that you have to specify the MyConnectionImpl interface 
as the connection interface in ra.xml in order for wl to generate the 
correct proxy?

Thanks
david jencks

>
>
> > If so, there is a
> > good reason for this
> > (which I'll explain).
>
>
> The suspense is killing me :)
>
>