[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jacorb-bugs
Subject:    [jacorb-bugs] bug (?) in JBoss RMI-IIOP
From:       "Dim Jim" <levadura () mail ! ru>
Date:       2002-07-24 6:42:39
Message-ID: E17XFr5-000780-00 () f7 ! mail ! ru
[Download RAW message or body]

Hello! I got an "out of memory exeption" from jacorb in

CDRInputStream.java

*******************************************
    public final String read_string()
    {
        int i = 4 - index % 4;
        if(i != 4)
        {
            index += i;
            pos += i;
        }
        int j = _read4int(littleEndian, buffer, pos);
        index += 4;
        pos += 4;
        char ac[] = new char[j];
        for(int k = 0; k < j; k++)
            ac[k] = (char)(0xff & buffer[pos++]);

        index += j;
        if(j > 0 && ac[j - 1] == 0)
            return new String(ac, 0, j - 1);
        else
            return new String(ac);
    }
*********************************************
it tries to create an array with 1Gb :-(

I use SUN JDK 1.4.0_01 ORB to connect through RMI/IIOP to JBoss 3.0

Everything is OK. until I try to pass an POA (or BOA) object reference to the
server (to make a callback). The code works in SUN 131 RI

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

Here is the code:

*********************************************
    org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(new String[0], null);    
    POA rootpoa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
    rootpoa.the_POAManager().activate();
    
    org.omg.CORBA.Object ref = rootpoa.servant_to_reference(this);
    SessionCallback href = SessionCallbackHelper.narrow(ref);
    
    Context ctx = Connector.getContext();
    
    java.lang.Object obj = ctx.lookup("OperatorSession");
    OperatorSessionHome home =
(OperatorSessionHome)javax.rmi.PortableRemoteObject.narrow(obj,
OperatorSessionHome.class);   
    OperatorSession ses = home.create(333, href);

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

Thank you very much.


------------------------------------
Mail.Ru - удо но, доступно, надежно!
------------------------------------

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic