Re: WebLogic
Deb June <[email protected]> Wed, 26 Feb 2003 16:49:53 -0500
| Newsgroups | gmane.comp.java.sun.connector |
|---|---|
| Message-ID | <[email protected]> |
Jason, It looks like your cce falls in the category of "the connection object returned from a connection request is cast as a Connection class". We fixed this in 8.1 (which hasn't been released yet but expect a public Beta soon). Unfortunately, you'll need to wait for this fix until then. Sorry :-( Deb > > 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. > >Deb, > >Thanks for taking the time to reply both to the group >and to my personal email. I've attempted your >suggestions but I'm still having the same problem. >Maybe I misinterpreted something in your suggestion. > >Before I explain in detail, what I've done I wanted to >post my stack trace one more time. Here it is: > >java.lang.ClassCastException: >javax.naming.CompositeName > at >weblogic.connector.common.internal.SecurityContext.list(SecurityContext.java:459) > at >weblogic.connector.common.internal.SecurityContext.list(SecurityContext.java:443) > at >weblogic.connector.common.internal.SecurityContext.checkResourceReference(SecurityContext.java:428) > at >weblogic.connector.common.internal.SecurityContext.initSecurityContext(SecurityContext.java:98) > at >weblogic.connector.common.internal.SecurityContext.<init>(SecurityContext.java:77) > at >weblogic.connector.common.internal.ConnectionPool.getConnection(ConnectionPool.java:1704) > at >weblogic.connector.common.internal.ConnectionPoolManager.getConnection(ConnectionPoolManager.java:190) > at >weblogic.connector.common.internal.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:25) > at >com.mycompany.resource.impl.ConnectionFactoryImpl.getConnection(ConnectionFactoryImpl.java:183) > at jsp_servlet.__main._jspService(__main.java:118) > at >weblogic.servlet.jsp.JspBase.service(JspBase.java:27) > at >weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1058) > at >weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:401) > at >weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306) > at >weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5445) > at >weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:780) > at >weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3105) > at >weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2588) > at >weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213) > at >weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189) > >The reason I'm reposting this is to point out that the >cce occurs from within this line of my >ConnectionFactoryImpl: > > Connection conn = (Connection) >m_cm.allocateConnection(m_mcf, info); > >It doesn't seem as though I've even done a cast yet! >Do you still think that your diagnosis is correct? >Thanks. > >-Jason > > > > > >__________________________________________________ >Do you Yahoo!? >Yahoo! Tax Center - forms, calculators, tips, more >http://taxes.yahoo.com/ > >=========================================================================== >To unsubscribe, send email to [email protected] and include in the body >of the message "signoff CONNECTOR-INTEREST". For general help, send email to >[email protected] and include in the body of the message "help". =========================================================================== To unsubscribe, send email to [email protected] and include in the body of the message "signoff CONNECTOR-INTEREST". For general help, send email to [email protected] and include in the body of the message "help".