dev@glassfish.java.net

difference in vmcid (SUN vs OMG) and minor code (off by 200) between GF 2.1 and GF 3.1.1

From: Koper, Dies <diesk_at_fast.au.fujitsu.com>
Date: Thu, 13 Oct 2011 09:19:28 +1100

Hi Harshad,

We noticed getting different vmcid and minor codes between GF 2.1 and GF
3.1.1.
Could you confirm this change was not intentional?

For example, in case of a connection failure due to a non-existing
destination server:

- GF 2.1.x:org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201
completed: No
- GF 3.1.1:org.omg.CORBA.COMM_FAILURE: vmcid: OMG minor code: 1
completed: No

In case of a communications timeout while waiting for a response:

- GF 2.1.x:org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 219
completed: Maybe
- GF 3.1.1:org.omg.CORBA.COMM_FAILURE: vmcid: OMG minor code: 19
completed: Maybe

The following excerpt from the code seems to indicate it's a bug:

src\share\classes\com\sun\corba\se\spi\orbutil\logex\corba\CorbaExtensio
n.java

        final int base = orbex.omgException() ?
            SUNVMCID.value :
            OMGVMCID.value ;

(it looks like the two values were placed the wrong way around)

About the minor codes, they are calculated in the same class using
"200*orbex.group() + log.id()".
Shouldn't the group indices start from 1, as below?

    public static final int ORBUtilGroup = 1 ;
    public static final int ActivationGroup = 2 ;
    public static final int NamingGroup = 3 ;
    public static final int InterceptorsGroup = 4 ;
    public static final int POAGroup = 5 ;
    public static final int IORGroup = 6 ;
    public static final int UtilGroup = 7 ;

Thanks,
Dies