I know this must be a FAQ, but...



... I've been searching the web for about 2 hours without any
success, so I'm going to have to post this simple question here.

I've been trying to do EJB-style CORBA: i.e. there's only one object for
each 'entity' in the program, obtained through a 'find' request on a
factory. The factory uses a GHashtable to store object references, but I
know this isn't right, because when an object reference is returned by the
find() function, it is released by the skeleton.

That's not very clear. This is what I want:
1)	find("fred") - fred has not been requested before, object is
	constructed, some kind of reference kept, and reference returned.
2)	find("fred") - fred has been found before, previous object somehow
	obtained and reference returned.

A nice extra feature would be to timeout objects from the hashtable which
haven't been accessed for a while, but I can worry about that later..

Hope someone can help!

Gareth





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]