United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4764130 : ClientDelegate.addServiceContexts() records connections prematurely

Details
Type:
Bug
Submit Date:
2002-10-16
Status:
Closed
Updated Date:
2002-12-10
Project Name:
JDK
Resolved Date:
2004-12-10
Component:
other-libs
OS:
generic
Sub-Component:
corba:orb
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
1.4.1
Fixed Versions:
1.4.1 (02)

Related Reports
Backport:

Sub Tasks

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


                                     
2004-06-14
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);
>      }
>
                                     
2004-06-11
EVALUATION

It's a bug
                                     
2004-06-11



Hardware and Software, Engineered to Work Together