[omniORB] operator new in a CORBA method

Claudio Eccher ceccher@gsttn.it
Tue, 11 Dec 2001 15:08:54 +0100


Hallo,
I'm a beginner in developing CORBA applications, so I apologize for the
simple question.
I'm trying to implement a method in which I use this code:

typedef struct {
	char *pCommand;
	BYTE bKey;
	bool bAlt, bCtrl, bShift;
	void	*next;
} TList;

CORBA::Long MyMethod()
{
	TList*	item;
	item =NULL;

	item =new TList; //during the first invocation this instruction cause the
end of the method

	.............other stuff
}

When the client (a COM+ object) and the server are on the same computer it
works very well.
When I use the server on a remote machine, the first time MyMethod() is
invoked there is an exception in allocating the TList structure:

item = new TList;

and the method immediately returns.
If the client calls MyMethod() again, the TList structure is regurarly
allocated, why?
The new operator works always well when invoked from main().

Claudio Eccher
Gruppo Soluzioni Tecnologiche
Via Maccani 54
38100 Trento
tel. 0461431323
cell. 3487110174
email ceccher@gsttn.it