[omniORB] Object Factory

ryan.tecco rtecco@voxel.ummu.umich.edu
Tue, 2 Nov 1999 12:35:19 -0500 (EST)


Hello all. In this following simple code for an object factory:

 ThingOne_ptr makeThing( Type type )
    {
      ThingOne_var tempo;
      ThingTwo_var tempt;
      ThingThree_var tempth;
      ThingFour_var tempf;
      switch( type ) {
      case TONE:
	cout << "Making a new ThingOne!" << endl;
	tone = new ThingOne_impl();
	tone->_obj_is_ready( tone->_boa() );
	tempo = tone->_this();
	return tempo;
	break;
      case TTWO:
	cout << "Making a new ThingTwo!" << endl;
	ttwo = new ThingTwo_impl();
	ttwo->_obj_is_ready( ttwo->_boa() );
	tempt = ttwo->_this();
	return tempt;
	break;
     
	...and so on through the different types

I get the client to recieve a valid (non-nil) object reference, but
subsequent attempts to contact the object raise a "OBJECT_NOT_EXIST" 
exception.

Any thing simple I am not doing off the bat?

--------------
ryan.tecco
734.476.6646
the university of michigan
"i'll never forget my life 
as a carrot."