JDK-4764130 : ClientDelegate.addServiceContexts() records connections prematurely
  • Type: Bug
  • Component: other-libs
  • Sub-Component: corba:orb
  • Affected Version: 1.4.1
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2002-10-16
  • Updated: 2002-12-10
  • Resolved: 2004-12-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other Other
1.4.1 02Fixed 1.4.2Fixed
Description
> ClientDelegate.addServiceContexts() records in the connection whether or
> not the SendingContextRuntime has been sent or not. However, if
> ForwardRequest occurs
> we end up at ClientDelegate.createRequest (661) we then throw away the
> service contexts and start again. If the connection for the forwarded
> invoke is the _same_ as that of the original we will have recorded that we
> sent SendingContextRuntime when actually we may not have.
> 
> The attached patch fixes the problem by only recording that
> SendingContextRuntime was sent at the last possible moment.

There is also a test case in the attachment.

******************************************************************************

###@###.### 2002-12-10

Fix verified OK

With build - j2sdk-1_4_2-beta-bin-b09-solaris-sparcv9-04_dec_2002
With test - /net/anybodys/export1/ws/rip-int-mantis/test/src/share/classes/mantis/m4764130

******************************************************************************

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.4.1_02 mantis FIXED IN: 1.4.1_02 mantis INTEGRATED IN: 1.4.1_02 mantis mantis-b06 VERIFIED IN: mantis-beta
14-06-2004

EVALUATION It's a bug
11-06-2004

SUGGESTED FIX this suggested fix is from BEA, the diff is against j2se1.4.1. > ------------------------------------------------------------------------ > --- com/sun/corba/se/internal/corba/ClientDelegate.java.dist 2002-10-07 13:17:31.000000000 -0700 > +++ com/sun/corba/se/internal/corba/ClientDelegate.java 2002-10-10 12:43:38.000000000 -0700 > @@ -498,7 +498,6 @@ > > // NOTE : We only want to send the runtime context the first time > if ((c != null) && !c.isPostInitialContexts()) { > - c.setPostInitialContexts(); > SendingContextServiceContext scsc = > new SendingContextServiceContext( orb.getServantIOR() ) ; //d11638 > try { > --- com/sun/corba/se/internal/iiop/ClientRequestImpl.java.dist 2002-10-10 12:42:49.000000000 -0700 > +++ com/sun/corba/se/internal/iiop/ClientRequestImpl.java 2002-10-10 12:47:00.000000000 -0700 > @@ -73,6 +73,10 @@ > > public ClientResponse invoke() > { > + // Only record that we have sent the SendingContextRuntime > + // when we know for sure. > + if (!conn.isPostInitialContexts()) > + conn.setPostInitialContexts(); > return (ClientResponse)super.invoke(isOneway); > } >
11-06-2004