Re: time service
- From: Bowie Owens <bowie owens csiro au>
- To: Alexis Muller <Alexis Muller lifl fr>
- Cc: orbitcpp <orbitcpp-list gnome org>
- Subject: Re: time service
- Date: Fri, 20 Feb 2004 13:25:24 +1100
Alexis Muller wrote:
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
Hi,
For learn to use orbitcpp I developed the time service.
I don't know if my code is good for an orbitcpp program and it's not OMG
specification compliant (I don't know how to convert unix time to utc
time), but it's work. (Available here :
http://www.lifl.fr/~mullera/orbitcpp
<http://www.lifl.fr/%7Emullera/orbitcpp>)
Thanks for letting us know. It is interesting to hear about what other
people have done.
Can you tell me if I've done some mistakes ?
When you throw exceptions you have written:
throw new X();
You don't need to new allocate the exception rather you should just write:
throw X();
There is a problem with memory management. In a number places you have
written:
return (new X(...))->_this();
There is now way to reclaim the memory allocated by this statement once
the object is no longer useful. This isn't such a big problem in this
case because there is no way for the client to signal the server that
the object is no longer being used. Although I noticed some people added
a destroy method to do this:
http://www.dnw-germany.aero/~wagner/Corba/CorbaIDL/projects/IDL/CosTime.idl.html
That said, allocating a chunk of memory per object might be slow and
lead to memory fragementation. It might be better to use something like
std::deque to ensure that you allocate memory in larger blocks.
Normally you would need to store a reference to your servant object so
that it can be deactivated, destructed, deallocated.
Did someone work on CORBA standard service for ORBit (other than Naming
service) ?
I don't think so. As far as ORBit goes bonobo and the object activation
framework has always been the priority.
--
Bowie Owens
CSIRO Mathematical & Information Sciences
phone : +61 3 9545 8055
fax : +61 3 9545 8080
mobile : 0425 729 875
email : Bowie Owens csiro au
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]