From knemeyer@ix.netcom.com Sat Jan 2 10:22:54 1999 From: knemeyer@ix.netcom.com (Manfred Knemeyer) Date: Sat, 2 Jan 1999 03:22:54 -0700 Subject: [omniORB] Help Please - Unable to contact naming service on Windows-95 Message-ID: <000301be363a$5c0b4c80$b799d6ce@default> This is a multi-part message in MIME format. ------=_NextPart_000_0000_01BE35FF.AFAC7480 Content-Type: text/plain; charset="windows-1250" Content-Transfer-Encoding: quoted-printable Hopefully someone can suggest why I am not able to run omniORB2 on my standalone Windows-95 system. I have not been able to find obviously relevant info in the archives. Any help will be appreciated. I very much would like to experiment and learn using omniOrb2. To narrow the problem, I have tried to list all of the details below. Thanks for your patience in reading them. knemeyer@ix.netcom.com I have installed the Windows-95 binary release of version 2.6.0 and rebuilt the echo examples (only) with MSC++ 6 + Patchkit 1 and gnu-win32-lite. The rebuilt example eg1 runs successfully, eg2's IOR argument exceeds the DOS window cmd line length limit, and eg3 fails in trying to contact the naming service. The environment variable OMNIORB2_CONFIG is set to the filepath of the configuration file (added after initial failures) which contains: NAMESERVICE IOR:. . . ORBInitialHost localhost ORBInitialPort 12345 Registry also contains the above 3 values; the IOR has been checked against the nameservice.exe startup message; localhost is the only entry in the \WINDOWS\Hosts file; the system was rebooted. omninames (not rebuilt) is running: Checkpointing completed. eg3_impl started, then eg3_clt started (in DOS windows). After some delay ... eg3_impl: Caught system exception COMM_FAILURE, unable to contact the = naming service. eg3_clt: Caught system exception COMM_FAILURE, unable to contact the = naming service. hello: cannot invoke on a nil object reference. omninames is still running. ------=_NextPart_000_0000_01BE35FF.AFAC7480 Content-Type: text/html; charset="windows-1250" Content-Transfer-Encoding: quoted-printable
Hopefully = someone can suggest=20 why I am not able to run omniORB2
on my standalone Windows-95 system.  = I have not=20 been able to find
obviously relevant info in the=20 archives.  Any help will be
appreciated.  I very much = would like=20 to experiment and learn using
omniOrb2.  To narrow the = problem, I=20 have tried to list all of the
details below.  Thanks for = your=20 patience in reading them.
 
knemeyer@ix.netcom.com<= /DIV>
 
I have = installed the=20 Windows-95 binary release of version 2.6.0
and rebuilt the = echo examples=20 (only) with MSC++ 6 + Patchkit 1 and
gnu-win32-lite.  The=20 rebuilt example eg1 runs=20 successfully,
eg2's IOR argument exceeds the DOS window cmd line length=20 limit,
and eg3 fails in trying to = contact the=20 naming service.
 
The = environment =20 variable OMNIORB2_CONFIG is set to the filepath
of the configuration file (added after = initial=20 failures) which
contains:
NAMESERVICE IOR:. . = .
ORBInitialHost = localhost
ORBInitialPort = 12345
 
Registry also contains the = above 3 values;=20 the IOR has been checked
against the nameservice.exe = startup=20 message; localhost is the only
entry in the \WINDOWS\Hosts = file; the=20 system was rebooted.
 
omninames (not rebuilt) is running: Checkpointing=20 completed.
 
eg3_impl = started, then=20 eg3_clt started (in DOS windows).
 
After some delay = ...
 
eg3_impl: Caught system = exception=20 COMM_FAILURE, unable to contact the naming service.
eg3_clt: Caught = system=20 exception COMM_FAILURE, unable to contact the naming service.
hello: = cannot=20 invoke on a nil object reference.
omninames is = still=20 running.
 
 
------=_NextPart_000_0000_01BE35FF.AFAC7480-- From Hugo.Vandeputte@meteo.fr Mon Jan 4 11:44:58 1999 From: Hugo.Vandeputte@meteo.fr (Hugo.Vandeputte) Date: Mon, 04 Jan 1999 12:44:58 +0100 Subject: [omniORB] Instantiating objects within (an initially) non executing server References: <199812311311.IAA16648@lion.gte.com> Message-ID: <3690A9BA.71FAB17D@meteo.fr> Gary D. Duzan wrote: > > The short answer is that no, this functionality is not available out > of the box. I believe there are hooks that can let you write a bit of > code to activate the object yourself, but that's it. > > Gary Duzan > GTE Laboratories I am actually working on an example and testsuite on load balancing and server starting on omniOrb (on unix). It's maybe not the better solution,but I hope it could help someone. First release in one or two weeks... Regards. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ H.Vandeputte o o o SCEM/TTI/DEV o o o mailto:Hugo.Vandeputte@meteo.fr _____ _ o __/_ Tel: 05.61.07.81.91 (_____)/ \ /o \/| _____/ ___ _// >____/\| _/_______/ ___/ / / /_/ /_/ ____________________________________________________________________ From dbyron@coactive.com Mon Jan 4 23:43:58 1999 From: dbyron@coactive.com (David Byron) Date: Mon, 04 Jan 1999 15:43:58 -0800 Subject: [omniORB] namespace handling when a compiler doesn't support it Message-ID: <3.0.5.32.19990104154358.00b10640@refuge> Apologies if this has been dealt with before, but the archive search was down when I tried to look.... I am porting OmniORB2 to a compiler that doesn't support namespaces (Diab, for those interested). The macros for dealing with namespaces when the compiler doesn't put code for a particular namespace in a class. I have multiple files that share a namespace, as in: file1.idl --------- module foo { // some declarations }; file2.idl --------- #include "file1.idl" module foo { // some more declarations }; In file2.hh, this becomes: #include class foo { // some more declarations, turned into C++ } Unfortunately, the stubs are trying to declare class foo twice, which my compiler flags as an error. Am I using namespaces in an unexpected way, or is there another way to define the _CORBA_MODULE... macros to deal with this? I can remove the namespace if I must, but I'd rather not. Thanks for your help. -DB --- David Byron dbyron@coactive.com Coactive Networks, Inc. http://www.coactive.com 4000 Bridgeway, Suite 303 voice:(415)289-1722 Sausalito, CA 94965 fax:(415)289-1320 From dcmay@object-workshops.com Tue Jan 5 01:32:24 1999 From: dcmay@object-workshops.com (Dietmar May) Date: Mon, 4 Jan 1999 20:32:24 -0500 Subject: [omniORB] namespace handling when a compiler doesn't support it Message-ID: David, > I am porting OmniORB2 to a compiler that doesn't support namespaces (Diab, for > those interested). The macros for dealing with namespaces when the compiler > doesn't put code for a particular namespace in a class. Orbix (pre-namespace circa ver. 2.2) handled this using concatenation of the module name with the interface name, separated by '_'. This generates: class foo_yourclass : ... { ... }; This is similar to the COM mapping in the CORBA interoperability spec, chapter 13. However, I don't think that omniORB can support this without changes (don't know how much would be required, but pretty sure you'd have to change omniORB sources in omni2idl). Look in src/tool/omniidl2/omniORB2_be/o2be_interface.cc (and o2be_constant.cc, etc). This is where the .hh and .cc generators are located. For instance: void o2be_interface::produce_hdr(std::fstream &s) { ... IND(s); s << "class " << uqname() << "_Helper {\n"; ... } See also o2be_name in src/tool/omniidl2/omniORB2_be/o2be.h. The method fqname() seems to return the fully qualified name (ie. scope name + unqualified name). If you can change uqname() to test a flag (that indicates whether to use concatenation), and return either the original value of uqname() or return fqname(), it may be pretty simple. Hope this is helpful. Regards, Dietmar May Software Architect Object Workshops, Inc. dcmay@object-workshops.com From objectdata@siliware.com Mon Jan 4 19:38:47 1999 From: objectdata@siliware.com (objectdata) Date: Mon, 04 Jan 1999 19:38:47 +0000 Subject: [omniORB] The Jini Community Message-ID: <369118C6.AC4E0B98@siliware.com> Sorry for the interruption. The Jini Community is a new gathering place where developers can discuss Javasoft's Jini technology. It has chat rooms, web board, security, email listserv, and search engine. The url for the new site is http://jini.siliware.com. Currently, we are seeking strategic alliances, partners, forum administrators, volunteers, and Jini related news, products, demos, and tutorials. If you or someone you know would like to participate in making Jini products and services or just simple wish to work with Jini, please let us know. You can become a forum administrator, showcase your Jini products and services, and exchange links to your Jini website. Take advantage of Javasoft's Source Community License. If you have not downloaded Jini and compiled the examples, you don't know what your missing. Jini is the next wave! Why not become a part of it. You got where you are by working harder than the next guy. Here is your chance to do it again. http://jini.siliware.com Jini Community Administrator Siliware, Inc. 45 Rockefeller Center, 20th Floor New York, NY 10111 Voice 212-332-8193 From dbyron@coactive.com Tue Jan 5 00:51:21 1999 From: dbyron@coactive.com (David Byron) Date: Mon, 04 Jan 1999 16:51:21 -0800 Subject: [omniORB] namespace handling when a compiler doesn't support it In-Reply-To: Message-ID: <3.0.5.32.19990104165121.00b07df0@refuge> >> I am porting OmniORB2 to a compiler that doesn't support namespaces (Diab, >for >> those interested). The macros for dealing with namespaces when the compiler >> doesn't put code for a particular namespace in a class. > >Orbix (pre-namespace circa ver. 2.2) handled this using concatenation of the >module name with the interface name, separated by '_'. This generates: > >class foo_yourclass : ... >{ > ... >}; > >This is similar to the COM mapping in the CORBA interoperability spec, chapter >13. However, I don't think that omniORB can support this without changes (don't >know how much would be required, but pretty sure you'd have to change omniORB >sources in omni2idl). > >Look in src/tool/omniidl2/omniORB2_be/o2be_interface.cc (and o2be_constant.cc, >etc). This is where the .hh and .cc generators are located. > >For instance: > >void o2be_interface::produce_hdr(std::fstream &s) >{ > ... > IND(s); s << "class " << uqname() << "_Helper {\n"; > ... >} > >See also o2be_name in src/tool/omniidl2/omniORB2_be/o2be.h. > >The method fqname() seems to return the fully qualified name (ie. scope name + >unqualified name). > >If you can change uqname() to test a flag (that indicates whether to use >concatenation), and return either the original value of uqname() or return >fqname(), it may be pretty simple. > >Hope this is helpful. Thanks for the pointer. This gets me very close to what I need. I think the actual place I'll make the change is in o2be_module.cc in o2be_module::produce_hdr(). It generates a _CORBA_MODULE followed by the name of the module. CORBA_sysdep.h does the 'right thing' depending on whether namespaces are supported or not. It would be nice if I could make the macro in CORAB_sysdep.h really smart by using __FILE__, but it's inside quotes, and doesn't seem easily messed with, besides including the full path, etc. To do this properly, I suppose I'd add a command line parameter to omniidl2 to tell it how to behave. Unfortunately, it makes the generated code platform specific, instead of platform independent. Or maybe, I'll add a script to my makefile that greps for _CORBA_MODULE and makes the change for me. Has anyone else run into this problem, and found another solution? -DB --- David Byron dbyron@coactive.com Coactive Networks, Inc. http://www.coactive.com 4000 Bridgeway, Suite 303 voice:(415)289-1722 Sausalito, CA 94965 fax:(415)289-1320 From dbyron@coactive.com Tue Jan 5 02:11:14 1999 From: dbyron@coactive.com (David Byron) Date: Mon, 04 Jan 1999 18:11:14 -0800 Subject: [omniORB] namespace handling when a compiler doesn't support it In-Reply-To: <3.0.5.32.19990104165121.00b07df0@refuge> References: Message-ID: <3.0.5.32.19990104181114.00b0c1e0@refuge> >>> I am porting OmniORB2 to a compiler that doesn't support namespaces (Diab, >>for >>> those interested). The macros for dealing with namespaces when the compiler >>> doesn't put code for a particular namespace in a class. >> >>Orbix (pre-namespace circa ver. 2.2) handled this using concatenation of the >>module name with the interface name, separated by '_'. This generates: >> >>class foo_yourclass : ... >>{ >> ... >>}; >> >>This is similar to the COM mapping in the CORBA interoperability spec, chapter >>13. However, I don't think that omniORB can support this without changes (don't >>know how much would be required, but pretty sure you'd have to change omniORB >>sources in omni2idl). >> >>Look in src/tool/omniidl2/omniORB2_be/o2be_interface.cc (and o2be_constant.cc, >>etc). This is where the .hh and .cc generators are located. >> >>For instance: >> >>void o2be_interface::produce_hdr(std::fstream &s) >>{ >> ... >> IND(s); s << "class " << uqname() << "_Helper {\n"; >> ... >>} >> >>See also o2be_name in src/tool/omniidl2/omniORB2_be/o2be.h. >> >>The method fqname() seems to return the fully qualified name (ie. scope name + >>unqualified name). >> >>If you can change uqname() to test a flag (that indicates whether to use >>concatenation), and return either the original value of uqname() or return >>fqname(), it may be pretty simple. >> >>Hope this is helpful. > >Thanks for the pointer. This gets me very close to what I >need. I think the actual place I'll make the change is in >o2be_module.cc in o2be_module::produce_hdr(). It generates >a _CORBA_MODULE followed by the name of the module. >CORBA_sysdep.h does the 'right thing' depending on whether >namespaces are supported or not. It would be nice if I >could make the macro in CORAB_sysdep.h really smart by using >__FILE__, but it's inside quotes, and doesn't seem easily >messed with, besides including the full path, etc. To do >this properly, I suppose I'd add a command line parameter to >omniidl2 to tell it how to behave. Unfortunately, it makes >the generated code platform specific, instead of platform >independent. Or maybe, I'll add a script to my makefile >that greps for _CORBA_MODULE and makes the change for me. Hate to reply to myself, but.... The script to hack the module name is not enough. Or at least my simple one wasn't. Changes to omniidl seem to be required to make this work.... I'll post the changes to the IDL compiler if I can get the time to make them. For now, the namespaces have to go :( -DB --- David Byron dbyron@coactive.com Coactive Networks, Inc. http://www.coactive.com 4000 Bridgeway, Suite 303 voice:(415)289-1722 Sausalito, CA 94965 fax:(415)289-1320 From knemeyer@ix.netcom.com Wed Jan 6 15:25:33 1999 From: knemeyer@ix.netcom.com (Manfred Knemeyer) Date: Wed, 6 Jan 1999 08:25:33 -0700 Subject: [omniORB] Failure to connect to omninames Message-ID: <002001be3988$ce5ba2c0$a44bd6ce@default> This is a multi-part message in MIME format. ------=_NextPart_000_001D_01BE394E.20E0FA80 Content-Type: text/plain; charset="windows-1250" Content-Transfer-Encoding: quoted-printable On a standalone Windows-95 system without a network interface card, I can not connect to the names service. Do I need to configure TCP/IP for loop- back? If so, How do I do this? ------=_NextPart_000_001D_01BE394E.20E0FA80 Content-Type: text/html; charset="windows-1250" Content-Transfer-Encoding: quoted-printable
On a standalone = Windows-95 system=20 without a network
interface card, I can = not connect to=20 the names
service.  Do I need = to=20 configure TCP/IP for loop-
back?  If so, How = do I do=20 this?
 
------=_NextPart_000_001D_01BE394E.20E0FA80-- From djr@orl.co.uk Wed Jan 6 15:29:45 1999 From: djr@orl.co.uk (David Riddoch) Date: Wed, 6 Jan 1999 15:29:45 +0000 (GMT) Subject: [omniORB] Re: omniorb and java In-Reply-To: <367E9C42.CA89FDF2@erols.com> Message-ID: Thanks for the suggestion - this will appear in the next release. There will be two new command line options ... -ORBinConScanPeriod -ORBoutConScanPeriod Cheers, David On Mon, 21 Dec 1998, Armen Yampolsky wrote: > In working with Sun's Java CORBA libraries (Java IDL) client-side, we > have noticed another issue: Although setting the > omniORB::idleConnectionScanPeriod on our server gives us control over > omniORB's connection shutdown scheme, it is not a complete fix. Since > the omniNames service runs in its own process, it is not affected by our > settings and uses the default hard-coded 30 second scan period. You will > find that addressing it from a java ORB will fail after a >60 second > delay. We simply altered the omniNames.cc file in order to allow us to > set the timeout via command line. > > This may be a simple but very helpful addition to omniORB. IMHO, it > would give it a consistency (why can we set the timeout for one process > and not another?). Could we convince the developers to add it? > > Cheers, > -Armen > > -- > Armen Yampolsky > Axiom Software Labs > New York From S.Lo@orl.co.uk Wed Jan 6 17:39:39 1999 From: S.Lo@orl.co.uk (Sai-Lai Lo) Date: 06 Jan 1999 17:39:39 +0000 Subject: [omniORB] Re: Connection Handler In-Reply-To: Armen Yampolsky's message of "Tue, 22 Dec 1998 12:06:06 -0500" References: <367FD17E.4A738F3D@erols.com> Message-ID: <3or9t847xg.fsf@neem.cam-orl.co.uk> >>>>> Armen Yampolsky writes: > I posted this question to the mailing list, and received a good number > of responses essentially saying -- "I need to know too, when you find > out, please tell me!" But alas, no information has been forthcoming, so > I would like to ask you directly: > I need to implement strict object disposal on my server. Many of my > servants place locks on databases, and I need a guarantee that all locks > and resources belonging to a rogue (disconnected) client are freed, no > matter the reason for the connection loss. > In working with other ORB vendors, I had implemented an Evictor pattern, > wherein a map was maintained by the server, tracking all connected > clients and their respective objects. I had a handler for the > (proprietary) connected and aborted events. If a client dropped > unexpectedly, my server knew about it and cleaned up after it. Now I am > moving to omniORB2, and am looking for such a hook. I see the events > written to cerr if I crank up the debug level, so I know that somewhere, > the ORB knows about the client IP and knows when the client connects and > disconnects. I'll be looking into the source soon, but am hoping someone > can tell me of such a hook, or even recommend a "proper" way to do > distributed garbage collection with omniORB. Hi! Garbage collecting objects on the server when the clients have failed is a topic that has been discussed quite a few times on the mailing list in the past. You may want to check the archive for some of the proposed solutions. Unlike other ORBs, there is no way to insert a handler into omniORB2 to get a callback when a connection is made or when it is broken. It is my opinion that using the status of network connections to detect client failure is a poor way of doing the job and does not fit in very well with the CORBA framework. It is the job of the ORB to decide when is the best time to establish a connection and how many connections are necessary to communicate with the server. The ORB should also have the freedom to shutdown idle connections when it is appropriate. This is in conflict with the idea of allowing the application to deduce the status of the remote end purely from the status of the related network connections. Essentially what is required is for the server to associate a session with each client. All the objects created on the server within the session are linked together with a representation of the session in the server. When the session is closed or broken, the server can walk through the list and dispose of all its associated objects. The question then reduces to how to represent a session and detects when it has failed. There are various ways to do so. For example, a session can be represented as a CORBA object provided by the client. The server holds an object reference to this session object. Periodically, a thread in the server checks if the session object can still be contacted. If communication with the session object fails, the server thread does the garbage collection. Of course there should also be a fast way for the client to close a session orderly. The refresh mechanism used by the server is only meant to be a last resort to detect client failures. Regards, Sai-Lai -- Dr. Sai-Lai Lo | Research Scientist | E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab | 24a Trumpington Street Tel: +44 223 343000 | Cambridge CB2 1QA Fax: +44 223 313542 | ENGLAND From doug@clark.net Thu Jan 7 01:15:13 1999 From: doug@clark.net (Doug Anderson) Date: Wed, 6 Jan 1999 20:15:13 -0500 Subject: [omniORB] Re: Connection Handler Message-ID: <001601be39db$2e073d40$0500000a@cc702523-a.hwrd1.md.home.com> Hi, Sai Lai wrote: >Unlike other ORBs, there is no way to insert a handler into omniORB2 to get >a callback when a connection is made or when it is broken. It is my opinion >that using the status of network connections to detect client failure is >a poor way of doing the job and does not fit in very well with the CORBA >framework. It is the job of the ORB to decide when is the best time to >establish a connection and how many connections are necessary to communicate >with the server. Not to mention the fact that this would not work well in a connection-LESS GIOP implementation, ala IIOP over UDP?? (if and when such a beast becomes commonplace!) Doug From janssen@parc.xerox.com Thu Jan 7 03:16:05 1999 From: janssen@parc.xerox.com (Bill Janssen) Date: Wed, 6 Jan 1999 19:16:05 PST Subject: [omniORB] Re: Connection Handler In-Reply-To: <3or9t847xg.fsf@neem.cam-orl.co.uk> References: <367FD17E.4A738F3D@erols.com> <3or9t847xg.fsf@neem.cam-orl.co.uk> Message-ID: Excerpts from ext.omniorb: 6-Jan-99 [omniORB] Re: Connection Ha.. Sai-Lai Lo@orl.co.uk (3640) > Unlike other ORBs, there is no way to insert a handler into omniORB2 to get > a callback when a connection is made or when it is broken. It is my opinion > that using the status of network connections to detect client failure is > a poor way of doing the job and does not fit in very well with the CORBA > framework. It is the job of the ORB to decide when is the best time to > establish a connection and how many connections are necessary to communicate > with the server. The ORB should also have the freedom to shutdown idle > connections when it is appropriate. This is in conflict with the idea of > allowing the application to deduce the status of the remote end purely from > the status of the related network connections. Exactly right. We do the same in ILU. > For example, a session can be > represented as a CORBA object provided by the client. The server holds an > object reference to this session object. Periodically, a thread in the > server checks if the session object can still be contacted. If > communication with the session object fails, the server thread does the > garbage collection. Of course there should also be a fast way for the > client to close a session orderly. The refresh mechanism used by the server > is only meant to be a last resort to detect client failures. This mechanism is built into ILU as part of our distributed garbage collection system. Bill From ayampolsky@erols.com Thu Jan 7 03:39:55 1999 From: ayampolsky@erols.com (Armen Yampolsky) Date: Wed, 06 Jan 1999 22:39:55 -0500 Subject: [omniORB] Re: Connection Handler References: <367FD17E.4A738F3D@erols.com> <3or9t847xg.fsf@neem.cam-orl.co.uk> Message-ID: <36942C8B.64D65ECD@erols.com> Thanks, my understanding is much clearer now. I will begin to implement a session-based evictor, and will write a thread that checks clients. I wanted to minimize client pings, but I guess it will not result in too much network traffic... Thank you for this clear explanation. Cheers, -Armen > Armen Yampolsky writes: > > In working with other ORB vendors, I had implemented an Evictor pattern, > > wherein a map was maintained by the server, tracking all connected > > clients and their respective objects. I had a handler for the > > (proprietary) connected and aborted events. If a client dropped > > unexpectedly, my server knew about it and cleaned up after it. Now I am > > moving to omniORB2, and am looking for such a hook. Sai-Lai Lo wrote: > It is the job of the ORB to decide when is the best time to > establish a connection and how many connections are necessary to communicate > with the server. The ORB should also have the freedom to shutdown idle > connections when it is appropriate. This is in conflict with the idea of > allowing the application to deduce the status of the remote end purely from > the status of the related network connections. > > Essentially what is required is for the server to associate a session with > each client. All the objects created on the server within the session are > linked together with a representation of the session in the server. When > the session is closed or broken, the server can walk through the list and > dispose of all its associated objects. > > The question then reduces to how to represent a session and detects when it > has failed. There are various ways to do so. For example, a session can be > represented as a CORBA object provided by the client. The server holds an > object reference to this session object. Periodically, a thread in the > server checks if the session object can still be contacted. If > communication with the session object fails, the server thread does the > garbage collection. Of course there should also be a fast way for the > client to close a session orderly. The refresh mechanism used by the server > is only meant to be a last resort to detect client failures. -- Armen Yampolsky Axiom Software Labs New York From dcmay@object-workshops.com Thu Jan 7 05:09:23 1999 From: dcmay@object-workshops.com (Dietmar May) Date: Thu, 7 Jan 1999 00:09:23 -0500 Subject: [omniORB] Re: Connection Handler Message-ID: Armen, > Thanks, my understanding is much clearer now. I will begin to implement a > session-based evictor, and will write a thread that checks clients. I wanted > to minimize client pings, but I guess it will not result in too much network > traffic... A factor in our handling of network connections is that we DON'T want clients to HAVE to be servers as well. You might consider whether it is acceptable for the client to notify the server that it is still active and using resources, rather than the server querying the client (which requires the client to become a server too). Most clients could perform an occasional keep-alive request during idle time (or GUI-timer) processing without requiring an extra thread. Regards, Dietmar May Software Architect Object Workshops, Inc. dcmay@object-workshops.com From myles@ams.co.nz Thu Jan 7 04:21:12 1999 From: myles@ams.co.nz (Myles Penlington) Date: Thu, 7 Jan 1999 17:21:12 +1300 Subject: [omniORB] Re: Connection Handler Message-ID: <01BE3A62.205C52C0@myles> A minor improvement on this is to borrow the concept of a watch dog = timer from real time embedded systems. So only ping the clients if the = timer expires. How the timer is reset for each session object is the tricky part.=20 The simplest method would be to add code for each CORBA method on the = server side object. eg ResetSessionTimer, i.e So whenever a call is made = to a method on the server side object, the sever side method resets the = watch dog timer for the session object from the originating session. Other variations could be to change the ping frequency/timer expiry = period, depending on the operations in progress. Myles Penlington. -----Original Message----- From: Armen Yampolsky [SMTP:ayampolsky@erols.com] Sent: Thursday, January 07, 1999 4:40 PM To: omniorb-list@orl.co.uk Subject: [omniORB] Re: Connection Handler Thanks, my understanding is much clearer now. I will begin to implement = a session-based evictor, and will write a thread that checks clients. I = wanted to minimize client pings, but I guess it will not result in too much = network traffic... Thank you for this clear explanation. Cheers, -Armen From gdd0@gte.com Thu Jan 7 14:10:32 1999 From: gdd0@gte.com (Gary D. Duzan) Date: Thu, 07 Jan 1999 09:10:32 -0500 Subject: [omniORB] Re: Connection Handler Message-ID: <199901071410.JAA25330@lion.gte.com> Well, strictly speaking you can't do GIOP over a connectionless transport since it is inherently connection-oriented, but not all CORBA communication has to be GIOP-based. Gary Duzan GTE Laboratories In Message <001601be39db$2e073d40$0500000a@cc702523-a.hwrd1.md.home.com> , "Doug Anderson" wrote: =>Hi, => =>Sai Lai wrote: =>>Unlike other ORBs, there is no way to insert a handler into omniORB2 to get =>>a callback when a connection is made or when it is broken. It is my opinion =>>that using the status of network connections to detect client failure is =>>a poor way of doing the job and does not fit in very well with the CORBA =>>framework. It is the job of the ORB to decide when is the best time to =>>establish a connection and how many connections are necessary to =>communicate =>>with the server. => =>Not to mention the fact that this would not work well in a connection-LESS =>GIOP implementation, ala IIOP over UDP?? (if and when such a beast =>becomes commonplace!) => =>Doug => => => From cbst@oce.nl Thu Jan 7 14:31:42 1999 From: cbst@oce.nl (Casper Stoel) Date: Thu, 07 Jan 1999 15:31:42 +0100 Subject: [omniORB] Porting omniEvents to NT? Message-ID: <3694C54E.F4F44E62@oce.nl> As will be clear from the subject, who has ported Paul Nader's omniEvents to NT? I am no porting wizard and could use some help in this task... Any pointers are welcome! Casper Stoel From dcmay@object-workshops.com Thu Jan 7 15:49:56 1999 From: dcmay@object-workshops.com (Dietmar May) Date: Thu, 7 Jan 1999 10:49:56 -0500 Subject: [omniORB] Re: Connection Handler Message-ID: > A minor improvement on this is to borrow the concept of a watch dog timer from > real time embedded systems. So only ping the clients if the timer expires. > > How the timer is reset for each session object is the tricky part. > > The simplest method would be to add code for each CORBA method on the server > side object. eg ResetSessionTimer, i.e So whenever a call is made to a method > on the server side object, the sever side method resets the watch dog timer > for the session object from the originating session. > > Other variations could be to change the ping frequency/timer expiry period, > depending on the operations in progress. > > Myles Penlington. Now, if only we could get the ORB to do this, perhaps changing the IDL compiler to call thru a function pointer (if set) in every dispatch() method ... we might have something like Armen was originally asking for. (It avoids the tediousness (as Stroustrup puts it) of repetitive code - and the accompanying propensity for errors). Now, the question is whether there is a unique handle for each client that could be used automatically (obviously not the socket handle), or does the client have to explicitly pass in a server-assigned handle as a parameter to each IDL call? ie. is it possible to uniquely and unambiguously identify a client based on connection parameters, given the abilty (and need) of the ORB to shut down and re-open connections? Dietmar From renzo.tomaselli@tecnotp.inet.it Thu Jan 7 16:50:33 1999 From: renzo.tomaselli@tecnotp.inet.it (Renzo Tomaselli) Date: Thu, 7 Jan 1999 17:50:33 +0100 Subject: [omniORB] Re: Connection Handler Message-ID: <199901071649.RAA13936@venere.inet.it> Hi, why not using contexts to avoid an extra parameter on each IDL call ? Identifying the client sounds much like identifying the principal for security reasons or identifying the current transaction for other purpose= s (the implicit way). Since the connection is out of this game, it seems to me that the client is the only subject enabled to specify its own identit= y as thread/process/host or whatever else. From long time ago discussions o= n this list about contexts, I remember they weren't much welcome; however having a client identity/principal identity/transaction control as extra parameters in each call would be terrific. Comments are much welcome, Renzo Tomaselli =20 -------------------------------------------------------------------------= -- TecnoTP s.n.c. Special Information System Design Maso Pelauchi I38050 Ronchi Valsugana, Trento TN ITALY Tel. +39 0461 773164 Fax. +39 0461 771514 e-mail: renzo.tomaselli@tecnotp.inet.it =20 -------------------------------------------------------------------------= -- ---------- > From: Dietmar May > To: 'Myles Penlington' ; 'Armen Yampolsky' ; omniorb-list@orl.co.uk > Subject: RE: [omniORB] Re: Connection Handler > Date: gioved=EC 7 gennaio 1999 16.49 >=20 >=20 > Now, if only we could get the ORB to do this, perhaps changing the IDL compiler=20 > to call thru a function pointer (if set) in every dispatch() method ... we=20 > might have something like Armen was originally asking for. (It avoids t= he > tediousness (as Stroustrup puts it) of repetitive code - and the accompanying=20 > propensity for errors). >=20 > Now, the question is whether there is a unique handle for each client that=20 > could be used automatically (obviously not the socket handle), or does the=20 > client have to explicitly pass in a server-assigned handle as a paramet= er to=20 > each IDL call? ie. is it possible to uniquely and unambiguously identif= y a=20 > client based on connection parameters, given the abilty (and need) of t= he ORB=20 > to shut down and re-open connections? >=20 > Dietmar >=20 >=20 From knemeyer@ix.netcom.com Sat Jan 9 05:40:45 1999 From: knemeyer@ix.netcom.com (Manfred Knemeyer) Date: Fri, 8 Jan 1999 22:40:45 -0700 Subject: [omniORB] Failure to connect to omninames Message-ID: <000401be3b92$9bfa78e0$a44bd6ce@default> Thank you for the response, Dietmar. The MS Loopback Adapter seems to be an NT thing; it is not available on Windows-95. My concern about loopback appears unfounded. A "localhost" configuration should be adequate. Sorry to learn that others also have not been able to get omninames to run on standalone Windows-95. >There is a loopback network device driver available under Windows (I think it's >95, not NT that has it). Try to change your network adapter to Microsoft >(801.3) MS Loopback. > >Sorry I can't be more specific: we only run NT here on machines with network >adapters, so I don't have a copy of Windows95 installed on any machines at >present. > >I also don't know if this will fix your underlying problem. I know that we've >had problems running omniNames under Win95 - never debugged the cause. > >Hope this is helpful. > >Regards, >Dietmar May From knemeyer@ix.netcom.com Sat Jan 9 05:45:48 1999 From: knemeyer@ix.netcom.com (Manfred Knemeyer) Date: Fri, 8 Jan 1999 22:45:48 -0700 Subject: [omniORB] Help Please - Unable to contact naming service on Windows-95 Message-ID: <001301be3b93$50a0cf60$a44bd6ce@default> This is a multi-part message in MIME format. ------=_NextPart_000_0010_01BE3B58.A2D23AC0 Content-Type: text/plain; charset="windows-1250" Content-Transfer-Encoding: quoted-printable Thank you for the response, Michael. I have rebuilt everything and still am not able to connect to omninames. Has anyone else been able to get the Windows-95 package to run on a standalone system? HI, try to recompile the whole omniorb2 package. I had the same problem = and it had been fixed afterwards. cu Michael Muchitsch -----Urspr=FCngliche Nachricht----- Von: Manfred Knemeyer An: omniORB Datum: Montag, 4. Januar 1999 11:07 Betreff: [omniORB] Help Please - Unable to contact naming = service on Windows-95 =20 =20 Hopefully someone can suggest why I am not able to run omniORB2 on my standalone Windows-95 system. I have not been able to = find obviously relevant info in the archives. Any help will be appreciated. I very much would like to experiment and learn = using omniOrb2. To narrow the problem, I have tried to list all of = the details below. Thanks for your patience in reading them. =20 knemeyer@ix.netcom.com =20 I have installed the Windows-95 binary release of version 2.6.0 and rebuilt the echo examples (only) with MSC++ 6 + Patchkit 1 = and gnu-win32-lite. The rebuilt example eg1 runs successfully, eg2's IOR argument exceeds the DOS window cmd line length limit, and eg3 fails in trying to contact the naming service. =20 The environment variable OMNIORB2_CONFIG is set to the filepath of the configuration file (added after initial failures) which contains: NAMESERVICE IOR:. . . ORBInitialHost localhost ORBInitialPort 12345 =20 Registry also contains the above 3 values; the IOR has been = checked against the nameservice.exe startup message; localhost is the = only entry in the \WINDOWS\Hosts file; the system was rebooted. =20 omninames (not rebuilt) is running: Checkpointing completed. =20 =20 eg3_impl started, then eg3_clt started (in DOS windows). =20 After some delay ... =20 eg3_impl: Caught system exception COMM_FAILURE, unable to = contact the naming service. =20 eg3_clt: Caught system exception COMM_FAILURE, unable to contact = the naming service. hello: cannot invoke on a nil object reference. =20 omninames is still running. =20 =20 ------=_NextPart_000_0010_01BE3B58.A2D23AC0 Content-Type: text/html; charset="windows-1250" Content-Transfer-Encoding: quoted-printable
Thank you for = the response,=20 Michael.
I have rebuilt everything and still am not = able
to connect to = omninames.
 
Has anyone else been able to = get the=20 Windows-95
package to run on a standalone=20 system?
HI,
try to recompile the whole omniorb2 package. I = had the=20 same problem and it had been fixed afterwards.
cu
Michael Muchitsch
-----Ursprüngliche=20 Nachricht-----
Von: Manfred Knemeyer <knemeyer@ix.netcom.com>
= An:=20 omniORB <omniorb-list@orl.co.uk>
= Datum:=20 Montag, 4. Januar 1999 11:07
Betreff: [omniORB] = Help=20 Please - Unable to contact naming service on=20 Windows-95

Hopefully someone can=20 suggest why I am not able to run omniORB2
on my standalone Windows-95 = system.  I=20 have not been able to find
obviously relevant info = in the=20 archives.  Any help will be
appreciated.  I = very much=20 would like to experiment and learn using
omniOrb2.  To = narrow the=20 problem, I have tried to list all of the
details below.  = Thanks for=20 your patience in reading them.
 
knemeyer@ix.netcom.com<= /DIV>
 
I have = installed the=20 Windows-95 binary release of version 2.6.0
and = rebuilt the echo=20 examples (only) with MSC++ 6 + Patchkit 1 and
gnu-win32-lite. =20 The rebuilt example = eg1 runs=20 successfully,
eg2's IOR argument = exceeds the DOS window cmd line = length=20 limit,
and eg3 fails in trying = to contact=20 the naming service.
 
The = environment =20 variable OMNIORB2_CONFIG is set to the filepath
of the configuration file (added = after initial=20 failures) which
contains:
NAMESERVICE IOR:. . = .
ORBInitialHost=20 localhost
ORBInitialPort = 12345
 
Registry also contains = the above 3=20 values; the IOR has been checked
against the = nameservice.exe startup=20 message; localhost is the only
entry in the = \WINDOWS\Hosts file;=20 the system was rebooted.
 
omninames (not rebuilt) is = running:=20 Checkpointing completed.
 
eg3_impl started,=20 then eg3_clt started (in DOS windows).
 
After some delay = ...
 
eg3_impl: Caught system = exception=20 COMM_FAILURE, unable to contact the naming = service.
eg3_clt: Caught=20 system exception COMM_FAILURE, unable to contact the naming=20 service.
hello: cannot invoke on a nil object=20 reference.
omninames is still=20 running.
 
 
------=_NextPart_000_0010_01BE3B58.A2D23AC0-- From knemeyer@ix.netcom.com Sat Jan 9 13:40:07 1999 From: knemeyer@ix.netcom.com (Manfred Knemeyer) Date: Sat, 9 Jan 1999 06:40:07 -0700 Subject: [omniORB] RE: Unable to contact naming service. Message-ID: <004901be3bd5$92f42820$bd4cd6ce@default> This is a multi-part message in MIME format. ------=_NextPart_000_0046_01BE3B9A.E5A12C20 Content-Type: text/plain; charset="windows-1250" Content-Transfer-Encoding: quoted-printable I have now finally been able to establish a connection to the naming service on a standalone Windows-95 system = without a network interface card. This required that dialup networking (DUN) be up and running (which connects to my ISP) before omninames is started - and DUN not then stopped. Any suggestions on how to get around this ? ------=_NextPart_000_0046_01BE3B9A.E5A12C20 Content-Type: text/html; charset="windows-1250" Content-Transfer-Encoding: quoted-printable
I have now = finally been able=20 to establish a
connection = to the naming service on a = standalone=20 Windows-95 system without a network interface card.
This required = that dialup=20 networking (DUN) be up
and running = (which connects=20 to my ISP) before
omninames is = started - and=20 DUN not then stopped.
Any suggestions = on how to=20 get around = this=20 ?
 
------=_NextPart_000_0046_01BE3B9A.E5A12C20-- From shichunhui@usa.net Mon Jan 11 02:14:30 1999 From: shichunhui@usa.net (shich) Date: Mon, 11 Jan 1999 10:14:30 +0800 Subject: [omniORB] how can I download omniORB Message-ID: <36995E86.92A07C44@usa.net> hi,I am a new comer,I have tried to download the omniORB for windows and solaris.But the ftp.orl.co.uk doesn't support broken-resume download so I always ended my download with broken file and broken heart.Anyone here would suggest a better site for me? From dbyron@coactive.com Tue Jan 12 00:19:29 1999 From: dbyron@coactive.com (David Byron) Date: Mon, 11 Jan 1999 16:19:29 -0800 Subject: [omniORB] method call in nbufferedstream.cc Message-ID: <3.0.5.32.19990111161929.00b33950@refuge> In nbufferedstream.cc, I'm having a problem compiling the following line of code from NetBufferedStream::WrUnlock() Strand_Sync::WrUnlock(); Strand_Sync comes from: typedef Strand::Sync Strand_Sync; in rope.h. Anyway, there is a static function in class Strand::Sync called WrUnlock. It's signature is: static void WrUnlock(Strand* s); >From this, it would appear that the call in nbufferedstream.cc is missing an argument. Another possibility is that the desired method is: void WrUnlock(_CORBA_Boolean held_rope_mutex=0); which is a protected method in class Strand::Sync. If this is the desired method, then the Strand_Sync:: would be removed. Doing this causes the code to compile fine. To note, I'm using the Metaware High C/C++ compiler... So the question is, which of the two WrUnlock methods is supposed to be called here? Thanks for your help. -DB --- David Byron dbyron@coactive.com Coactive Networks, Inc. http://www.coactive.com 4000 Bridgeway, Suite 303 voice:(415)289-1722 Sausalito, CA 94965 fax:(415)289-1320 From djr@orl.co.uk Tue Jan 12 09:12:29 1999 From: djr@orl.co.uk (David Riddoch) Date: Tue, 12 Jan 1999 09:12:29 +0000 (GMT) Subject: [omniORB] method call in nbufferedstream.cc In-Reply-To: <3.0.5.32.19990111161929.00b33950@refuge> Message-ID: On Mon, 11 Jan 1999, David Byron wrote: > In nbufferedstream.cc, I'm having a problem compiling the following > line of code from NetBufferedStream::WrUnlock() > > Strand_Sync::WrUnlock(); > > Strand_Sync comes from: > > typedef Strand::Sync Strand_Sync; > > in rope.h. > > Anyway, there is a static function in class Strand::Sync called > WrUnlock. It's signature is: > > static void WrUnlock(Strand* s); > > >From this, it would appear that the call in nbufferedstream.cc is > missing an argument. Another possibility is that the desired method is: > > void WrUnlock(_CORBA_Boolean held_rope_mutex=0); > > which is a protected method in class Strand::Sync. Yes its this one. > If this is the desired method, then the Strand_Sync:: would be removed. > Doing this causes the code to compile fine. To note, I'm using the > Metaware High C/C++ compiler... But Strand_Sync::WrUnlock() is being called from NetBufferedStream::WrUnlock(). If you remove the Strand_Sync:: then you will get a recursive call back into NetBufferedStream::WrUnlock(). Looks like you have a compiler bug. To work-around the problem try: Strand::Sync::WrUnlock(); Hope this solves the problem. David From bjornw@fairplay.no Tue Jan 12 15:55:30 1999 From: bjornw@fairplay.no (bjornw@fairplay.no) Date: 12 Jan 1999 16:55:30 +0100 Subject: [omniORB] To delete or not to delete.... Message-ID: Hi omniorbers! Let us say that I have a server that allocates a sequence of elements, and that the client deletes it. Is that it? The reason I'm asking is because I have a server that grows and grows and grows ...=20 Here is some pseudo code that illustrate a typical scenario // idl file typedef sequence long_seq; interface server { long_seq query(); }; // server-implementation long_seq * server::query() { long_seq *ptr =3D new long_seq; return ptr; } // client implementation long_seq *ptr =3D server->query(); delete ptr; bjornw> Sincerely ------------------------------------------------------- Bj=F8rn Wennberg email: bjornw@fairplay.no=20 ms: +47 950 82 657 Senior Programmer phone: +47 22405538 FairPlay International AS fax: +47 22405539 From djr@orl.co.uk Wed Jan 13 09:38:18 1999 From: djr@orl.co.uk (David Riddoch) Date: Wed, 13 Jan 1999 09:38:18 +0000 (GMT) Subject: [omniORB] To delete or not to delete.... In-Reply-To: Message-ID: As far as I know what you've done is correct. If you look in the stub code, you should see something like this ... CORBA::Boolean _sk_server::dispatch(...) { if (strcmp(_0RL_op,"query") =3D=3D 0) { ... long_seq_var _0RL_result; _0RL_result =3D query(); ... } ... } So the sequence should be deleted by the destructor of long_seq_var. Let us know if you find a leak in the ORB! Cheers, David On 12 Jan 1999 bjornw@fairplay.no wrote: > Hi omniorbers! >=20 > Let us say that I have a server that allocates a sequence of elements, > and that the client deletes it. Is that it? The reason I'm asking is > because I have a server that grows and grows and grows ...=20 >=20 > Here is some pseudo code that illustrate a typical scenario >=20 > // idl file > typedef sequence long_seq; >=20 > interface server { > long_seq query(); > }; >=20 > // server-implementation > long_seq * > server::query() > { > =09long_seq *ptr =3D new long_seq; > =09return ptr; > } >=20 > // client implementation > long_seq *ptr =3D server->query(); > delete ptr; >=20 > bjornw> Sincerely >=20 > ------------------------------------------------------- > Bj=F8rn Wennberg email: bjornw@fairplay.no=20 > ms: +47 950 82 657 > Senior Programmer phone: +47 22405538 > FairPlay International AS fax: +47 22405539 >=20 >=20 From Renzo Tomaselli" This is a multi-part message in MIME format. ------=_NextPart_000_00CD_01BE3EED.5284AAB0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi there, as a developer of a distributed imaging application which makes use = of OmniORB I run into some maintenance issues since the application is = packaged into a number of dlls connected through a dynamic loader. = Everything works fine as far as OmniORB is concerned. It happens that = modules which have indipendent life but some form of dependency (A calls = B methods) run into incompatibility problems such as changing a method = signature because IDL design changed but runtime or installation made a = poor job. A quick screening of OmniORB sources pointed out as the = version field of Interface Rep. Id is not used and it seems also that = IIOP doesn't transmit IntfRepID along requests. Woudn't it be a good = choice for version control of interdipendent objects ? Would it violate = any CORBA specs to have it transmitted from client stubs to the server = so that the implementation skeleton can check it against its own, = refusing to dispatch unmatched versions ? Comments are welcome, Renzo = Tomaselli =20 -------------------------------------------------------------------------= -- TecnoTP s.n.c. Special Information System Design Maso Pelauchi I38050 Ronchi Valsugana, Trento TN ITALY Tel. +39 0461 773164 Fax. +39 0461 771514 e-mail: renzo.tomaselli@eclipse-net.it =20 -------------------------------------------------------------------------= -- ------=_NextPart_000_00CD_01BE3EED.5284AAB0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi there,
    as a developer of = a=20 distributed imaging application which makes use of OmniORB I run into = some=20 maintenance issues since the application is packaged into a number of = dlls=20 connected through a dynamic loader. Everything works fine as far as = OmniORB is=20 concerned. It happens that modules which have indipendent life but some = form of=20 dependency (A calls B methods) run into incompatibility problems such as = changing a method signature because IDL design changed but runtime or=20 installation made a poor job. A quick screening of OmniORB sources = pointed out=20 as the version field of Interface Rep. Id is not used and it seems also = that=20 IIOP doesn't transmit IntfRepID along requests. Woudn't it be a good = choice for=20 version control of interdipendent objects ? Would it violate any CORBA = specs to=20 have it transmitted from client stubs to the server so that the = implementation=20 skeleton can check it against its own, refusing to dispatch = unmatched =20 versions ?
Comments are=20 welcome,
          &nbs= p;            = ;            =             &= nbsp;           &n= bsp;  =20 Renzo Tomaselli     =20
---------------------------------------------------------------------= ------
TecnoTP=20 s.n.c. Special Information System Design
Maso Pelauchi I38050 Ronchi=20 Valsugana,  Trento TN  ITALY
Tel. +39 0461=20 773164      Fax. +39 0461 771514
e-mail: renzo.tomaselli@eclipse-ne= t.it  =20
---------------------------------------------------------------------= ------
------=_NextPart_000_00CD_01BE3EED.5284AAB0-- From rshoup@tumbleweed.com Wed Jan 13 17:03:52 1999 From: rshoup@tumbleweed.com (Randy Shoup) Date: Wed, 13 Jan 1999 09:03:52 -0800 Subject: [omniORB] HTTP tunnelling issues? Message-ID: <369CD1F8.95670082@tumbleweed.com> All -- We are potentially considering developing an addition to omniORB to support ORB requests over HTTP (to tunnel under firewalls). I just wanted to query the folks on the list to see if there has been any work done on this by anyone else for omniORB. We are aware of Orbix's WonderWall product, but suspect (without proof) that this might not work in a purely omniORB environment. Before deciding to embark on this project, we also will look carefully at Sai Lai's suggestions about how to add an additional transport to omniORB (http://www.orl.co.uk:80/omniORB/archives/1998-02/0050.html). Any further issues that anyone might be aware of? If we do, in fact, develop this, we would of course make it available to the omniORB community at large. Judging by the several requests for this functionality on the list over time, I suspect that there is demand out there. Thanks, -- Randy _________________________________________________________________ Randy Shoup (650)569-3682 Software Architect rshoup@tumbleweed.com Tumbleweed Software Corporation From lavoie@proksim.com Wed Jan 13 19:39:32 1999 From: lavoie@proksim.com (Martin Lavoie) Date: Wed, 13 Jan 1999 14:39:32 -0500 Subject: [omniORB] omniORB 2.5.0 Message-ID: <41C174DACD99D211AD090008C760380D0917@proksim.com> Hi everyone, Anybody still has version 2.5.0 or know where I can get it ? We have old code here which does not compile because of IDL changes that we just want to execute for test purposes and we don't want to go back and patch it to work with 2.6.1. We use to have it on our server, but our server got robbed 8-(. So if you know where I can get it, I would appreciate a lot. I'm looking for the win32_x86 compiled version. thanks, - martin ------------------------------------------------------------------------= --------------- Martin Lavoie Proksim Software Inc. System Architect 425, Place Jacques-Cartier lavoie@proksim.com Suite 201 Tel: (514) 940-4263 Montr=E9al, Qu=E9bec Fax: (514) 940-9091 Canada. H2Y 3B1 ------------------------------------------------------------------------= --------------- L'imagination est plus importante que le savoir. (Imagination is more important than knowledge.)=20 Einstein (Albert), On Science. From dbyron@coactive.com Wed Jan 13 20:11:29 1999 From: dbyron@coactive.com (David Byron) Date: Wed, 13 Jan 1999 12:11:29 -0800 Subject: [omniORB] another module/namespace question Message-ID: <3.0.5.32.19990113121129.00b492f0@refuge> As my search for namespace-aware compilers continues, it appears there are (at least) three levels of namespace support: 1. none 2. as long as the contents of a namespace are declared in exactly one file 3. namespace declarations work even if they in multiple files I'm working with a compiler that falls into category 2 (MetaWare High C/C++ 4.0a), so I figured I'd structure my IDL files as follows: master.idl ---------- module my_module { #include #include #include ... }; instead of having module my_module inside each IDL file. I figured omniidl would create a stub file master.hh with something like: _CORBA_MODULE my_module _CORBA_MODULE_BEG #include #include #include ... _CORBA_MODULE_END Unfortunately, the actual master.hh that's generated looks something like: #include #include #include _CORBA_MODULE my_module _CORBA_MODULE_BEG _CORBA_MODULE_END Is my solution a valid one? Should I change the IDL compiler to do what I want? Thanks for your help. -DB --- David Byron dbyron@coactive.com Coactive Networks, Inc. http://www.coactive.com 4000 Bridgeway, Suite 303 voice:(415)289-1722 Sausalito, CA 94965 fax:(415)289-1320 From myles@ams.co.nz Wed Jan 13 21:19:50 1999 From: myles@ams.co.nz (Myles Penlington) Date: Thu, 14 Jan 1999 10:19:50 +1300 Subject: [omniORB] HTTP tunnelling issues? Message-ID: <01BE3FA7.6C138720@myles> The Inprise/Visibroker firewall/tunnelling product may work with OmniORB = - it just passes the requests through the firewall - have a look at = their website. >From what I have been told about Orbix's product - your suspicions would = be correct. Myles Penlington. -----Original Message----- From: Randy Shoup [SMTP:rshoup@tumbleweed.com] Sent: Thursday, January 14, 1999 6:04 AM To: omniorb-list@orl.co.uk Subject: [omniORB] HTTP tunnelling issues? All -- We are potentially considering developing an addition to omniORB to support ORB requests over HTTP (to tunnel under firewalls). I just wanted to query the folks on the list to see if there has been any work done on this by anyone else for omniORB. We are aware of Orbix's WonderWall product, but suspect (without proof) that this might not work in a purely omniORB environment. =20 Before deciding to embark on this project, we also will look carefully at Sai Lai's suggestions about how to add an additional transport to omniORB (http://www.orl.co.uk:80/omniORB/archives/1998-02/0050.html).=20 Any further issues that anyone might be aware of? If we do, in fact, develop this, we would of course make it available to the omniORB community at large. Judging by the several requests for this functionality on the list over time, I suspect that there is demand out there. Thanks, -- Randy _________________________________________________________________ =20 Randy Shoup (650)569-3682 =20 Software Architect rshoup@tumbleweed.com =20 Tumbleweed Software Corporation From rshoup@tumbleweed.com Thu Jan 14 03:46:51 1999 From: rshoup@tumbleweed.com (Randy Shoup) Date: Wed, 13 Jan 1999 19:46:51 -0800 Subject: [omniORB] SSL support status? Message-ID: <369D68AB.D4988563@tumbleweed.com> omniORB crew -- There have been some rumors of a working IIOP over SSL transport with omniORB (http://www.orl.co.uk/omniORB/archives/1998-11/0041.html). We would be very interested in SSL support, and may have to develop it ourselves if we can't beg, borrow, or steal it. We would prefer, of course, to leverage the hard work of others here :-) Is there a time-frame on when SSL support will be ready for prime time? The note I reference above says that you don't want to release it before IIOP1.1. Is IIOP1.1 required to get SSL to work with IIOP? -- Randy _________________________________________________________________ Randy Shoup (650)569-3682 Software Architect rshoup@tumbleweed.com Tumbleweed Software Corporation From djr@orl.co.uk Thu Jan 14 09:20:02 1999 From: djr@orl.co.uk (David Riddoch) Date: Thu, 14 Jan 1999 09:20:02 +0000 (GMT) Subject: [omniORB] another module/namespace question In-Reply-To: <3.0.5.32.19990113121129.00b492f0@refuge> Message-ID: David, When you #include an IDL file the compiler makes the assumption that you will also compile that file separately (to generate interface1.hh etc.). It will not produce stub code for the IDL in included files. To achieve a (partial) solution you could run the C pre-processor over master.idl yourself, remove the file and line number information (using sed or something) and IDL compile the result. I think this would be a lot less work than modifying the compiler yourself. David On Wed, 13 Jan 1999, David Byron wrote: > As my search for namespace-aware compilers continues, it appears there > are (at least) three levels of namespace support: > > 1. none > 2. as long as the contents of a namespace are declared in exactly one file > 3. namespace declarations work even if they in multiple files > > I'm working with a compiler that falls into category 2 (MetaWare High > C/C++ 4.0a), so I figured I'd structure my IDL files as follows: > > master.idl > ---------- > module my_module > { > #include > #include > #include > ... > }; > > instead of having module my_module inside each IDL file. > > I figured omniidl would create a stub file master.hh with something like: > > _CORBA_MODULE my_module > _CORBA_MODULE_BEG > > #include > #include > #include > ... > > _CORBA_MODULE_END > > Unfortunately, the actual master.hh that's generated looks something like: > > #include > #include > #include > > _CORBA_MODULE my_module > _CORBA_MODULE_BEG > > _CORBA_MODULE_END > > Is my solution a valid one? Should I change the IDL compiler to do > what I want? > > Thanks for your help. > > -DB > --- > David Byron dbyron@coactive.com > Coactive Networks, Inc. http://www.coactive.com > 4000 Bridgeway, Suite 303 voice:(415)289-1722 > Sausalito, CA 94965 fax:(415)289-1320 > > > From dmorgen@alum.mit.edu Thu Jan 14 21:20:33 1999 From: dmorgen@alum.mit.edu (David Morgenlender) Date: Thu, 14 Jan 1999 21:20:33 GMT Subject: [omniORB] #include in .IDL file works incorrectly!!! In-Reply-To: <3or9uisp1n.fsf@neem.cam-orl.co.uk> References: <366468EE.2615DB12@fairplay.no> <3or9uisp1n.fsf@neem.cam-orl.co.uk> Message-ID: <36a05c28.166031374@smtp.ne.mediaone.net> I'm trying to #include a .H file into my .IDL file. But the IDL compiler= is having problems: 1. If I do the #include within an interface, I get a "can't parse = statement" error & the compiler (omniidl2) crashes with a system exception. =20 2. So, for testing purposes, I moved the #include outside any interface = & tried again. I preceded the #include with a typedef statement, defining a type= used by the .H file. This compiled without error, but generated incorrect = code, e.g. in the .HH file: a. The #include statement is put at the front of the .HH file, while = the typedef is placed later, AFTER the #include, which requires it. b. The #include is for x.HH, when it should be for x.H. How can I get the IDL compiler to do what I need, which is handle a = struct defined within an interface, via a .H file, placing a typedef before the = struct? BTW, here's why I'm doing things this way ... I use the same struct in = different apps, some of which use CORBA, some of which use COM, & some of which use= both. The variables within the struct are carefully used so they generate = compatible data for both CORBA & COM, assuming the typedef mentioned above is = defined appropriately in both CORBA & COM .IDL files. I desperately want to = avoid having to define 2 different structs for CORBA & COM ... this is a very = large struct!!! =20 So I'm #include'ing one .H into both my CORBA & COM IDL files. I want to= do this within an interface, so the struct typedef is essentially given a = different name for CORBA than for COM, since one app will have both definitions. If the CORBA IDL compiler cannot be made to work with this approach, can = you suggest something better??? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Dave Morgenlender e-mail: dmorgen@alum.mit.edu =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D From dmorgen@alum.mit.edu Thu Jan 14 21:44:36 1999 From: dmorgen@alum.mit.edu (David Morgenlender) Date: Thu, 14 Jan 1999 21:44:36 GMT Subject: [omniORB] Re: #include in .IDL file works incorrectly!!! In-Reply-To: <36a05c28.166031374@smtp.ne.mediaone.net> References: <366468EE.2615DB12@fairplay.no> <3or9uisp1n.fsf@neem.cam-orl.co.uk> <36a05c28.166031374@smtp.ne.mediaone.net> Message-ID: <36a16353.167867423@smtp.ne.mediaone.net> One other thing I've tried, which doesn't provide a solution ... use = #define's instead of the typedef & to override the struct's name. The IDL compiler= seems to use the #define when reading the #include'd file. However, it doesn't= put it into the .HH file. So any C++ source file #include'ing the .HH file, = thinking this will provide definitions for the CORBA stuff will be disappointed = when it comes to the struct ... it won't have the overridden name & type; the = solution is to provide redundant #define's (or perhaps in a #include ... assuming = the IDL compiler doesn't have problems with this ... which it probably will by generating a #include for a non-existent .HH file). Actually, the C++ = file, which #include's the .HH file will not compile because of the #include = created for a non-existent .HH file! BTW, I just confirmed that this approach works on the COM side, except = for the struct being defined outside the interface. However, a #define works appropriately (i.e. the IDL compiler applies it to the struct definition = code being generated), so it can be used to specify a unique struct name. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Dave Morgenlender e-mail: dmorgen@alum.mit.edu =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D From rshoup@tumbleweed.com Fri Jan 15 02:15:26 1999 From: rshoup@tumbleweed.com (Randy Shoup) Date: Thu, 14 Jan 1999 18:15:26 -0800 Subject: [omniORB] SSL support status? References: <369D68AB.D4988563@tumbleweed.com> <3oiue97osj.fsf@neem.cam-orl.co.uk> Message-ID: <369EA4BE.B9D2F591@tumbleweed.com> Sai-Lai Lo wrote: > > Randy, > > >>>>> Randy Shoup writes: > > > There have been some rumors of a working IIOP over SSL transport with > > omniORB (http://www.orl.co.uk/omniORB/archives/1998-11/0041.html). We > > would be very interested in SSL support, and may have to develop it > > ourselves if we can't beg, borrow, or steal it. We would prefer, of > > course, to leverage the hard work of others here :-) > > I should be able to give you access to a version of omniORB with SSL > support in the next few days. Note that this version has not been subject > to vigorous testing and was done independent of the main development and > with omniORB_2.5.0. > > What I would like is to have your feedback on the API that we have added. > And of course any bug fixes you have done. Perfect. We've done some SSL stuff before, so hopefully we can give some constructive feedback. We'll also do the "vigorous testing" part :-), and would be happy to reintegrate the changes with 2.6.1 (or 2.7.0, if that becomes available soon). > > My intention is to integrate the stuff after the IIOP 1.1 work is done. > > > Is there a time-frame on when SSL support will be ready for prime > > time? The note I reference above says that you don't want to release it > > before IIOP1.1. Is IIOP1.1 required to get SSL to work with IIOP? > > The IIOP IOR extension to support SSL is defined in 1.1. So strictly > speaking omniORB should really talk IIOP 1.1 to get SSL to work but as far > as the message exchange is concern 1.0 will do. This was what I suspected. In my brief review of the OMG spec yesterday, it seemed like the IOR extensions are pretty much required for doing any sort of augmentation of the protocol (e.g., SSL, compression, etc.). It also seemed to me that the 1.1 IOR extensions might be required for introducing any alternate transport. I hope I am wrong, but I couldn't figure out how to shoehorn an alternate transport into an IIOP 1.0 profile, or similarly, how to give enough information through an IIOP 1.0 profile to help the ORB to make an intelligent decision between two transports. > > I have a bit of time at hand this week so I've started implementing > GIOP/IIOP 1.1. Once this is done, I may release a snapshot for people to > try out. That would be ideal. We'd be happy to beta test this. Thanks, -- Randy _________________________________________________________________ Randy Shoup (650)569-3682 Software Architect rshoup@tumbleweed.com Tumbleweed Software Corporation From bjornw@fairplay.no Fri Jan 15 12:55:51 1999 From: bjornw@fairplay.no (bjornw@fairplay.no) Date: 15 Jan 1999 13:55:51 +0100 Subject: [omniORB] Nasty omni_thread::sleep bug in posix.cc In-Reply-To: rshoup@tumbleweed.com's message of "Wed, 13 Jan 1999 19:46:51 -0800" References: <369D68AB.D4988563@tumbleweed.com> Message-ID: Hi there! If I'm calling omni_thread::sleep() with an argument greater that 2000 omni_thread:sleep() calls itself until my stack is full.... This only happens for platforms that do not use nanosleep(); Here is how it should be: void omni_thread::sleep(unsigned long secs, unsigned long nsecs /*=3D0*/) { ... if (nsecs > 2000) { // sleep(nsecs); // calls omni_thread::sleep(2000, 0); ::sleep(nsecs); // make sure we call correct sleep() } ... } bjornw> ------------------------------------------------------- Bj=F8rn Wennberg email: bjornw@fairplay.no=20 ms: +47 950 82 657 Senior Programmer phone: +47 22405538 FairPlay International AS fax: +47 22405539 From jlai@uswest.com Fri Jan 15 19:40:07 1999 From: jlai@uswest.com (Lai, Johnny) Date: Fri, 15 Jan 1999 12:40:07 -0700 Subject: [omniORB] Problem compiling 2.6.1 on HP-UX with aCC Message-ID: <93E5AA4FDA9FD011A53E00805FA74D430167F029@OMAEX01.mrg.uswest.com> I am having problem compiling 2.6.1 on HP-UX. When compiling posix.cc in the src/lib/omnithread directory, aCC gave these errors: aCC -c -g -I /opt/aCC/include -I /opt/HP-RT/usr/include +inst_v +DAportable -D_CMA_NOWRAPPERS_ -D_REENTRANT -DPthreadDraftVersion=4 -I. -I../../../include -D__hppa__ -D__hpux__ -D__OSVERSION __=10 -ldir posix.cc -o posix.o Error (future) 600: "/usr/include/stdio.h", line 79 # Type specifier is omitted; "int" is no longer assumed. typedef int64_t fpos64_t; /* 32bit position inside a file */ ^^^^^^^ Error 20: "/usr/include/stdio.h", line 79 # ',' expected before 'fpos64_t'. typedef int64_t fpos64_t; /* 32bit position inside a file */ ^^^^^^^^ .... .... The compile went fine until it got to the omnithread directory. Could this be an incompatibility between our pthread and aCC? Our pthread came with HP-RT developer's kit. Has anybody experienced similar problems? My system: HP-UX B.10.20 A 9000/829 HP aC++ Compiler S800 B3913DB A.01.07.01 HP-RT Developer's Kit B5487AA_APZ A.03.01 libcma.1: HP DCE/9000 1.5 Module: libcma.sl (Export) Date: Apr 29 1996 22:11:24 Thanks Johnny From gdd0@gte.com Fri Jan 15 20:12:33 1999 From: gdd0@gte.com (Gary D. Duzan) Date: Fri, 15 Jan 1999 15:12:33 -0500 Subject: [omniORB] Problem compiling 2.6.1 on HP-UX with aCC Message-ID: <199901152012.PAA22158@lion.gte.com> Just a guess from a quick look at the docs, but try adding the "-ext" flag to the compiler options. That may allow int64_t to be typedefed correctly. Gary Duzan GTE Laboratories In Message <93E5AA4FDA9FD011A53E00805FA74D430167F029@OMAEX01.mrg.uswest.com> , "Lai, Johnny" wrote: =>I am having problem compiling 2.6.1 on HP-UX. When compiling posix.cc in the =>src/lib/omnithread directory, aCC gave these errors: => =>aCC -c -g -I /opt/aCC/include -I /opt/HP-RT/usr/include +inst_v +DAportable =>-D_CMA_NOWRAPPERS_ -D_REENTRANT -DPthreadDraftVersion=4 -I. -I../../../include -D__hppa__ =>-D__hpux__ -D__OSVERSION __=10 -ldir posix.cc -o posix.o Error (future) 600: "/usr/include/stdio.h", line 79 # Type specifier is =>omitted; "int" is no longer assumed. typedef int64_t fpos64_t; /* 32bit position inside a file */ ^^^^^^^ Error 20: "/usr/include/stdio.h", line 79 # ',' expected before 'fpos64_t'. typedef int64_t fpos64_t; /* 32bit position inside a file */ ^^^^^^^^ .... =>.... => =>The compile went fine until it got to the omnithread directory. Could this =>be an incompatibility between our pthread and aCC? Our pthread came with =>HP-RT developer's kit. Has anybody experienced similar problems? => =>My system: =>HP-UX B.10.20 A 9000/829 =>HP aC++ Compiler S800 B3913DB A.01.07.01 =>HP-RT Developer's Kit B5487AA_APZ A.03.01 =>libcma.1: HP DCE/9000 1.5 Module: libcma.sl (Export) =>Date: Apr 29 1996 22:11:24 => =>Thanks =>Johnny => => From anders.ostling@neurope.ikea.com Sat Jan 16 18:04:47 1999 From: anders.ostling@neurope.ikea.com (Anders Vstling) Date: Sat, 16 Jan 1999 19:04:47 +0100 Subject: [omniORB] AIX runtime bomb Message-ID: <36A0D4BF.1E76C696@neurope.ikea.com> Hi AIX 4.2 RS/6000 (not PowerPC, only "Power") EGCS 1.1 Omniorb 2.6.1 (built using EGCS) My app bombs in (gdb) brea main Breakpoint 1 at 0x1000168c: file main.cxx, line 464. (gdb) r Starting program: /home/anos/acid/bin/acid Program received signal SIGSEGV, Segmentation fault. 0xd0311644 in pthread_key_create () (gdb) bt #0 0xd0311644 in pthread_key_create () #1 0xd031158c in pthread_key_create () #2 0xd0165538 in omni_thread::init_t::init_t () #3 0xd0167ef4 in global constructors keyed to omni_mutex::omni_mutex () #4 0xd01685e0 in _GLOBAL__FI_libomnithread_so () #5 0x100226ac in __do_global_ctors () #6 0x10022724 in __main () #7 0x10001688 in main () at main.cxx:455 #8 0x100001a0 in __start () (gdb) quit The program is running. Exit anyway? (y or n) y The program works fine on Linux /Anders From pooh@msu.ru Mon Jan 18 09:38:55 1999 From: pooh@msu.ru (Andrey Slepuhin) Date: Mon, 18 Jan 1999 12:38:55 +0300 (MEST) Subject: [omniORB] AIX runtime bomb In-Reply-To: <36A0D4BF.1E76C696@neurope.ikea.com> Message-ID: On 16-Jan-99 Anders Vstling wrote: > Hi > > AIX 4.2 RS/6000 (not PowerPC, only "Power") > EGCS 1.1 > Omniorb 2.6.1 (built using EGCS) > > My app bombs in > > (gdb) brea main > Breakpoint 1 at 0x1000168c: file main.cxx, line 464. > (gdb) r > Starting program: /home/anos/acid/bin/acid > > Program received signal SIGSEGV, Segmentation fault. > 0xd0311644 in pthread_key_create () > (gdb) bt >#0 0xd0311644 in pthread_key_create () >#1 0xd031158c in pthread_key_create () >#2 0xd0165538 in omni_thread::init_t::init_t () >#3 0xd0167ef4 in global constructors keyed to omni_mutex::omni_mutex () > >#4 0xd01685e0 in _GLOBAL__FI_libomnithread_so () >#5 0x100226ac in __do_global_ctors () >#6 0x10022724 in __main () >#7 0x10001688 in main () at main.cxx:455 >#8 0x100001a0 in __start () > (gdb) quit > The program is running. Exit anyway? (y or n) y > > The program works fine on Linux How do you link your program? The SIGSEGV above is typical when you link your program with non-thread-safe version of libc. Type dump -H and be sure that your program is linked against libc_r.a. Also note that by default egcs installation is not thread-safe. Regards, Andrey. From anders.ostling@neurope.ikea.com Mon Jan 18 11:34:43 1999 From: anders.ostling@neurope.ikea.com (Anders Vstling) Date: Mon, 18 Jan 1999 12:34:43 +0100 Subject: [omniORB] AIX runtime bomb References: Message-ID: <36A31C53.FA8281E5@neurope.ikea.com> Hi I found the problem in dejanews ! I had to specify -mthreads in the compiler command line, and now it magically works !!! /Anders Andrey Slepuhin wrote: > On 16-Jan-99 Anders Vstling wrote: > > Hi > > > > AIX 4.2 RS/6000 (not PowerPC, only "Power") > > EGCS 1.1 > > Omniorb 2.6.1 (built using EGCS) > > > > My app bombs in > > > > (gdb) brea main > > Breakpoint 1 at 0x1000168c: file main.cxx, line 464. > > (gdb) r > > Starting program: /home/anos/acid/bin/acid > > > > Program received signal SIGSEGV, Segmentation fault. > > 0xd0311644 in pthread_key_create () > > (gdb) bt > >#0 0xd0311644 in pthread_key_create () > >#1 0xd031158c in pthread_key_create () > >#2 0xd0165538 in omni_thread::init_t::init_t () > >#3 0xd0167ef4 in global constructors keyed to omni_mutex::omni_mutex () > > > >#4 0xd01685e0 in _GLOBAL__FI_libomnithread_so () > >#5 0x100226ac in __do_global_ctors () > >#6 0x10022724 in __main () > >#7 0x10001688 in main () at main.cxx:455 > >#8 0x100001a0 in __start () > > (gdb) quit > > The program is running. Exit anyway? (y or n) y > > > > The program works fine on Linux > > How do you link your program? The SIGSEGV above is typical when > you link your program with non-thread-safe version of libc. > Type dump -H and be sure that your program is > linked against libc_r.a. > > Also note that by default egcs installation is not thread-safe. > > Regards, > Andrey. -- -------------------------------------------------------- Anders Östling IKEA Corporate Technology Group Email: anders dot ostling AT neurope dot ikea dot com Phone: +46-42-25 73 45 Fax : +46-42-25 73 70 Mobil: +46-70-753 70 39 -------------------------------------------------------- From pooh@msu.ru Mon Jan 18 12:21:18 1999 From: pooh@msu.ru (Andrey Slepuhin) Date: Mon, 18 Jan 1999 15:21:18 +0300 (MEST) Subject: [omniORB] AIX runtime bomb In-Reply-To: <36A31C53.FA8281E5@neurope.ikea.com> Message-ID: On 18-Jan-99 Anders Vstling wrote: > Hi > > I found the problem in dejanews ! I had to specify -mthreads in the > compiler command line, and now it magically works !!! Well, -mthreads only implies -D_THREAD_SAFE at compile time and -lc_r -lpthreads at link time. But: *all* libraries should be rebuilt with -mthreads option. The same should be done for libstdc++ and libgcc. I use a custom patch that builds multilibbed egcs installation with thread-safe version of libraries. Also note that egcs-1.1 doesn't have thread-safe exception handling (IIRC this was fixed in egcs-1.1.1). Regards, Andrey. From S.Lo@orl.co.uk Mon Jan 18 18:00:02 1999 From: S.Lo@orl.co.uk (Sai-Lai Lo) Date: 18 Jan 1999 18:00:02 +0000 Subject: [omniORB] SSL support status? In-Reply-To: rshoup@tumbleweed.com's message of "Thu, 14 Jan 1999 18:15:26 -0800" References: <369D68AB.D4988563@tumbleweed.com> <3oiue97osj.fsf@neem.cam-orl.co.uk> <369EA4BE.B9D2F591@tumbleweed.com> Message-ID: <3ohfto31i5.fsf@neem.cam-orl.co.uk> OK! As promised, I have left a tar-ball of omniORB 2.5.0 + SSL stuff for Solaris 2.5 in ftp://ftp.orl.co.uk/pub/omniORB/omniORB_2.5.0_ssl.tar.gz. The SSL stuff uses SSLeay-0.9.0. Included in the tar-ball is the library and header files from SSLeay. The SSLeay executables are not included. The tar-ball compiles and the examples work for me. Documentation is still sparse. The source code and header files might be the best documentation. If you have questions and need some pointers, please contact Tatsuo Nakajima (CC:omniorb@orl.co.uk). As I said before, this is a snapshot of an ongoing development and has not been merged into the main development. Be prepared to dive in the source code if you encounter any problems. Regards, Sai-Lai >>>>> Randy Shoup writes: > Perfect. We've done some SSL stuff before, so hopefully we can give > some constructive feedback. > We'll also do the "vigorous testing" part :-), and would be happy to > reintegrate the changes with 2.6.1 (or 2.7.0, if that becomes available > soon). -- Dr. Sai-Lai Lo | Research Scientist | E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab | 24a Trumpington Street Tel: +44 223 343000 | Cambridge CB2 1QA Fax: +44 223 313542 | ENGLAND From dmorgen@alum.mit.edu Mon Jan 18 21:42:36 1999 From: dmorgen@alum.mit.edu (David Morgenlender) Date: Mon, 18 Jan 1999 21:42:36 GMT Subject: [omniORB] #include in .IDL file works incorrectly!!! In-Reply-To: <36a05c28.166031374@smtp.ne.mediaone.net> References: <366468EE.2615DB12@fairplay.no> <3or9uisp1n.fsf@neem.cam-orl.co.uk> <36a05c28.166031374@smtp.ne.mediaone.net> Message-ID: <36a6a90e.123601759@smtp.ne.mediaone.net> My email was down for awhile, and I lost some messages. If anybody = responded to my messages, I'd appreciate it if you re-send the messages. Thanks! =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Dave Morgenlender e-mail: dmorgen@alum.mit.edu =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D From mcfadden@dstc.edu.au Tue Jan 19 03:40:47 1999 From: mcfadden@dstc.edu.au (Ted McFadden) Date: Tue, 19 Jan 1999 13:40:47 +1000 (EST) Subject: [omniORB] 2.6.1 / error in code generated for unions... Message-ID: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. ---559023410-33463914-916717247=:2710 Content-Type: TEXT/PLAIN; charset=US-ASCII (This bug did not turn up in a search of the archive, please disregard if it is a known problem) For unions like: union switch(long){ case 2: string aString; }; the generated code for getting/setting the discriminator is: CORBA::Long _d () const { return pd__d;} void _d(CORBA::Long _value) {} // EMPTY?? The union can still be set to 2 by calling aString(*) and the _default value but nothing else. Most of the copying and streaming code generated appears to be prepared to handle the other values if they could be set. There is an attached UnionTrouble.idl file that illustrates the problem with a few simple unions. One other thing, the legal: union bad switch(long){ case 1: case 2: string test; }; will not compile, complaining about redefinitions. Cheers, Ted. -- Ted McFadden http://www.dstc.edu.au/BDU/staff/ted-mcfadden.html DSTC Level 7, GPS Building 78, Staff House Road The University of Queensland St Lucia 4072 +61 7 3365-4310 ---559023410-33463914-916717247=:2710 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="UnionTrouble.idl" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="UnionTrouble.idl" DQptb2R1bGUgVW5pb25Ucm91YmxlICB7DQoNCiAgLy9maXJzdCB0ZXN0IGNh c2UgdGFrZW4gZnJvbSBidWcgcmVwb3J0ICMzNA0KDQoNCiAgLy8gZ2VuZXJh dGVkIF9kKENPUkJBOjpCb29sZWFuKSBpZ25vcmVzIGl0cyBhcmcsIGNhbid0 DQogIC8vIHNldCBkaXNjcmltaW5hdG9yLCBjYW4gb25seSBzZXQgdG8gRkFM U0UgYnkgY2FsbGluZw0KICAvLyBfZGVmYXVsdCgpDQoNCiAgdW5pb24gWCBz d2l0Y2ggKGJvb2xlYW4pIHsNCiAgICBjYXNlIFRSVUU6IHNob3J0IHM7DQog IH07DQoNCiAvLyBfZCBpZ25vcmVzIGFyZywgY2FuIG9ubHkgc2V0IGRpc2Ny aW1pbmF0b3IgdG8gLTIxNDc0ODM2NDcNCiAvLyB2aWEgX2RlZmF1bHQoKSBv ciAyIHZpYSAgc3RyaW5nX2Zvcl90d28oLi4uKS4NCg0KICB1bmlvbiBDaG9v c2VMb25nIHN3aXRjaChsb25nKXsNCiAgICBjYXNlIDI6IHN0cmluZyBzdHJp bmdfZm9yX3R3bzsNCiAgfTsNCg0KICBlbnVtIENob2ljZSB7IG9uZSwgdHdv LCB0aHJlZSwgZm91ciAgfTsNCiAgDQogIHVuaW9uIENob29zZU9uZSBzd2l0 Y2ggKCBDaG9pY2UgKSB7DQogICAgIGNhc2UgdHdvOiBzdHJpbmcgZm9yX3R3 bzsNCiAgfTsNCg0KLy8gIHdpbGwgbm90IGNvbXBpbGUgDQovLyAgdW5pb24g YmFkIHN3aXRjaChsb25nKXsNCi8vICAgICBjYXNlIDE6DQovLyAgICAgY2Fz ZSAyOiBzdHJpbmcgdGVzdDsNCi8vICB9Ow0KfTsNCg0K ---559023410-33463914-916717247=:2710-- From S.Lo@orl.co.uk Tue Jan 19 12:11:39 1999 From: S.Lo@orl.co.uk (Sai-Lai Lo) Date: 19 Jan 1999 12:11:39 +0000 Subject: [omniORB] #include in .IDL file works incorrectly!!! In-Reply-To: dmorgen@alum.mit.edu's message of "Thu, 14 Jan 1999 21:20:33 GMT" References: <366468EE.2615DB12@fairplay.no> <3or9uisp1n.fsf@neem.cam-orl.co.uk> <36a05c28.166031374@smtp.ne.mediaone.net> Message-ID: <3o90ezbgxw.fsf@neem.cam-orl.co.uk> David, I guess what you are trying to do is something like this in pure OMG IDL. // File S.IDL // OMG IDL struct X { string A; char B; }; // File MAIN.IDL #include "S.IDL" interface I { X op(); }; The complication is you want the definition of struct X to be done in a single source file for both COM and CORBA. 1. Remember, the IDL compiler handle all the #include files only as IDL files so any C++ specific constructs in the files would not be recognised. 2. I suppose it is a bug that the compiler translate something like this: interface I { #include "S.IDL" X op(); }; into #include "S.hh" class I { .... }; Hence relocate the #include out of the context it is used in the IDL. However, it is difficult to detect this and generate #include in the output at the right context. 3. I don't know if I have an answer to achieve what you want. One possibility may be to define a single IDL file with appropriate #if to separate OMG IDL specific and COM IDL specific part while sharing as much as possible. Regards, Sai-Lai >>>>> David Morgenlender writes: > I'm trying to #include a .H file into my .IDL file. But the IDL compiler is > having problems: > 1. If I do the #include within an interface, I get a "can't parse statement" > error & the compiler (omniidl2) crashes with a system exception. > 2. So, for testing purposes, I moved the #include outside any interface & tried > again. I preceded the #include with a typedef statement, defining a type used > by the .H file. This compiled without error, but generated incorrect code, e.g. > in the .HH file: > a. The #include statement is put at the front of the .HH file, while the > typedef is placed later, AFTER the #include, which requires it. > b. The #include is for x.HH, when it should be for x.H. > How can I get the IDL compiler to do what I need, which is handle a struct > defined within an interface, via a .H file, placing a typedef before the struct? > BTW, here's why I'm doing things this way ... I use the same struct in different > apps, some of which use CORBA, some of which use COM, & some of which use both. > The variables within the struct are carefully used so they generate compatible > data for both CORBA & COM, assuming the typedef mentioned above is defined > appropriately in both CORBA & COM .IDL files. I desperately want to avoid > having to define 2 different structs for CORBA & COM ... this is a very large > struct!!! > So I'm #include'ing one .H into both my CORBA & COM IDL files. I want to do > this within an interface, so the struct typedef is essentially given a different > name for CORBA than for COM, since one app will have both definitions. > If the CORBA IDL compiler cannot be made to work with this approach, can you > suggest something better??? > ======================================================= > Dave Morgenlender > e-mail: dmorgen@alum.mit.edu > ======================================================= -- Dr. Sai-Lai Lo | Research Scientist | E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab | 24a Trumpington Street Tel: +44 223 343000 | Cambridge CB2 1QA Fax: +44 223 313542 | ENGLAND From kai@oxford.demon.co.uk Tue Jan 19 12:13:14 1999 From: kai@oxford.demon.co.uk (Kai Chen) Date: Tue, 19 Jan 1999 12:13:14 +0000 Subject: [omniORB] OmniOrb - ODBMS adaptors ??? Message-ID: <36A476DA.D6F8DBF8@oxford.demon.co.uk> Has anybody had any experience in using one of the Object Databases (e.g. O2, Objectivity and ObjectStore) with OmniORB? Any comments are appreciated. Thanks very much. Kai Chen Oxford Forecasting Services 58 St. Aldates Oxford OX1 1ST UK Tel: +44 (0) 1865 249002 Fax: +44 (0) 1865 200565 E-mail: kai@oxford.demon.co.uk From dmorgen@alum.mit.edu Tue Jan 19 13:59:20 1999 From: dmorgen@alum.mit.edu (David Morgenlender) Date: Tue, 19 Jan 1999 13:59:20 GMT Subject: [omniORB] #include in .IDL file works incorrectly!!! In-Reply-To: <3o90ezbgxw.fsf@neem.cam-orl.co.uk> References: <366468EE.2615DB12@fairplay.no> <3or9uisp1n.fsf@neem.cam-orl.co.uk> <36a05c28.166031374@smtp.ne.mediaone.net> <3o90ezbgxw.fsf@neem.cam-orl.co.uk> Message-ID: <36ab858c.180055749@smtp.ne.mediaone.net> Sai-Lai, >I guess what you are trying to do is something like this in pure OMG = IDL. > >// File S.IDL >// OMG IDL >struct X { > string A; > char B; >}; > > >// File MAIN.IDL >#include "S.IDL" > >interface I { > X op(); >}; Almost: 1. I'm doing: typedef struct ... But I could live with the way you have it. 2. The struct is being used as a parameter type, not a return value. >The complication is you want the definition of struct X to be done in a >single source file for both COM and CORBA. > >1. Remember, the IDL compiler handle all the #include files only as IDL > files so any C++ specific constructs in the files would not be > recognised. That's not a problem given the nature of this particular struct. Among = other things, all variables must be fixed length ... so no "string", = variable-length array, etc. >2. I suppose it is a bug that the compiler translate something like = this: > > interface I { > #include "S.IDL" > X op(); > }; > > into > #include "S.hh" > > class I { > .... > }; > > Hence relocate the #include out of the context it is used in the IDL. > However, it is difficult to detect this and generate #include in the > output at the right context. This bug is annoying, but not fatal. >3. I don't know if I have an answer to achieve what you want. > One possibility may be to define a single IDL file with appropriate > #if to separate OMG IDL specific and COM IDL specific part while > sharing as much as possible.=20 The difference between this & my solution is that in my solution, the differences are handled by using typedef (& possibly #if) in the invoking= source file, while your approach puts everything in the #include'd file, except = the #define's. However, both approaches have problems with the way the = compiler currently works: The compiler generated incorrect code, e.g. in the .HH file: a. The #include statement is put at the front of the .HH file, while = the typedef is placed later, AFTER the #include, which requires it. b. The #include is for x.HH, which is not generated by the compiler & = does not exist. =20 c. There is no #include for x.H. d. The struct definition does not exist for any source file created by= the compiler! It's not in any compiler output file. It's only in the = original .H file ... but this is not #include'd anywhere. So the compiler-produced = source files will not compile! Neither will any application source file, which #include's the compiler-produced header files. e. Any #define in the main .IDL file is lost! My playing around with = it, I was able to determine the compiler used it when processing x.H. However,= it's totally lost after the IDL compilation! f. The typedef in the main .IDL file is not lost. However, it is = placed in the main .HH file AFTER the #include of x.HH, where it doesn't do any = good. I can kludge around the problems both in my application source code & the compiler-generated sourse code. =20 a. I can create a dummy x.HH file, which is already #include'd by the compiler-generated files & will be #include'd by my app. b. The dummy x.HH file will redundantly have the relevant typedef's & #define's as are in the main .IDL file. c. The dummy x.HH file then #include's x.H. But even this still has a problem. There is now a redundant typedef: = the one I put in x.HH & the one the IDL compiler puts in the main .HH file in the = wrong place. I'm not sure if this will cause a C++ compiler error. I may be able to get tye typedef problem by using redundant #define's = instead. I think my approach covers everything else; but haven't tried it. IAE, = it's VERY kludgey. It requires redundant #define's, which I hate to do, since= it tends to lead to future errors. Do you think this will work? Do you have any better suggestions? ------------------------------------------------------------------------- I've thought of one other strategy, which avoids all the CORBA issues, = but is somewhat ugly. On the COM side, I really need to use the #include in the= .IDL file; this allows any COM client to use the struct, whether it be C++ or= VB, without any redundant struct definitions, such as in VB. In the CORBA = server application I also want to use the same .H file for cleanliness & = avoiding future errors. =20 However, I can take a different approach when handling the struct between= COM server & client. I can pass the struct as a fixed-length array of bytes.= I can layer functions, such that the COM server application code never sees the= kludge ... it will #include x.H & just see structs as calling parameters. The = IDL file never sees a definition of the struct. My interface code on the COM = server can at least insure the size of the array matches the expected size of the = struct to reduce, but not eliminate, the chances of use of inconsistent struct definitions, etc. Opinions? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Dave Morgenlender e-mail: dmorgen@alum.mit.edu =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D From djr@orl.co.uk Tue Jan 19 17:45:25 1999 From: djr@orl.co.uk (David Riddoch) Date: Tue, 19 Jan 1999 17:45:25 +0000 (GMT) Subject: [omniORB] #include in .IDL file works incorrectly!!! In-Reply-To: <36ab858c.180055749@smtp.ne.mediaone.net> Message-ID: David, The IDL compiler treats #includes in a special way because it assumes that what you are including will be IDL, and also that you will compile this IDL separately. If you want #includes to work the way you expect them to then you could try running the C pre-processor over your IDL file separately. You will then need to remove the information that the C pre-processor adds before running it through the IDL compiler. The C pre-processor adds lines that start with a # and contain info about what file and line number it is currently at. The advantage of this approach is that the IDL compiler will see a single pure IDL file, and will define your structure in C++ for you. All you have to do is write a script to automate it! I hope this solution works for you. Cheers, David From c1040@azfms.com Tue Jan 19 18:49:58 1999 From: c1040@azfms.com (Rusty Carruth) Date: Tue, 19 Jan 1999 11:49:58 -0700 Subject: [omniORB] #include in .IDL file works incorrectly!!! Message-ID: <9901191849.AA02706@fmsserv99.azfms.com> > > The advantage of this approach is that the IDL compiler will see a single > pure IDL file, and will define your structure in C++ for you. All you have > to do is write a script to automate it! > and it can be done automatically in the makefile (you ARE using make files, right?). If I were doing it, I'd run the c preprocessor on a file, do some diffs, and make a sed or awk or grep or perl script to remove the new stuff added to the file, then stick that into the makefile... rusty From dmorgen@alum.mit.edu Tue Jan 19 21:17:08 1999 From: dmorgen@alum.mit.edu (David Morgenlender) Date: Tue, 19 Jan 1999 21:17:08 GMT Subject: [omniORB] #include in .IDL file works incorrectly!!! In-Reply-To: References: Message-ID: <36a4f5d6.12845476@smtp.ne.mediaone.net> David, >The IDL compiler treats #includes in a special way because it assumes = that >what you are including will be IDL, and also that you will compile this >IDL separately. > >If you want #includes to work the way you expect them to then you could >try running the C pre-processor over your IDL file separately. You will >then need to remove the information that the C pre-processor adds before >running it through the IDL compiler. The C pre-processor adds lines that >start with a # and contain info about what file and line number it is >currently at. > >The advantage of this approach is that the IDL compiler will see a = single >pure IDL file, and will define your structure in C++ for you. All you = have >to do is write a script to automate it! > >I hope this solution works for you. Thanks for the suggestion. That sounds like it should work. But it will= take more time than I have to spend on it now. So for now I'm going to use = the kludge of treating the struct as an array of bytes as far as CORBA is = concerned. I'll write some low level code to hide this from the app, which will only= deal with the struct. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Dave Morgenlender e-mail: dmorgen@alum.mit.edu =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D From dmorgen@alum.mit.edu Tue Jan 19 21:21:15 1999 From: dmorgen@alum.mit.edu (David Morgenlender) Date: Tue, 19 Jan 1999 21:21:15 GMT Subject: [omniORB] #include in .IDL file works incorrectly!!! In-Reply-To: <9901191849.AA02706@fmsserv99.azfms.com> References: <9901191849.AA02706@fmsserv99.azfms.com> Message-ID: <36a5f662.12985742@smtp.ne.mediaone.net> Rusty, =20 >> The advantage of this approach is that the IDL compiler will see a = single >> pure IDL file, and will define your structure in C++ for you. All you = have >> to do is write a script to automate it! >>=20 > >and it can be done automatically in the makefile (you ARE using >make files, right?). If I were doing it, I'd run the c preprocessor >on a file, do some diffs, and make a sed or awk or grep or perl=20 >script to remove the new stuff added to the file, then stick that >into the makefile... I'm only using makefiles indirectly. I'm using the Visual C++ 5 IDE. So= I'd have to figure out how to customize the build in the IDE to do this; but= I believe that is readily doable. However, I don't have time to deal with this approach now, especially = writing the script (& having to learn awk, or whatever). So I'm going to take = the Q&D approach of treating the struct as an array of bytes at the low level & = for CORBA. The higher level app code will still deal with it as a struct. Thanks for the suggestion. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Dave Morgenlender e-mail: dmorgen@alum.mit.edu =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D From c1040@azfms.com Tue Jan 19 21:29:08 1999 From: c1040@azfms.com (Rusty Carruth) Date: Tue, 19 Jan 1999 14:29:08 -0700 Subject: [omniORB] #include in .IDL file works incorrectly!!! Message-ID: <9901192129.AA05762@fmsserv99.azfms.com> > However, I don't have time to deal with this approach now, especially writing > the script (& having to learn awk, or whatever). So I'm going to take the Q&D well, its not THAT hard to make a script: if the lines you want to remove look like this: ----begin file---- good stuff...; #line 2 /* the bad stuff */ #debuginfo foo /* more bad stuff */ some good stuff; #hellothere now /* the last bad thing */ ----end of file------ then you could just use a grep (grep is available for windows as well as unix - go get gnugrep) like this: cat thefile.c | grep -v '^#(line)|(debuginfo)|(hellothere) ' > theoutputfile.cpp in fact, you don't really have to put it into your make file if you don't mind making it manually... (just have theoutputfile.cpp rely on your original file - the one you pre process with the c preprocessor to get 'thefile.c' - but don't tell it how to make it and you'll get forcefully reminded to update the file when needed ;-) Or, use m4 instead of the c preprocessor... rusty From dmorgen@alum.mit.edu Tue Jan 19 21:44:57 1999 From: dmorgen@alum.mit.edu (David Morgenlender) Date: Tue, 19 Jan 1999 21:44:57 GMT Subject: [omniORB] #include in .IDL file works incorrectly!!! In-Reply-To: <9901192129.AA05762@fmsserv99.azfms.com> References: <9901192129.AA05762@fmsserv99.azfms.com> Message-ID: <36a7fc6b.14530386@smtp.ne.mediaone.net> Rusty, >then you could just use a grep (grep is available for windows as >well as unix - go get gnugrep) like this: > >cat thefile.c | grep -v '^#(line)|(debuginfo)|(hellothere) ' > = theoutputfile.cpp Thanks. I didn't realize grep could do such things ... the DOS greps = I've used could not. There's no 'cat' in Windows or DOS; but that's easy to = workaround. >Or, use m4 instead of the c preprocessor... What's m4? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Dave Morgenlender e-mail: dmorgen@alum.mit.edu =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D From c1040@azfms.com Tue Jan 19 22:20:01 1999 From: c1040@azfms.com (Rusty Carruth) Date: Tue, 19 Jan 1999 15:20:01 -0700 Subject: [omniORB] #include in .IDL file works incorrectly!!! Message-ID: <9901192220.AA06287@fmsserv99.azfms.com> > Thanks. I didn't realize grep could do such things ... the DOS greps I've used > could not. There's no 'cat' in Windows or DOS; but that's easy to workaround. Its either grep or egrep that has the '-v' (invert) flag. REALLY handy... > >Or, use m4 instead of the c preprocessor... > > What's m4? > m4 is a macro processor program. Its used a lot by folks doing sendmail configuration (and possibly smail, I don't know). (Used for reasons I won't bore anyone with ;-). Anyway, its a macro processor. Here's part of the man page on my Solaris machine: m4(1) User Commands m4(1) NAME m4 - macro processor SYNOPSIS /usr/ccs/bin/m4 [ -e ] [ -s ] [ -B int ] [ -H int ] [ -S int ] [ -T int ] [ -Dname [=val] ] ... [ -U name ] ... [ file ... ] /usr/xpg4/bin/m4 [ -e ] [ -s ] [ -B int ] [ -H int ] [ -S int ] [ -T int ] [ -Dname [=val] ] ... [ -U name ] ... [ file ... ] AVAILABILITY /usr/ccs/bin/m4 SUNWcsu /usr/xpg4/bin/m4 SUNWxcu4 DESCRIPTION The m4 command is a macro processor intended as a front end for C, assembler, and other languages. Each of the argument files is processed in order; if there are no files, or if a file is -, the standard input is read. The processed text is written on the standard output. Macro Syntax Macro calls have the form: name(arg1,arg2, ..., argn) The ( must immediately follow the name of the macro. If the name of a defined macro is not followed by a (, it is deemed to be a call of that macro with no arguments. Potential macro names consist of alphanumeric characters and under- score (_), where the first character is not a digit. Leading unquoted blanks, TABs, and NEWLINEs are ignored while collecting arguments. Left and right single quotes are used to quote strings. The value of a quoted string is the string stripped of the quotes. ...LOTS of stuff deleted.... Anyway, its probably easier to just run your stuff through the c pre processor, since that's what you're doing anyway... rusty. From storm@ifad.dk Wed Jan 20 14:45:55 1999 From: storm@ifad.dk (Ole Storm) Date: Wed, 20 Jan 1999 15:45:55 +0100 Subject: [omniORB] Condition Variables on NT and Linux Message-ID: <36A5EC23.F7D52E4F@ifad.dk> Greetings all, I am using omniORB 2.6.1 on Windows NT 4.0 and on Linux. I am experiencing some troubles with condition variables which I am using in the following way: Client applications and my server application synchronize at certain points using a condition variable. I.e. if some data (a list of events in this case) is not available at the time of request, the client thread is set to wait by a call to wait() on a global omni_condition variable held by the server. When the server provides the data all waiting clients are awakened by calling broadcast() on the condition variable. It should be noted that the client and server are running in separate processes. Problem 1: On WindowsNT the client threads are apparently never awakened by the call to broadcast(). On Linux things works OK - waiting clients are actually awakened. In the mailing list-archive I have seen this problem described in articles: http://www.orl.co.uk:80/omniORB/archives/1998-07/0076.html http://www.orl.co.uk:80/omniORB/archives/1998-04/0116.html however, I thought that this problem was already fixed in omniORB 2.6.1 Problem 2: On Linux I experience a minor problem too. If, at some point in time, two clients have been waiting on the same condition variable, and then at a later point in time one of the two clients terminate execution (it is terminated nicely, i.e. it is not interrupted while waiting!), then later calls to broadcast() fails to awaken the remaining client. The client is not awakened until a second client thread is started and set to wait on the condition variable. It seems that broadcast() can not handle if the number of clients using a condition variable is decreased at some point in time. It should be noted that I have compiled omniORB 2.6.1 with egcs1.1.1 Any ideas as to what I may be doing wrong??? Best regards, Ole. --------------------------------------------------------------- Ole Storm The Institute of Applied Computer Science (IFAD) Forskerparken 10, DK-5230 Odense M, Denmark Phone: +45 6315 7134, Fax: +45 6593 2999, Email: storm@ifad.dk WWW: http://www.ifad.dk --------------------------------------------------------------- From zeynep@top.cis.syr.edu Wed Jan 20 19:52:50 1999 From: zeynep@top.cis.syr.edu (Zeynep Ozdemir) Date: Wed, 20 Jan 1999 14:52:50 -0500 (EST) Subject: [omniORB] omniORB2.6.1 on irix6.3/4/5 Message-ID: Hi, does anybody use omniorb on sgi machine say irix 6.3/5? I compiled it on irix6.5 with mipsPro cc version 7.2.1.1m when I tried eg1/eg2 or nameclt but during runtime, I am getting Error: unresolvable symbol in /u/zeynep/omniORB_2.6.1/lib/mips_irix_6.5_n32/libomniORB2.so: allowFile__10gateKeeper Error: unresolvable symbol in /u/zeynep/omniORB_2.6.1/lib/mips_irix_6.5_n32/libomniORB2.so: denyFile__10gateKeeper rld: Fatal Error: this executable has unresolvable symbols can anybody help me to solve this? regards, Zeynep Odcikin-Ozdemir Syracuse University From andrew.king@mocom.co.nz Thu Jan 21 04:36:36 1999 From: andrew.king@mocom.co.nz (Andrew King) Date: Thu, 21 Jan 1999 17:36:36 +1300 Subject: [omniORB] Omniorb and Java Message-ID: <36A6AED4.908FD436@mocom.co.nz> Hi, How do I go about using OmniOrb with Java objects?. I understand (from looking at the documentation) that Omniorb only provides an IDL to C++ generator. If Java (or infact any language) can be used how much effort is required. Please excuse my ignorance as I'm totally new to CORBA/OmniOrb etc. Cheers Andrew. -- _______________________________________________________________________ Andrew King Phone: (+64 4) 473 1480 OO Developer Fax: (+64 4) 473 1515 Mocom Corporation (NZ) Ltd, 10 Brandon Street, Wellington. email: andrew.king@mocom.co.nz PO Box 10-278, Wellington. *********************************************************************** This communication is confidential to MOCOM and is intended for use only by the addressee. MOCOM does not represent that this communication (including any files attached) is free from computer viruses or other faults or defects. MOCOM accepts no responsibility or liability for information, errors or omissions in this communication or use or misuse thereof or any act done or omitted to be done in connection with same. It is the responsibility of any person opening files attached to this communication to scan those files for computer viruses. *********************************************************************** From storm@ifad.dk Thu Jan 21 10:16:24 1999 From: storm@ifad.dk (Ole Storm) Date: Thu, 21 Jan 1999 11:16:24 +0100 Subject: [omniORB] Condition varaibles - follow up... Message-ID: <36A6FE78.ECE2C9E2@ifad.dk> This is a multi-part message in MIME format. --------------C4213DF93B80E2AAEF4EF518 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Greetings, Yesterday I mentioned a problem with condition variables on Windows NT. To clarify my problems I have made a small example, a simple bounded buffer that can be accessed from one or more producer and consumer processes. The code is attached to this mail. When the buffer process is run on Linux everything works OK. Producers are set to wait if the buffer is full and consumers are set to wait if the buffer is empty. Waiting threads _are_ awakened when the state of the buffer changes. On Windows NT 4.0, however, a process that has been set to wait is never awakened!!! Why is that?? Could someone _please_ try out my example and explain to me why this does not work om WindowsNT. Best regards, Ole. --------------------------------------------------------------- Ole Storm The Institute of Applied Computer Science (IFAD) Forskerparken 10, DK-5230 Odense M, Denmark Phone: +45 6315 7134, Fax: +45 6593 2999, Email: storm@ifad.dk WWW: http://www.ifad.dk --------------------------------------------------------------- --------------C4213DF93B80E2AAEF4EF518 Content-Type: text/plain; charset=us-ascii; name="buffer.idl" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="buffer.idl" typedef short BufferItem; interface Buffer { BufferItem GetItem(); void PutItem(in BufferItem item); }; --------------C4213DF93B80E2AAEF4EF518 Content-Type: text/plain; charset=us-ascii; name="buffer.cc" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="buffer.cc" #include "buffer.hh" #include "omnithread.h" #include #define BUF_SIZE 10 // Declaration of condition variables: static omni_mutex cond_mutex; static omni_condition empty_buf(&cond_mutex); static omni_condition full_buf(&cond_mutex); static omni_mutex mutex_region; class Buffer_i : public virtual _sk_Buffer // // Implementation of the Buffer interface // { public: Buffer_i() : index(0) {} BufferItem GetItem ( ); void PutItem ( BufferItem ); private: // The fixed size buffer: BufferItem TheBuffer[BUF_SIZE]; int index; }; BufferItem Buffer_i::GetItem() { while(!index){ // No items awailable. Wait on the condition varaible empty_buf: empty_buf.wait(); } mutex_region.lock(); BufferItem itm = TheBuffer[--index]; cout << "Returned item: " << itm << "\n" << flush; // Signal one of the possible waiting threads on PutItem() full_buf.signal(); mutex_region.unlock(); return itm; } void Buffer_i::PutItem(BufferItem it) { while(index >= BUF_SIZE){ cout << "PutItem() waiting to put an item..."; full_buf.wait(); if(index < BUF_SIZE) cout << "OK\n"; else cout << "Retry\n"; } mutex_region.lock(); // OK to put an item now: TheBuffer[index++] = it; cout << "Got item: " << it << "\n"; // Signal one of the possible waiting threads on GetItem() empty_buf.signal(); mutex_region.unlock(); } CORBA::ORB_var _the_orb; CORBA::BOA_var _the_boa; main(int argc, char *argv[]) { _the_orb = CORBA::ORB_init(argc, argv, "omniORB2"); _the_boa = _the_orb->BOA_init(argc, argv, "omniORB2_BOA"); Buffer_i *theBuffer = new Buffer_i(); theBuffer->_obj_is_ready(_the_boa); Buffer_var buf_ref = theBuffer->_this(); CORBA::String_var pp = _the_orb->object_to_string(buf_ref); cerr << pp << "\n" << flush; _the_boa->impl_is_ready(0); // // Create a file for the object reference: // ofstream newfile; // newfile.open("object.string"); // if(newfile.good()) { // newfile << (char *)pp << endl; // } // else{ // err = "Could not create file object.string\n"; // } // newfile.close(); return 0; } --------------C4213DF93B80E2AAEF4EF518 Content-Type: text/plain; charset=us-ascii; name="consumer.cc" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="consumer.cc" #ifdef _MSC_VER #define SLEEP(n) Sleep(n) #else #include // For usleep() #define SLEEP(n) usleep(1000*n) #endif #include #include "buffer.hh" CORBA::ORB_var _the_orb; CORBA::BOA_var _the_boa; main(int argc, char *argv[]) { _the_orb = CORBA::ORB_init(argc, argv, "omniORB2"); _the_boa = _the_orb->BOA_init(argc, argv, "omniORB2_BOA"); if (argc < 2) { cerr << "usage: consumer []" << endl; return 1; } int period = 2000; if (argc == 3) { period = atoi(argv[2]); } try { CORBA::Object_var obj = _the_orb->string_to_object(argv[1]); Buffer_var buf = Buffer::_narrow(obj); if(CORBA::is_nil(buf)){ cout << "Error: Object reference not valid\n"; exit(0); } int i=0; while(1){ cout << "Trying to get an item..." << flush; BufferItem it = buf->GetItem(); cout << "Got " << it << "\n"; SLEEP(period); } } catch(CORBA::COMM_FAILURE& ex) { cerr << "Caught system exception COMM_FAILURE, unable to contact the " << "object." << endl; } catch(omniORB::fatalException& ex) { cerr << "Caught omniORB2 fatalException. This indicates a bug is caught " << "within omniORB2.\nPlease send a bug report.\n" << "The exception was thrown in file: " << ex.file() << "\n" << " line: " << ex.line() << "\n" << "The error message is: " << ex.errmsg() << endl; } catch(...) { cerr << "Caught a system exception." << endl; } return 0; } --------------C4213DF93B80E2AAEF4EF518 Content-Type: text/plain; charset=us-ascii; name="producer.cc" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="producer.cc" #ifdef _MSC_VER #define SLEEP(n) Sleep(n) #else #include // For usleep() #define SLEEP(n) usleep(1000*n) #endif #include #include "buffer.hh" CORBA::ORB_var _the_orb; CORBA::BOA_var _the_boa; main(int argc, char *argv[]) { _the_orb = CORBA::ORB_init(argc, argv, "omniORB2"); _the_boa = _the_orb->BOA_init(argc, argv, "omniORB2_BOA"); if (argc < 2) { cerr << "usage: producer []" << endl; return 1; } int period = 2000; if (argc == 3) { period = atoi(argv[2]); } try { CORBA::Object_var obj = _the_orb->string_to_object(argv[1]); Buffer_var buf = Buffer::_narrow(obj); if(CORBA::is_nil(buf)){ cout << "Error: Object reference not valid\n"; exit(0); } int i=0; while(1){ cout << "Trying to put item " << i << "..." << flush; buf->PutItem(i++); cout << "OK\n"; SLEEP(period); } } catch(CORBA::COMM_FAILURE& ex) { cerr << "Caught system exception COMM_FAILURE, unable to contact the " << "object." << endl; } catch(omniORB::fatalException& ex) { cerr << "Caught omniORB2 fatalException. This indicates a bug is caught " << "within omniORB2.\nPlease send a bug report.\n" << "The exception was thrown in file: " << ex.file() << "\n" << " line: " << ex.line() << "\n" << "The error message is: " << ex.errmsg() << endl; } catch(...) { cerr << "Caught a system exception." << endl; } return 0; } --------------C4213DF93B80E2AAEF4EF518 Content-Type: text/plain; charset=us-ascii; name="Makefile" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="Makefile" # # Win 32 # ifeq ($(OSTYPE),win32) # Edit these variables to reflect the location of your installation OMNIDIR = c:/omniORB_2.6.1 CORBA_CPPFLAGS = -D__WIN32__ -D__x86__ -D__NT__ -D__OSVERSION__=4 INCDIR = -I. -I$(OMNIDIR)/include CORBA_LIB = wsock32.lib advapi32.lib \ $(OMNIDIR)/lib/x86_win32/omniORB260_rt.lib \ $(OMNIDIR)/lib/x86_win32/omnithread2_rt.lib CXX = cl /nologo CXXDLL = -LD $(DEBUGDLL) CXXFLAGS = -MT -GX $(DEBUG) $(CORBA_CPPFLAGS) DEBUG = -Zi -MTd DEBUGDLL = -LDd #DEBUG = #DEBUGDLL = COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $(INCDIR) -c CCOUT = -Fo CCIN = -Tp LNKOUT = -Fe OBJ = obj EXE = .exe OMNIIDL2 = $(OMNIDIR)/bin/x86_win32/omniidl2 endif # # Linux # ifeq ($(OSTYPE),Linux) # Edit these variables to reflect the location of your installation OMNIDIR = /local/share/lib/omniORB_2.6.1 PTHREAD_DIR = /opt/linuxthreads-0.71/ CORBA_CPPFLAGS = -D__x86__ -D__linux__ -D__OSVERSION__=2 INCDIR = -I$(PTHREAD_DIR)/include -I. -I$(OMNIDIR)/include -I$(TBDIR)/cg/include CORBA_LIB = -lomniORB2 -lomnithread -ltcpwrapGK -lpthread -L$(OMNIDIR)/lib/i586_linux_2.0_glibc -L$(PTHREAD_DIR)/lib -L$(TBDIR)/cg/lib CXX = g++ CXXFLAGS = -Wall -Wno-unused $(DEBUG) $(CORBA_CPPFLAGS) DEBUG = -g #DEBUG = COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $(INCDIR) -c CCOUT = -o CCIN = LNKOUT = -o LINK = $(CXX) OBJ = o EXE = OMNIIDL2 = $(OMNIDIR)/bin/i586_linux_2.0_glibc/omniidl2 endif ifeq ($(OSTYPE),solaris2.6) # Edit this variable to reflect the location of your installation OMNIDIR = /local/share/lib/omniORB_2.5.0 TBDIR = /opt/toolbox CORBA_CPPFLAGS = -DUsePthread -D_REENTRANT -D__sparc__ -D__sunos__ -D__OSVERSION__=5 INCDIR = -I. -I$(OMNIDIR)/include -I$(TBDIR)/cg/include CORBA_LIB = -lomniORB2 -lomnithread -lpthread -lposix4 -lsocket -lnsl -ltcpwrapGK -L. -L$(OMNIDIR)/lib/sun4_sosV_5.5 -L$(TBDIR)/cg/lib CXX = g++ CXXFLAGS = -Wall -Wno-unused $(DEBUG) $(CORBA_CPPFLAGS) #DEBUG = -g DEBUG = COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $(INCDIR) -c CCOUT = "-o " CCIN = LNKOUT = -o LINK = $(CXX) OBJ = o EXE = OMNIIDL2 = $(OMNIDIR)/bin/sun4_sosV_5.5/omniidl2 endif all:: buffer$(EXE) producer$(EXE) consumer$(EXE) clean: rm *.$(OBJ) buffer$(EXE) consumer$(EXE) rm *.hh *SK* ifeq ($(OSTYPE),win32) rm *.pdb *.ilk *.opt endif %.$(OBJ): %.cc $(COMPILE.cc) $(CCIN)$< buffer.$(OBJ): buffer.cc bufferSK.$(OBJ) bufferSK.cc: buffer.idl $(OMNIIDL2) -s SK.cc $< buffer$(EXE): buffer.$(OBJ) bufferSK.$(OBJ) $(CXX) $(LNKOUT)$@ $(CXXFLAGS) $+ $(CORBA_LIB) producer.$(OBJ): producer.cc producer$(EXE): producer.$(OBJ) bufferSK.$(OBJ) $(CXX) $(LNKOUT)$@ $(CXXFLAGS) $+ $(CORBA_LIB) consumer.$(OBJ): consumer.cc consumer$(EXE): consumer.$(OBJ) bufferSK.$(OBJ) $(CXX) $(LNKOUT)$@ $(CXXFLAGS) $+ $(CORBA_LIB) --------------C4213DF93B80E2AAEF4EF518-- From suzuki@wni.co.jp Thu Jan 21 10:52:00 1999 From: suzuki@wni.co.jp (Shinji Suzuki) Date: Thu, 21 Jan 1999 19:52:00 +0900 Subject: [omniORB] Condition varaibles - follow up... In-Reply-To: Your message of "Thu, 21 Jan 1999 11:16:24 +0100." <36A6FE78.ECE2C9E2@ifad.dk> Message-ID: <9901211052.AA21499@linus.wni.co.jp> Ole, You may not be using conidion vairable properly. Rather than doing BufferItem Buffer_i::GetItem() { while(!index){ // No items awailable. Wait on the condition varaible empty_buf: empty_buf.wait(); } mutex_region.lock(); BufferItem itm = TheBuffer[--index]; cout << "Returned item: " << itm << "\n" << flush; // Signal one of the possible waiting threads on PutItem() full_buf.signal(); mutex_region.unlock(); return itm; } you may have to do BufferItem Buffer_i::GetItem() { omni_mutex_lock l(omni_mutex_cond_mutex); // safer this way than m.lock() while( !index ) { // No items awailable. Wait on the condition varaible empty_buf: empty_buf.wait(); } BufferItem itm = TheBuffer[--index]; cout << "Returned item: " << item << "\n" << flush // Signal one of the possible waiting threads on PutItem() full_buf.signal(); return itm; } and apply similar changes elsewhere. -shinji From storm@ifad.dk Thu Jan 21 11:53:14 1999 From: storm@ifad.dk (Ole Storm) Date: Thu, 21 Jan 1999 12:53:14 +0100 Subject: [omniORB] Condition varaibles - follow up... References: <9901211052.AA21499@linus.wni.co.jp> Message-ID: <36A7152A.55A3AF6F@ifad.dk> Hi Shinji, Shinji Suzuki wrote: > (...) > you may have to do > > BufferItem > Buffer_i::GetItem() > { > omni_mutex_lock l(omni_mutex_cond_mutex); // safer this way than m.lock() > while( !index ) { > // No items awailable. Wait on the condition varaible empty_buf: > empty_buf.wait(); > } > BufferItem itm = TheBuffer[--index]; > cout << "Returned item: " << item << "\n" << flush > // Signal one of the possible waiting threads on PutItem() > full_buf.signal(); > return itm; > } > > and apply similar changes elsewhere. I agree that the omni_mutex_lock class is a better way to mutex-lock an _entire_ function, but I don't think that this has anything to do with the problems I experience on WinNT. The example works fine on Linux without using the omni_mutex_lock - remember. Actually, mutex-locking the entire GetItem() and PutItem() functions as proposed will result in a dead-lock at some point. If, for instance GetItem() is called on an empty buffer, the call will be set to wait in the call to empty_buf.wait(). But since GetItem() locks on the global mutex variable, PutItem() is never allowed to execute --> no items will be put into the buffer --> the thread waiting for new items will never be signalled --> dead-lock. This was the reason for calling mutext_region.lock() _after_ the while loop and not before it! Thanks anyway and best regards, Ole. --------------------------------------------------------------- Ole Storm The Institute of Applied Computer Science (IFAD) Forskerparken 10, DK-5230 Odense M, Denmark Phone: +45 6315 7134, Fax: +45 6593 2999, Email: storm@ifad.dk WWW: http://www.ifad.dk --------------------------------------------------------------- From S.Lo@orl.co.uk Thu Jan 21 12:25:04 1999 From: S.Lo@orl.co.uk (Sai-Lai Lo) Date: 21 Jan 1999 12:25:04 +0000 Subject: [omniORB] Condition varaibles - follow up... In-Reply-To: Ole Storm's message of "Thu, 21 Jan 1999 12:53:14 +0100" References: <9901211052.AA21499@linus.wni.co.jp> <36A7152A.55A3AF6F@ifad.dk> Message-ID: <3ovhi0izj3.fsf@neem.cam-orl.co.uk> Hi Ole, I think there is some misunderstanding on how to use conditional variable. In your code, you have never lock the mutex cond_mutex which is the mutex that you have initialised the conditional variables empty_buf and full_buf. Remember in your code, the conditional variables have to be initialised with a mutex as the ctor argument. When you use wait(), it is a pre-condition that the calling thread must hold the lock on the mutex with which the conditional variable is held. This is how the semantics of wait() is defined. (The wait operation may atomically **unlocks** the mutex and blocks the thread.) Have a look at omnithread.h for some explanation. For a tutorial on how to use conditional variables, I think the DEC SRC report no. 35 by Andrew Birrell "An Introduction to Programming with Threads" is the best. (http://www.research.digital.com/SRC/home.html) Sai-Lai -- Dr. Sai-Lai Lo | Research Scientist | E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab | 24a Trumpington Street Tel: +44 223 343000 | Cambridge CB2 1QA Fax: +44 223 313542 | ENGLAND From djr@orl.co.uk Thu Jan 21 12:24:40 1999 From: djr@orl.co.uk (David Riddoch) Date: Thu, 21 Jan 1999 12:24:40 +0000 (GMT) Subject: [omniORB] Condition varaibles - follow up... In-Reply-To: <36A7152A.55A3AF6F@ifad.dk> Message-ID: Ole, omni_condition::wait() implicity unlocks the mutex. In fact it is an error to call it if the calling thread does not already hold the mutex. If your implementation worked on Linux then that was luck. Have a read of http://www.orl.co.uk/omniORB/doc/omnithread/omnithread.html The section 'Synchronisation objects' explains omni_condition. The DEC SRC report 'An Introduction to Programming with Threads' (#35) is a very good introduction to this stuff, available at: http://gatekeeper.dec.com/pub/DEC/SRC/research-reports/ David On Thu, 21 Jan 1999, Ole Storm wrote: > I agree that the omni_mutex_lock class is a better way to mutex-lock an > _entire_ function, but I don't think that this has anything to do with the > problems I experience on WinNT. The example works fine on Linux without > using the omni_mutex_lock - remember. > > Actually, mutex-locking the entire GetItem() and PutItem() functions as > proposed will result in a dead-lock at some point. If, for instance > GetItem() is called on an empty buffer, the call will be set to wait in the > call to empty_buf.wait(). But since GetItem() locks on the global mutex > variable, PutItem() is never allowed to execute --> no items will be put > into the buffer --> the thread waiting for new items will never be signalled > --> dead-lock. > This was the reason for calling mutext_region.lock() _after_ the while loop > and not before it! > > > Thanks anyway and best regards, > > Ole. > > --------------------------------------------------------------- > Ole Storm > The Institute of Applied Computer Science (IFAD) > Forskerparken 10, DK-5230 Odense M, Denmark > Phone: +45 6315 7134, Fax: +45 6593 2999, Email: storm@ifad.dk > WWW: http://www.ifad.dk > --------------------------------------------------------------- > > From suzuki@wni.co.jp Thu Jan 21 12:34:03 1999 From: suzuki@wni.co.jp (Shinji Suzuki) Date: Thu, 21 Jan 1999 21:34:03 +0900 Subject: [omniORB] Condition varaibles - follow up... In-Reply-To: Your message of "Thu, 21 Jan 1999 12:53:14 +0100." <36A7152A.55A3AF6F@ifad.dk> Message-ID: <9901211234.AA21885@linus.wni.co.jp> Ole, Forgive me if I'm wrong, I think wait() will relinquishes the mutex acquired by omni_mutex_lock::omni_mutex_lock. With that said, sharing a mutex among multiple cond-var may not be something you are allowed to do. -shinji > Message-Id: <36A7152A.55A3AF6F@ifad.dk> > Date: Thu, 21 Jan 1999 12:53:14 +0100 > From: Ole Storm > Organization: IFAD > X-Mailer: Mozilla 4.5 [en] (WinNT; I) > X-Accept-Language: en > Mime-Version: 1.0 > To: Shinji Suzuki > Cc: "omniorb-list@orl.co.uk" > Subject: Re: [omniORB] Condition varaibles - follow up... > Content-Transfer-Encoding: 7bit > > Hi Shinji, > > Shinji Suzuki wrote: > > (...) > > you may have to do > > > > BufferItem > > Buffer_i::GetItem() > > { > > omni_mutex_lock l(omni_mutex_cond_mutex); // safer this way than m.lock() > > while( !index ) { > > // No items awailable. Wait on the condition varaible empty_buf: > > empty_buf.wait(); > > } > > BufferItem itm = TheBuffer[--index]; > > cout << "Returned item: " << item << "\n" << flush > > // Signal one of the possible waiting threads on PutItem() > > full_buf.signal(); > > return itm; > > } > > > > and apply similar changes elsewhere. > > I agree that the omni_mutex_lock class is a better way to mutex-lock an > _entire_ function, but I don't think that this has anything to do with the > problems I experience on WinNT. The example works fine on Linux without > using the omni_mutex_lock - remember. > > Actually, mutex-locking the entire GetItem() and PutItem() functions as > proposed will result in a dead-lock at some point. If, for instance > GetItem() is called on an empty buffer, the call will be set to wait in the > call to empty_buf.wait(). But since GetItem() locks on the global mutex > variable, PutItem() is never allowed to execute --> no items will be put > into the buffer --> the thread waiting for new items will never be signalled > --> dead-lock. > This was the reason for calling mutext_region.lock() _after_ the while loop > and not before it! > > > Thanks anyway and best regards, > > Ole. > > --------------------------------------------------------------- > Ole Storm > The Institute of Applied Computer Science (IFAD) > Forskerparken 10, DK-5230 Odense M, Denmark > Phone: +45 6315 7134, Fax: +45 6593 2999, Email: storm@ifad.dk > WWW: http://www.ifad.dk > --------------------------------------------------------------- > From djr@orl.co.uk Thu Jan 21 12:43:05 1999 From: djr@orl.co.uk (David Riddoch) Date: Thu, 21 Jan 1999 12:43:05 +0000 (GMT) Subject: [omniORB] Condition varaibles - follow up... In-Reply-To: <9901211234.AA21885@linus.wni.co.jp> Message-ID: On Thu, 21 Jan 1999, Shinji Suzuki wrote: > said, sharing a mutex among multiple cond-var may not be > something you are allowed to do. Thats ok - you can. From storm@ifad.dk Thu Jan 21 13:49:51 1999 From: storm@ifad.dk (Ole Storm) Date: Thu, 21 Jan 1999 14:49:51 +0100 Subject: [omniORB] Condition varaibles - follow up... References: <9901211052.AA21499@linus.wni.co.jp> <36A7152A.55A3AF6F@ifad.dk> <3ovhi0izj3.fsf@neem.cam-orl.co.uk> Message-ID: <36A7307F.721BC1E3@ifad.dk> Hi, Sai-Lai Lo wrote: > > Hi Ole, > > I think there is some misunderstanding on how to use conditional variable. > In your code, you have never lock the mutex cond_mutex which is the mutex > that you have initialised the conditional variables empty_buf and full_buf. > > Remember in your code, the conditional variables have to be initialised > with a mutex as the ctor argument. When you use wait(), it is a > pre-condition that the calling thread must hold the lock on the mutex with > which the conditional variable is held. This is how the semantics of wait() > is defined. (The wait operation may atomically **unlocks** the mutex and > blocks the thread.) Yes, you are right, I misunderstood the use of condition varaibles. My condition variables were initialized with a mutex all-right, but another mutex that the one used by the function doing the wait(). I was not aware that the condition varaible should actually be initialized with the mutex that is used in the synchronization. My problem is now solved! Thanks to everyone who responded, and my apollogies to Shinji - you vere right all the way!!! Best regards, Ole. From gdd0@gte.com Thu Jan 21 14:30:27 1999 From: gdd0@gte.com (Gary D. Duzan) Date: Thu, 21 Jan 1999 09:30:27 -0500 Subject: [omniORB] Condition varaibles - follow up... Message-ID: <199901211430.JAA41494@lion.gte.com> On a similar note, I believe the OmniEvents service as released has the same condition usage problem, which allows it to work on Linux but causes problems on other platforms. I have notified the code's owner and provided a patch for the locking as well as some AIX-specific fixes, which will hopefully be included in an upcoming release. Gary Duzan GTE Laboratories In Message <36A7307F.721BC1E3@ifad.dk> , Ole Storm wrote: =>Hi, => =>Sai-Lai Lo wrote: =>> =>> Hi Ole, =>> =>> I think there is some misunderstanding on how to use conditional variable. =>> In your code, you have never lock the mutex cond_mutex which is the mutex =>> that you have initialised the conditional variables empty_buf and full_buf. =>> =>> Remember in your code, the conditional variables have to be initialised =>> with a mutex as the ctor argument. When you use wait(), it is a =>> pre-condition that the calling thread must hold the lock on the mutex with =>> which the conditional variable is held. This is how the semantics of wait() =>> is defined. (The wait operation may atomically **unlocks** the mutex and =>> blocks the thread.) => =>Yes, you are right, I misunderstood the use of condition varaibles. My =>condition variables were initialized with a mutex all-right, but another =>mutex that the one used by the function doing the wait(). I was not aware =>that the condition varaible should actually be initialized with the mutex =>that is used in the synchronization. => =>My problem is now solved! Thanks to everyone who responded, and my =>apollogies to Shinji - you vere right all the way!!! => => =>Best regards, => => Ole. => From ayampolsky@erols.com Thu Jan 21 15:25:37 1999 From: ayampolsky@erols.com (Armen Yampolsky) Date: Thu, 21 Jan 1999 15:25:37 +0000 Subject: [omniORB] Re: Omniorb and Java References: <36A6AED4.908FD436@mocom.co.nz> Message-ID: <36A746F1.A225EFED@erols.com> You will need a java->idl compiler, and java libraries from other vendors. People (including myself) have been successful in using java ORBs with omniORB in varying degrees. I suggest you search through the list. Also, the omniORB web site has a good, albeit outdated page: http://www.orl.co.uk/omniORB/javaORBs.html which compares campatibility between the java ORBs and omni. I have had personal success with Sun's JDK1.2 libraries and omni. There are a few important issues, not the least of which is Sun's poor (non-)implementation of connection re-opening functionality. In using their ORB, if you are using a java client, you must turn off the idletimeoutperiod for both the omniORB server and the naming service. I would not use Sun's libraries for server-side code, I get a queasy feeling about it. Of course there are other vendors. ORBacus is said to be good. Commercial ORBs such as Visigenic's and Orbix's are said to be good as well. Good luck, -Armen Andrew King wrote: > Hi, > How do I go about using OmniOrb with Java objects?. > I understand (from looking at the documentation) that Omniorb only > provides an IDL to C++ generator. > If Java (or infact any language) can be used how much effort is > required. > > Please excuse my ignorance as I'm totally new to CORBA/OmniOrb etc. -- Armen Yampolsky Axiom Software Labs New York From nickr@harlequin.co.uk Thu Jan 21 15:43:49 1999 From: nickr@harlequin.co.uk (Nick Reeves) Date: Thu, 21 Jan 1999 15:43:49 GMT Subject: [omniORB] DII Message-ID: <199901211543.PAA03124@spot.cam.harlequin.co.uk> Last year there was a posting that a DII implementation was likely to be available soon, is there any further information on possible timescales. Ta ! -- Nick Reeves From djr@orl.co.uk Thu Jan 21 16:09:50 1999 From: djr@orl.co.uk (David Riddoch) Date: Thu, 21 Jan 1999 16:09:50 +0000 (GMT) Subject: [omniORB] omniORB 2.7.0 is released! Message-ID: Well it took a little longer than anticipated - but isn't that just always the way with software. I blame feature creep. Hope it works. Hope you enjoy it! David ******************************************************** ******* Free CORBA 2 ORB for C++ available now ******* ******************************************************** At last, another release of possibly the fastest CORBA 2 ORB available ... omniORB 2.7.0 Exciting new features in this release: o support for the Dynamic Invocation Interface (DII) and Dynamic Skeleton Interface (DSI) o new implementation of TypeCode and Any o new implementation of DynAny o improvements to stub code - the overhead per operation is dramatically reduced omniORB is copyright Olivetti & Oracle Research Laboratory. It is free software. The programs in omniORB2 are distributed under the GNU General Public Licence as published by the Free Software Foundation. The libraries in omniORB2 are distributed under the GNU Library General Public Licence. Source code and binary distributions are available from our Web pages: http://www.orl.co.uk/omniORB/omniORB.html Technical Highlights ==================== omniORB2 implements specification 2.0 of the Common Object Request Broker Architecture (CORBA). - C++ language bindings are supported. The mapping conforms to the revision 2.0 of the CORBA specification. - The Internet Inter-ORB Protocol (IIOP) is used as the native protocol. - The omniORB2 runtime is fully multithreaded. It uses native platform thread support encapsulated with a small class library, omnithread, to abstract away from differences in native thread APIs. - `Typecode' and the type `Any' are supported. - The Dynamic Invocation and Dynamic Skeleton interfaces are supported. - DynAny (CORBA 2.2) is supported. - A COS Naming Service, omniNames, is provided. - The following platforms are supported: o Solaris 2.5 / Sun SparcCompiler C++ version 4.2 o Solaris 2.6/ Sun SparcCompiler C++ version 4.2 o Digital Unix 3.2 / DEC C++ compiler version 5.5 o Digital Unix 4.0D/ DEC C++ compiler version 6.0 o x86 Linux 2.0 / GNU C++ compiler version 2.7.2 / Linuxthreads 0.5 o x86 Linux 2.0 /egcs-1.1b/binutils-2.9.1.0.14/GNU Libc version 2 o x86 Windows NT / Windows 95 / Visual C++ version 5.0 o Alpha NT / Visual C++ version 5.0 Ports to the following platforms are available. These ports are done by external contributors and have been integrated into the source tree. For these platforms, no pre-compiled binary is available. o IBM AIX 4.2/ IBM C Set++ 3.1.4 o HPUX 10.20/ aC++ (B3910 A.01.04) o OpenVMS Alpha 6.2/ DEC C++ compiler 5.5 (UCX 4.1 ECO 8) o OpenVMS Vax 6.1/ DEC C++ compiler 5.5 (UCX 4.0 ECO 1) o NextStep 3.3/ gcc-2.7.2 o Reliant Unix 5.43/CDS++ o SCO OpenServer 5/g++ o Phar Lap's Real Time ETS Kernel o SGI Irix 6.x/SGI C++ compiler 7.2 The ports to Mac OS is known to exist. However, the ports have not been merged into the source tree yet. It should be straightforward to port omniORB2 to any platform which supports POSIX style threads, BSD style sockets and has a decent C++ compiler which supports exceptions. - It has been tested for interoperability via IIOP with other ORBs, such as Iona Orbix 2.2 MT, Iona OrbixWeb 2.0.1, Visigenic Visibroker for C++, and HP ORB Plus 2.5. Work in progress ================ omniORB2 is not yet a complete implementation of the CORBA 2.2 core. The following features are not supported in the current release. Support for these features will be included shortly in a future release of omniORB2. - The Portable Object Adapter (POA) is not supported - GIOP 1.1 is not supported. Missing features ================ The following features are missing from omniORB2. We are not currently planning on adding support for these features. - The BOA only supports the persistent server activation policy. Other dynamic activation and deactivation polices are not supported. - omniORB2 does not has its own Interface Repository. From ayampolsky@erols.com Thu Jan 21 16:58:23 1999 From: ayampolsky@erols.com (Armen Yampolsky) Date: Thu, 21 Jan 1999 16:58:23 +0000 Subject: [omniORB] Re: Omniorb and Java References: Message-ID: <36A75CAF.6A4AE0B7@erols.com> This is a multi-part message in MIME format. --------------8F3454A18961122B7C754851 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit You need to change it in two places. First, in your server, write omniORB::idleConnectionScanPeriod(omniORB::idleIncoming, 0); //0 turns timeout off Next, if you are using omniNames, you must alter the source code to do the same thing. I am attaching our modification to omniNames.cc which allows you to call it with an additional argument: '-ORBinConScanPeriod '. ORL said they will add the args: -ORBinConScanPeriod -ORBoutConScanPeriod in the next release. Anyway, you must set that (the incoming) to 0. Let's hope Sun gets on the ball and fixes this! Cheers, -Armen Michael Quigley wrote: > On Thu, 21 Jan 1999, Armen Yampolsky wrote: > > > I have had personal success with Sun's JDK1.2 libraries and omni. There > > are a few important issues, not the least of which is Sun's poor > > (non-)implementation of connection re-opening functionality. In using > > their ORB, if you are using a java client, you must turn off the > > idletimeoutperiod for both the omniORB server and the naming service. I > > would not use Sun's libraries for server-side code, I get a queasy feeling > > about it. > > I'm starting a project using JDK1.2 and omniORB. I'm having that same > problem with connection re-opening.. I'm not quite sure where to change > the idletimeoutperiod within omniORB.. Any pointers would be appreciated.. > > Thanks, > Michael > > ---- > Michael F. Quigley, Jr. > Chief Technology Officer > Going Virtual, L.L.C. > Matthews, NC -- Armen Yampolsky Axiom Software Labs New York --------------8F3454A18961122B7C754851 Content-Type: text/plain; charset=us-ascii; name="omniNames.cc" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="omniNames.cc" // -*- Mode: C++; -*- // Package : omniNames // omniNames.cc Author : Tristan Richardson (tjr) // // Copyright (C) 1997 Olivetti & Oracle Research Laboratory // // This file is part of omniNames. // // omniNames is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, // USA. // #include #include #include #include #include #include #include #include #include #ifdef __WIN32__ #include #else #include #endif // Minimum idle period before we take a checkpoint (15 mins) #define DEFAULT_IDLE_TIME_BTW_CHKPT (15*60) void usage() { cerr << "\nusage: omniNames [-start ]\n" << " [-logdir ]\n" << " [-errlog ]\n" /***** patch *****/ << " [-ORBinConScanPeriod ]\n" /***** end of patch *****/ << " [...]" << endl; cerr << "\nUse -start option to start omniNames for the first time." << endl; cerr << "\nUse -logdir option to specify the directory where the log/data files are kept.\n"; cerr << "\nUse -errlog option to specify where standard error output is redirected.\n"; cerr << "\nYou can also set the environment variable " << LOGDIR_ENV_VAR << " to specify the\ndirectory where the log/data files are kept.\n" << endl; exit(1); } static void removeArgs(int& argc, char** argv, int idx, int nargs) { if ((idx+nargs) > argc) return; for (int i = idx+nargs; i < argc; i++) { argv[i-nargs] = argv[i]; } argc -= nargs; } static void insertArgs(int& argc, char**& argv, int idx, int nargs) { char** newArgv = new char*[argc+nargs]; int i; for (i = 0; i < idx; i++) { newArgv[i] = argv[i]; } for (i = idx; i < argc; i++) { newArgv[i+nargs] = argv[i]; } argv = newArgv; argc += nargs; } // // main // int main(int argc, char **argv) { // // If we have a "-start" option, get the given port number. // int port = 0; char* logdir = 0; /***** patch *****/ int idletimeout = 0; /***** end of patch *****/ while (argc > 1) { if (strcmp(argv[1], "-start") == 0) { if (argc < 3) usage(); port = atoi(argv[2]); removeArgs(argc, argv, 1, 2); } else if (strcmp(argv[1], "-logdir") == 0) { if (argc < 3) usage(); logdir = argv[2]; removeArgs(argc, argv, 1, 2); } /***** patch *****/ else if (strcmp(argv[1], "-ORBinConScanPeriod") == 0) { if (argc < 3) usage(); idletimeout = atoi(argv[2]); removeArgs(argc, argv, 1, 2); } /***** end of patch *****/ else if (strcmp(argv[1], "-errlog") == 0) { if (argc < 3) usage(); #ifdef __WIN32__ int fd = _open(argv[2], O_WRONLY | O_CREAT | O_TRUNC, _S_IWRITE); if (fd < 0 || _dup2(fd,2)) { #else int fd = open(argv[2], O_WRONLY | O_CREAT | O_TRUNC | O_SYNC, 0666); if (fd < 0 || dup2(fd,2) < 0) { #endif cerr << "Cannot open error log file: " << argv[2] << endl; usage(); } removeArgs(argc, argv, 1, 2); } else if ((strncmp(argv[1], "-BOA", 4) != 0) && (strncmp(argv[1], "-ORB", 4) != 0)) { usage(); } else { break; } } // // Set up an instance of class log. This also gives us back the port // number from the log file if "-start" wasn't specified. // log l(port,logdir); // // Add a fake command line option to tell the BOA which port to use. // insertArgs(argc, argv, 1, 2); argv[1] = strdup("-BOAiiop_port"); argv[2] = new char[16]; sprintf(argv[2], "%d", port); /***** patch *****/ omniORB::idleConnectionScanPeriod(omniORB::idleIncoming, (CORBA::ULong)idletimeout); omniORB::idleConnectionScanPeriod(omniORB::idleOutgoing, (CORBA::ULong)idletimeout); /***** end of patch *****/ // // Initialize the ORB and the object adaptor. // CORBA::ORB_ptr orb = CORBA::ORB_init(argc,argv,"omniORB2"); CORBA::BOA_ptr boa = orb->BOA_init(argc,argv,"omniORB2_BOA"); boa->impl_is_ready(0,1); // // Read the log file and set up all the naming contexts described in it. // l.init(orb, boa); // // Now this thread has nothing much to do. Simply take a checkpoint once // every so often. // int idle_time_btw_chkpt; char *itbc = getenv("OMNINAMES_ITBC"); if (itbc == NULL || sscanf(itbc,"%d",&idle_time_btw_chkpt) != 1) idle_time_btw_chkpt = DEFAULT_IDLE_TIME_BTW_CHKPT; omni_mutex m; omni_condition c(&m); m.lock(); while (1) { l.checkpoint(); unsigned long s, n; omni_thread::get_time(&s, &n, idle_time_btw_chkpt); c.timedwait(s,n); } m.unlock(); return 0; } --------------8F3454A18961122B7C754851-- From Renzo Tomaselli" This is a multi-part message in MIME format. ------=_NextPart_000_01AD_01BE45F0.4B0021C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, we experienced a problem with Visual Basic managing an OCX which = links to an OmniORB related implementation. When switching from design = mode to run mode and the contrary, Visual Basic crashes because DLLs are = unloaded from memory, while the outScavenger thread is still alive. When = the timer wakes it up, there is no loaded code to run and everything = blows up. We cannot understand how VB unloads depending modules while active = threads are still alive (it doesn't happen with VC). Anyway, the problem is that killOutScavenger is never called from = OmniORB code; also there is no explicit ORB shutdown to call when all = things are going to die. >From the BOA point of view there are impl_is_ready/impl_shutdown entry = points which do the correct job for inScavenger, so everythings works = fine there. What about explicitely calling killOutScavenger from a key application = destructor when things go down ? Thanks, Renzo = Tomaselli =20 -------------------------------------------------------------------------= -- TecnoTP s.n.c. Special Information System Design Maso Pelauchi I38050 Ronchi Valsugana, Trento TN ITALY Tel. +39 0461 773164 Fax. +39 0461 771514 e-mail: renzo.tomaselli@eclipse-net.it =20 -------------------------------------------------------------------------= -- ------=_NextPart_000_01AD_01BE45F0.4B0021C0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
    we experienced a = problem with=20 Visual Basic managing an OCX which links to an OmniORB related = implementation.=20 When switching from design mode to run mode and the contrary, Visual = Basic=20 crashes because DLLs are unloaded from memory, while the outScavenger = thread is=20 still alive. When the timer wakes it up, there is no loaded code to run = and=20 everything blows up.
We cannot = understand how VB=20 unloads depending modules while active threads are still alive (it = doesn't=20 happen with VC).
Anyway, the problem is that killOutScavenger is = never called=20 from OmniORB code; also there is no explicit ORB shutdown to call when = all=20 things are going to die.
From the BOA point of view there are=20 impl_is_ready/impl_shutdown entry points which do the correct job for=20 inScavenger, so everythings works fine there.
What about explicitely calling killOutScavenger from = a key=20 application destructor when things go down ?
Thanks,
          &nbs= p;            = ;            =             &= nbsp;           &n= bsp;  =20 Renzo Tomaselli     =20
---------------------------------------------------------------------= ------
TecnoTP=20 s.n.c. Special Information System Design
Maso Pelauchi I38050 Ronchi=20 Valsugana,  Trento TN  ITALY
Tel. +39 0461=20 773164      Fax. +39 0461 771514
e-mail: renzo.tomaselli@eclipse-ne= t.it  =20
---------------------------------------------------------------------= ------
------=_NextPart_000_01AD_01BE45F0.4B0021C0-- From Martin.Renner@pp-ulm.de Fri Jan 22 09:25:46 1999 From: Martin.Renner@pp-ulm.de (Martin Renner) Date: Fri, 22 Jan 1999 10:25:46 +0100 Subject: [omniORB] omniORB 2.7.0 is released! In-Reply-To: Message-ID: <4.1.19990122101053.00a2e8d0@email> Hi. I just tried to switch from 2.6.1 to 2.7.0 (Windows NT 4.0, MSVC 5.0). Now, I get a warning message for each of my object implementations: omniORB2\include\omniORB2/bufferedStream.h(621) : warning C4800: 'unsigned char' : variable is getting set to a boolean value ('true' or 'false') bufferedStream.h looks like that: 616: inline _CORBA_Char byteOrder() const { 617: return pd_byte_order; 618: } 619: 620: inline void byteOrder(_CORBA_Char b) { 621: pd_byte_order = b; 622: } 692: _CORBA_Boolean pd_byte_order; "_CORBA_Char vs. _CORBA_Boolean" (or "unsigned char" vs. "bool" on my platform). Martin From b.keeping@ic.ac.uk Fri Jan 22 14:47:30 1999 From: b.keeping@ic.ac.uk (b.keeping@ic.ac.uk) Date: Fri, 22 Jan 1999 14:47:30 GMT Subject: [omniORB] Idea on in-process execution Message-ID: <3089.199901221447@ultra11.ps.ic.ac.uk> Hi fellow omniORBers, Although we're probably all busy trying out 2.7.0, I'd like to share some ideas I've been trying out - and perhaps get some better ones in return! I am interested in making alternative implementations of Corba objects available in-process at runtime. The mechanism I'm using for this dynamic loading of shared objects. I have built an example based on "eg1", the simplest in-process example provided with OmniORB. My main program eg1load.cc is as follows: ---------------------------------------------------------------------- // eg1load.cc - This a shared object version by Ben Keeping // of example 1 used in Chapter 2 // "The Basics" of the omniORB2 user guide. // // In this example, both the object implementation and the // client are in the same process. // // Usage: eg1 // #include #include #include "echo.hh" #include "greeting.cc" typedef CORBA::Object_var (*omserver) (CORBA::ORB_ptr orb,CORBA::BOA_ptr boa); int main(int argc, char **argv) { CORBA::ORB_ptr orb = CORBA::ORB_init(argc,argv,"omniORB2"); CORBA::BOA_ptr boa = orb->BOA_init(argc,argv,"omniORB2_BOA"); //load shared object implementing echo. void* temp=dlopen("./echo.so", RTLD_LAZY); if (!temp) { cerr<< dlerror(); // exit(1); }; //Get a handle to the shared objects "init" routine, and call it. omserver echoinit=(omserver) dlsym(temp,"init"); CORBA::Object_var obj=(*echoinit)(orb,boa); // It returns an object reference for our echo object. // In a real application this would usually be a factory object. Echo_ptr myobjRef = Echo::_narrow(obj); // Obtain an object reference. // Note: always use _this() to obtain an object reference from the // object implementation. hello(myobjRef); CORBA::release(myobjRef); // Dispose of the object reference. return 0; } ---------------------------------------------------------------------- The shared object echo.so is created by compiling echoso.cc which follows: ---------------------------------------------------------------------- // Shared object server code extracted from the eg1 example by // Ben Keeping #include "echo_i.cc" // init routine which the client will call, passing its orb and boa // and getting back an object reference. extern "C" CORBA::Object_var init(CORBA::ORB_ptr orb,CORBA::BOA_ptr boa) { // Create the object. Echo_i *echo = new Echo_i(); echo->_obj_is_ready(boa); // Start the server: note - uses the nonblocking OmniORB version. // Without this we would need to do our own multithreading. boa->impl_is_ready(0,1); return echo; } ---------------------------------------------------------------------- greeting.cc and echo_i.cc are unchanged from those in the example directory. Some changes were made to the dir.mk file to build the executable eg1load and the shared object echo.so. "eg1load" and "echoso" were added to the `all' list, and rules for shared object compilation and linking added. The IRIX version of these is: CXXDEBUGFLAGS = -g -mips4 -KPIC CXXSOLINKOPTIONS = -shared -n32 -mips4 -KPIC define CXXSharedObj (set -x; \ $(RM) $@; \ $(CXX) -o $@ $(CXXSOLINKOPTIONS) $(IMPORT_LIBRARY_FLAGS) \ $(filter-out $(LibSuffixPattern),$^) $$libs; \ ) endef The rule for building echoso is then: $(echoso): echoso.o $(CORBA_STUB_OBJS) $(CORBA_LIB_DEPEND) @(libs="$(CORBA_LIB)"; $(CXXSharedObj)) the "client", eg1load, is built just by compiling eg1load.cc given above: $(eg1load): eg1load.o $(CORBA_STUB_OBJS) $(CORBA_LIB_DEPEND) @(libs="$(CORBA_LIB)"; $(CXXExecutable)) The idea of all this is that if I have two alternative implementations of "echo", I can specify at runtime which one I want to use. The argument to dlopen doesn't have to be a literal string of course! For the type of application I am interested in, it is important for the objects to be defined in-process because I anticipate large, frequent interactions. I have used this mechanism successfully on Solaris and SGI implementations. But I would like to know if there are better/different ways of achieving the same thing? Note: for Windows users, LoadLibrary and GetProcAddress can be used instead of dlopen and dlsym. Ben Keeping Imperial College From Fabien.Azavant@enst.fr Fri Jan 22 16:27:11 1999 From: Fabien.Azavant@enst.fr (Fabien Azavant) Date: Fri, 22 Jan 1999 17:27:11 +0100 Subject: [omniORB] omniORB2 and ADA95 Message-ID: <36A8A6DF.FC437834@enst.fr> Hello, we are a group of students about to program an IDL compiler for ADA95 on top of omniORB2, under GNU licence. If anyone has comments, questions, or things you would like to tell us, that would help us in this project, feel free to reply. Fabien Azavant http://www.enst.fr/~azavant From Oliver.Kellogg@vs.dasa.de Fri Jan 22 18:06:23 1999 From: Oliver.Kellogg@vs.dasa.de (Oliver M. Kellogg) Date: Fri, 22 Jan 1999 19:06:23 +0100 Subject: [omniORB] omniORB2 and ADA95 Message-ID: <9901221803.AA31558@gatekeeper.vs.dasa.de> Fabien Azavant wrote: > we are a group of students about to program an IDL compiler for ADA95 on > top of > omniORB2, under GNU licence. If anyone has comments, questions, or > things you would like to tell us, > that would help us in this project, feel free to reply. > I looked into this, but got shyed off by the copious use of multiple inheritance in OmniORB. Not so great for mapping to Ada... apart from the fact that GNAT-3.11 still has problems with the C++ interfacing (I am in touch with ACT for clearing these up) -- Oliver From vanco@sonic.net Sat Jan 23 06:25:56 1999 From: vanco@sonic.net (Aaron Van Couwenberghe) Date: Fri, 22 Jan 1999 22:25:56 -0800 Subject: [omniORB] 2.7.0 question: IOP::TaggedProfile multiple defs. Message-ID: <19990122222556.A16367@spire.ddns.org> Quick question. I just got and built omniorb 2.7.0 (also added a few random lc mods from duncan -- this doesn't affect what this post is about though) for use with the Berlin project. Just had one problem. our 115k of idl worked fine with >=3D 2.6.0; seems to here as well. however upon linking the SK.o/DynSK.o files into the usual shared library, I recieve this error: glyphSK.o: In function OP::TaggedProfile::NP_alignedSize(unsigned int)': /usr/local/include/omniORB2/IOP.h:64: multiple definition of =07lobal constructors keyed to _CORBA_Unbounded_Sequence::NP_alignedSize(unsigned int) const' unicharSK.o:/usr/local/include/omniORB2/IOP.h:64: first defined here collect2: ld returned 1 exit status Anybody ever encountered this before? Any known method to fix it? I also went back over my files to make sure I hadn't left any dangling extras in there. --=20 =2E.Aaron Van Couwenberghe... ..vanco@sonic.net.. ..aaronv@debian.org.... Berlin: http://www.berlin-consortium.org Debian GNU/Linux: http://www.debian.org Nullum magnum ingenium sine mixtura dementiae fuit. -- Seneca From Paul.Nader@alcatel.com.au Mon Jan 25 06:20:39 1999 From: Paul.Nader@alcatel.com.au (Paul Nader) Date: Mon, 25 Jan 1999 17:20:39 +1100 Subject: [omniORB] Re: Porting omniEvents to NT? References: <3694C54E.F4F44E62@oce.nl> Message-ID: <99Jan25.171157est.40324@border.alcanet.com.au> Hi Casper, My appologies if I haven't replied to your mail (I honestly can't remember and my mail filters have been playing up lately). The short answer is 'try it'. It shouln't be very difficult because omniORB already runs on NT. All you have to do is get an implementation of the STL (which Visual C++ probably already has) and compile the code. If you have any specific problems let me know and I'll lend a hand. Again, sorry for the late reply... Paul. Casper Stoel wrote: > As will be clear from the subject, who has ported Paul Nader's > omniEvents to NT? I am no porting wizard and could use some help in this > task... > Any pointers are welcome! > > Casper Stoel -- Paul Nader mailto:Paul.Nader@alcatel.com.au Principal Engineer PH: (61.2) 9690 5421 Network Integration Division FX: (61.2) 9690 5225 Alcatel Telecom, Australia 280 Botany Rd, Alexandria, Sydney From bednarz@smartsol.ch Mon Jan 25 11:09:56 1999 From: bednarz@smartsol.ch (Thomas Bednarz) Date: Mon, 25 Jan 1999 12:09:56 +0100 Subject: [omniORB] Beginner question connection management Message-ID: Hello, I am new to CORBA and OmniORB, so please forgive my stupid questions. However I have some experience in writing RPC applications and I am currently starting porting them to CORBA. As with my RPC apps I don't like to use any naming services, since every client knows to which server he needs to talk. The thing is that all Servers are Win32 services but can be a client or server at the same time (in different threads inside the service). Additionally some web clients (JAVA applets or servlets) may also call these Servers. I have read chapter 7 regarding the connection management, but still a lot of things remain unclear to me. The problem is, that most of my objects need to be created dynamically, since they represent some OS and machine specific operations. As I understand it, I need to implement a factory interface which then creates, registers and afterwards destroys my objects dynamically on client requests. Is it correct, that this factory object needs to be registered with BOA when my server starts? How do I obtain a reference to this object from a different machine WITHOUT using the naming service? Do I need to specify -ORBInitialHost and -ORBInitialPort on the CLIENT and pass the name of the server? In chapter 4.6 I read that since version 2.6 a bootstrap service is provided. From reading this I guess this would be a good thing for me to use. Is it correct that on Solaris I have to provide a cfg file and on NT I have to key in the data into the registry. Can't I use a cfg file on ALL platforms? Where must I place this cfg file? I would greatly appreciate any help that could bring me a few steps further. Thank you! Thomas --------------------------------------- SMART Solutions AG Software Engineering & Consulting PO Box Oberwiesenstrasse 5 CH-8304 Wallisellen / Switzerland Phone: +41 1 877 72 72 FAX: +41 1 883 16 79 Web: www.smartsol.ch --------------------------------------- From Byrne_Matt@videojet.com Mon Jan 25 14:16:00 1999 From: Byrne_Matt@videojet.com (Byrne_Matt) Date: Mon, 25 Jan 1999 08:16:00 -0600 Subject: [omniORB] omniORB 2.7.0 is released! Message-ID: Hi. I just tried to switch from 2.6.1 to 2.7.0 (Windows NT 4.0, MSVC 5.0). Now, I get a exception when accessing a MemBufferedStream. A sample of my code is below. Has anyone else run into this problem? Datum& a_datum; MemBufferedStream buffer((_CORBA_Char *)a_datum.m_dptr); unsigned long len; len <<= buffer; //I receive an exception here The constructor for MemBufferedStream was changed from 2.6.1 to 2.7.0. I believe there is a bug here but I am not familiar enough with the code to be sure. Can someone help me out? Thanks Matt From rw@neurotec.de Mon Jan 25 16:01:00 1999 From: rw@neurotec.de (Ralf Walther) Date: Mon, 25 Jan 99 16:01:00 GMT Subject: [omniORB] How to spawn savely new Servers from a o Message-ID: <36AC9578@mailgateway.neurotec.de> Hi CORBAholics! I have implemented an omniOrb server, which has a special method to spawn a new server process. At first it forks and then replaces via execl the execution code of the new process. The father process has opened a pipe to communicate with the child process; the new server stringifies its IOR and returns it to the father process. Unfortunatly we run into trouble, because open file descriptors of the orb have been copied, too. In the archive, I've found an article about this topic, but it wasn't able to answer my questions ... (http://www.orl.co.uk:80/omniORB/archives/1998-04/0110.html) HOW TO spawn savely a new CORBA server within a servers method ??? Why isn't it enough to act like this? - fork server process - child process calls setsid() to change the father process id to 1 (init) - close fds (But which? All but 0,1,2 ?) - execl Thanks in advance Ralf From Mark.Spiteri@cl.cam.ac.uk Mon Jan 25 15:18:37 1999 From: Mark.Spiteri@cl.cam.ac.uk (Mark David Spiteri) Date: Mon, 25 Jan 1999 15:18:37 +0000 Subject: [omniORB] OmniOrb 2.7 / Linux glibc / libstgc++ 2.9 Message-ID: Hi, I've downloaded and installed omniorb 2.7 on Redhat 5.2 and got the complaint regarding lack of libstdc++ 2.9. So I downloaded the relevant 2.9 rpm from redhat's contrib ftp server but now I get the following omniORB/bin/i586_linux_2.0_glibc/omniNames: error in loading shared libraries /usr/lib/libstdc++.so.2.9: undefined symbol: __register_frame_info I can only assume I have not quite got the same version as omniOrb is compiled against. Any pointers as to the exact version this is supposed to be? Thanks. Mark From ayampolsky@erols.com Mon Jan 25 16:04:53 1999 From: ayampolsky@erols.com (Armen Yampolsky) Date: Mon, 25 Jan 1999 16:04:53 +0000 Subject: [omniORB] Re: OmniOrb 2.7 / Linux glibc / libstgc++ 2.9 References: Message-ID: <36AC9625.8A31EABA@erols.com> Mark, I had some trouble getting the newest egcs and all dependent packages onto my system through rpm, so I am using "old" versions. The following work fine on my system (RedHat 5.1) with the latest omniORB: libstdc++-2.8.0-8 egcs-1.0.2-8 gcc-2.7.2.3-11 glibc-2.0.7-13 Good luck, -Armen Mark David Spiteri wrote: > Hi, I've downloaded and installed omniorb 2.7 on Redhat 5.2 and got the > complaint regarding lack of libstdc++ 2.9. So I downloaded the relevant 2.9 > rpm from redhat's contrib ftp server but now I get the following > > omniORB/bin/i586_linux_2.0_glibc/omniNames: error in loading shared libraries > /usr/lib/libstdc++.so.2.9: undefined symbol: __register_frame_info > > I can only assume I have not quite got the same version as omniOrb is compiled > against. Any pointers as to the exact version this is supposed to be? Thanks -- Armen Yampolsky Axiom Software Labs New York From Fabien.Azavant@enst.fr Mon Jan 25 18:16:08 1999 From: Fabien.Azavant@enst.fr (Fabien Azavant) Date: Mon, 25 Jan 1999 19:16:08 +0100 Subject: [omniORB] OmniOrb 2.7 / Linux glibc / libstgc++ 2.9 References: Message-ID: <36ACB4E8.9E3D277A@enst.fr> Hello, I encountered a similar problem with Redhat 5.1 I just put a symbolic link from libstdc++ 2.9 to libstdc++ 2.8 It seems to work fine, but if someone can tell me where I can download a libstdc++ 2.9 for redhat, I'm interested. Thanks. Fabien Azavant Mark David Spiteri wrote: > Hi, I've downloaded and installed omniorb 2.7 on Redhat 5.2 and got the > complaint regarding lack of libstdc++ 2.9. So I downloaded the relevant 2.9 > rpm from redhat's contrib ftp server but now I get the following > > omniORB/bin/i586_linux_2.0_glibc/omniNames: error in loading shared libraries > /usr/lib/libstdc++.so.2.9: undefined symbol: __register_frame_info > > I can only assume I have not quite got the same version as omniOrb is compiled > against. Any pointers as to the exact version this is supposed to be? Thanks. > > Mark From bjornw@fairplay.no Mon Jan 25 18:58:35 1999 From: bjornw@fairplay.no (bjornw@fairplay.no) Date: 25 Jan 1999 19:58:35 +0100 Subject: [omniORB] OmniOrb 2.7 / Linux glibc / libstgc++ 2.9 In-Reply-To: Fabien Azavant's message of "Mon, 25 Jan 1999 19:16:08 +0100" References: <36ACB4E8.9E3D277A@enst.fr> Message-ID: Fabien Azavant writes: I'm running binutils-2.9.1.0.19 together with egcs-1.1.1 and omniORB works like a charm. Get binutil-2.9.1.0.19 from the maintainer if you can't find it anywhere else: ftp://ftp.yggdrasil.com/private/hjl/ get egcs-1.1.1 from egcs.cygnus.com Compile and install! I experienced a problem with a rpm called binutils-2.9.1.0.19-2.rpm, which worked very well with /usr/bin/gcc (2.7.2) but didn't work at all with egcs-1.1.1, so to be 100% sure, compile and install by yourself. (And btw, you should grab the kernel of 2.0.36 which has some thread-patches for omniorb to work properly.) > Hello, > > I encountered a similar problem with Redhat 5.1 > I just put a symbolic link from libstdc++ 2.9 to libstdc++ 2.8 > It seems to work fine, > but if someone can tell me where I can download a libstdc++ 2.9 for redhat, > I'm interested. Thanks. > > Fabien Azavant > > Mark David Spiteri wrote: > > > Hi, I've downloaded and installed omniorb 2.7 on Redhat 5.2 and got the > > complaint regarding lack of libstdc++ 2.9. So I downloaded the relevant 2.9 > > rpm from redhat's contrib ftp server but now I get the following > > > > omniORB/bin/i586_linux_2.0_glibc/omniNames: error in loading shared libraries > > /usr/lib/libstdc++.so.2.9: undefined symbol: __register_frame_info > > > > I can only assume I have not quite got the same version as omniOrb is compiled > > against. Any pointers as to the exact version this is supposed to be? Thanks. > > > > Mark From Martin.Renner@pp-ulm.de Tue Jan 26 06:59:25 1999 From: Martin.Renner@pp-ulm.de (Martin Renner) Date: Tue, 26 Jan 1999 07:59:25 +0100 Subject: [omniORB] omniORB 2.7.0 is released! In-Reply-To: <4.1.19990122101053.00a2e8d0@email> References: Message-ID: <4.1.19990126074914.00a24040@email> Hi. >omniORB2\include\omniORB2/bufferedStream.h(621) : warning C4800: [...] >620: inline void byteOrder(_CORBA_Char b) { >621: pd_byte_order = b; >622: } > >692: _CORBA_Boolean pd_byte_order; Noone of the programmers wants to give a statement about that? I think that one should change the implementation of "byteOrder". Either _CORBA_Boolean or _CORBA_Char, but not both mixed up.... or am I wrong? I want to compile my applications without any warning messages from the compiler. But "bufferedStream" causes a warning in each skeleton file. Martin From aaron98602@aol.com Tue Jan 26 08:49:08 1999 From: aaron98602@aol.com (aaron98602@aol.com) Date: Tue, 26 Jan 1999 08:49:08 +0000 Subject: [omniORB] question. Message-ID: INTERNATIONAL DRIVER'S LICENSE Need a new driver's license? Too many points or other trouble? Want a license that can never be suspended or revoked? Want ID for nightclubs or hotel check-in? Avoid tickets, fines, and mandatory driver's education. Protect your privacy, and hide your identity. The United Nations gave you the privilege to drive freely throughout the world! (Convention on International Road Traffic of September 19, 1949 & World Court Decision, The Hague, Netherlands, January 21, 1958) Take advantage of your rights. Order a valid International Driver's License that can never be suspended or revoked. Confidentiality assured. CALL NOW!!! 1-937-586-9313 From rw@neurotec.de Tue Jan 26 12:01:00 1999 From: rw@neurotec.de (Ralf Walther) Date: Tue, 26 Jan 99 12:01:00 GMT Subject: [omniORB] spawn a server from a server part 2 Message-ID: <36ADAEB5@mailgateway.neurotec.de> Hi CORBAholics, again on the topic of spawning a new omniORB server from another omniORB server. As I've mentioned in my last request, I think I have to close all omniORB specific file descriptors (fds) after the fork call and BEFORE the exec call. That's ok, because after the exec a new server initializes the omniORB resources and this could raise problems. (I think this could be done via setting the close-on-exec flag of every fd, which was opened from the orb). BUT, what about the time span between the fork and the closing of the fds? Is it possible or not, that after the fork, two threads read concurrently from a fd? If yes, it's in principle possible, that a thread in the child process reads some data from a fd and the parent waits for them ... and wait ...! The data would be lost after the exec. Is this true? Are there any mechanisms in omniORB to block all threads for this very little time, so I've time to close the fds? What is the general way to spawn a new omniORB server process from another server process ?????? I would be very pleased, if anybody could tell me some hints on this topic. Thanks in advance Ralf ----------------------- rw@neurotec.de From S.Lo@orl.co.uk Tue Jan 26 13:18:02 1999 From: S.Lo@orl.co.uk (Sai-Lai Lo) Date: 26 Jan 1999 13:18:02 +0000 Subject: [omniORB] OmniOrb 2.7 / Linux glibc / libstgc++ 2.9 In-Reply-To: Fabien Azavant's message of "Mon, 25 Jan 1999 19:16:08 +0100" References: <36ACB4E8.9E3D277A@enst.fr> Message-ID: <3oaez6w4tx.fsf@neem.cam-orl.co.uk> >>>>> Fabien Azavant writes: > I encountered a similar problem with Redhat 5.1 I just put a symbolic > link from libstdc++ 2.9 to libstdc++ 2.8 It seems to work fine, but if > someone can tell me where I can download a libstdc++ 2.9 for redhat, I'm > interested. Thanks. Don't do that or you will have some unexpected crashes in future. omniORB 2.7.0 for linux glibc2 is compiled with egcs-1.1.1. libstdc++ 2.9 comes with egcs-1.1.1. There is no safe alternative but to install egcs-1.1.1. And use these configure options to build egcs-1.1.1: $ ./configure --enable-shared --enable-threads We are using binutils-2.9.1.0.14. Older versions have bugs that would affect C++ programs. I think Redhat 5.2 comes with binutils-2.9.1.0.15 so it should be alright. Until Redhat and other distributions incorporates egcs-1.1.1, there is no alternative but to build the compiler yourself. Sai-Lai -- Dr. Sai-Lai Lo | Research Scientist | E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab | 24a Trumpington Street Tel: +44 223 343000 | Cambridge CB2 1QA Fax: +44 223 313542 | ENGLAND From c1040@azfms.com Tue Jan 26 14:33:17 1999 From: c1040@azfms.com (Rusty Carruth) Date: Tue, 26 Jan 1999 07:33:17 -0700 Subject: [omniORB] spawn a server from a server part 2 Message-ID: <9901261433.AA09584@fmsserv99.azfms.com> > > Are there any mechanisms in omniORB to block all threads for this > very little time, so I've time to close the fds? > > What is the general way to spawn a new omniORB server process from > another > server process ?????? we use fork1, which only forks the current thread. If your OS has that, then the only thing you have to worry about is the deadlock you can get into if you are printing in a thread which is not copied, and then you try to print in the forked thread - you cannot print because that other (non-existant) thread has the print resources locked, and since it does not exist, it will never get back around to release them (it?) for you. So, if you do fork1 (under Solaris, anyway), don't follow it with a printf unless you are certain that no other thread will ever be printf'ing when the fork1 happens... The above is for Solaris 2.5.1, anyway. YMMV. rusty From bjornw@fairplay.no Tue Jan 26 15:03:06 1999 From: bjornw@fairplay.no (bjornw@fairplay.no) Date: 26 Jan 1999 16:03:06 +0100 Subject: [omniORB] OmniOrb 2.7 / Linux glibc / libstgc++ 2.9 In-Reply-To: Sai-Lai Lo's message of "26 Jan 1999 13:18:02 +0000" References: <36ACB4E8.9E3D277A@enst.fr> <3oaez6w4tx.fsf@neem.cam-orl.co.uk> Message-ID: Sai-Lai Lo writes: > >>>>> Fabien Azavant writes: > > > I encountered a similar problem with Redhat 5.1 I just put a symbolic > > link from libstdc++ 2.9 to libstdc++ 2.8 It seems to work fine, but if > > someone can tell me where I can download a libstdc++ 2.9 for redhat, I'm > > interested. Thanks. > > Don't do that or you will have some unexpected crashes in future. > > omniORB 2.7.0 for linux glibc2 is compiled with egcs-1.1.1. libstdc++ 2.9 > comes with egcs-1.1.1. There is no safe alternative but to install > egcs-1.1.1. And use these configure options to build egcs-1.1.1: > > $ ./configure --enable-shared --enable-threads > > We are using binutils-2.9.1.0.14. Older versions have bugs that would > affect C++ programs. I think Redhat 5.2 comes with binutils-2.9.1.0.15 so > it should be alright. > > Until Redhat and other distributions incorporates egcs-1.1.1, there is no > alternative but to build the compiler yourself. btw, I saw a recommendation from H.J.Lu (maintainer of binutils) on the egcs-news group to use binnutils-2.9.1.0.19 together with egcs-1.1.1. Apparently the new binutils should work better with shared libraries and exception-handling. I'm using binutils-2.9.1.0.19 together with egcs-1.1.1 and omniorb-2.6.1 and it works without problems. btw: did you fix the ::sleep() call from omni_thread::sleep() ? > > Sai-Lai > > -- > Dr. Sai-Lai Lo | Research Scientist > | > E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab > | 24a Trumpington Street > Tel: +44 223 343000 | Cambridge CB2 1QA > Fax: +44 223 313542 | ENGLAND From S.Lo@orl.co.uk Tue Jan 26 16:07:36 1999 From: S.Lo@orl.co.uk (Sai-Lai Lo) Date: 26 Jan 1999 16:07:36 +0000 Subject: [omniORB] omniORB 2.7.0 is released! In-Reply-To: Byrne_Matt's message of "Mon, 25 Jan 1999 08:16:00 -0600" References: Message-ID: <3obtjmow53.fsf@neem.cam-orl.co.uk> >>>>> Byrne Matt writes: > Hi. > I just tried to switch from 2.6.1 to 2.7.0 (Windows NT 4.0, MSVC 5.0). > Now, I get a exception when accessing a MemBufferedStream. A sample > of my code is below. Has anyone else run into this problem? > Datum& a_datum; > MemBufferedStream buffer((_CORBA_Char *)a_datum.m_dptr); > unsigned long len; > len <<= buffer; //I receive an exception here > The constructor for MemBufferedStream was changed from 2.6.1 to 2.7.0. > I believe there is a bug here but I am not familiar enough with the > code to be sure. Can someone help me out? Byrne, Warning! MemBufferedStream is an internal interface and is not intended to be used in the application code. The interface has indeed been cleaned up in 2.7.0. All the changes should be transparent if you stay with the C++ mapping as defined in the CORBA spec. May be there are other compliant ways to do what you want. Sai-Lai -- Dr. Sai-Lai Lo | Research Scientist | E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab | 24a Trumpington Street Tel: +44 223 343000 | Cambridge CB2 1QA Fax: +44 223 313542 | ENGLAND From S.Lo@orl.co.uk Tue Jan 26 16:11:01 1999 From: S.Lo@orl.co.uk (Sai-Lai Lo) Date: 26 Jan 1999 16:11:01 +0000 Subject: [omniORB] omniORB 2.7.0 is released! In-Reply-To: Martin Renner's message of "Tue, 26 Jan 1999 07:59:25 +0100" References: <4.1.19990126074914.00a24040@email> Message-ID: <3o7luaovze.fsf@neem.cam-orl.co.uk> >>>>> Martin Renner writes: > Hi. >> omniORB2\include\omniORB2/bufferedStream.h(621) : warning C4800: > [...] >> 620: inline void byteOrder(_CORBA_Char b) { >> 621: pd_byte_order = b; >> 622: } >> >> 692: _CORBA_Boolean pd_byte_order; > Noone of the programmers wants to give a statement about that? > I think that one should change the implementation of "byteOrder". Either > _CORBA_Boolean or _CORBA_Char, but not both mixed up.... or am I wrong? > I want to compile my applications without any warning messages from the > compiler. But "bufferedStream" causes a warning in each skeleton file. Yes, it is a mistake. Part of the changes in a big merge got left out. Will be fixed in future releases. In the mean time: Just do this: bufferedStream.h, line 621: pd_byte_order = (b != 0); Sai-Lai -- Dr. Sai-Lai Lo | Research Scientist | E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab | 24a Trumpington Street Tel: +44 223 343000 | Cambridge CB2 1QA Fax: +44 223 313542 | ENGLAND From S.Lo@orl.co.uk Tue Jan 26 16:15:22 1999 From: S.Lo@orl.co.uk (Sai-Lai Lo) Date: 26 Jan 1999 16:15:22 +0000 Subject: [omniORB] Re: Omniorb and Java In-Reply-To: Armen Yampolsky's message of "Thu, 21 Jan 1999 16:58:23 +0000" References: <36A75CAF.6A4AE0B7@erols.com> Message-ID: <3o3e4yovs5.fsf@neem.cam-orl.co.uk> >>>>> Armen Yampolsky writes: > You need to change it in two places. First, in your server, write > omniORB::idleConnectionScanPeriod(omniORB::idleIncoming, 0); //0 turns > timeout off > Next, if you are using omniNames, you must alter the source code to do > the same thing. I am attaching our modification to omniNames.cc which > allows you to call it with an additional argument: '-ORBinConScanPeriod > '. ORL said they will add the args: > -ORBinConScanPeriod > -ORBoutConScanPeriod > in the next release. Anyway, you must set that (the incoming) to 0. As promised, the command line options are there in 2.7.0. Sai-Lai From S.Lo@orl.co.uk Tue Jan 26 16:34:19 1999 From: S.Lo@orl.co.uk (Sai-Lai Lo) Date: 26 Jan 1999 16:34:19 +0000 Subject: [omniORB] outScavenger kill In-Reply-To: "Renzo Tomaselli"'s message of "Fri, 22 Jan 1999 10:16:36 +0100" References: <01bb01be45e9$2bd49080$11fc46c1@big> Message-ID: <3oyamqngc4.fsf@neem.cam-orl.co.uk> >>>>> Renzo Tomaselli writes: > Hi, we experienced a problem with Visual Basic managing an OCX which > links to an OmniORB related implementation. When switching from design > mode to run mode and the contrary, Visual Basic crashes because DLLs are > unloaded from memory, while the outScavenger thread is still alive. When > the timer wakes it up, there is no loaded code to run and everything > blows up. We cannot understand how VB unloads depending modules while > active threads are still alive (it doesn't happen with VC). Anyway, the > problem is that killOutScavenger is never called from OmniORB code; also > there is no explicit ORB shutdown to call when all things are going to > die. > From the BOA point of view there are impl_is_ready/impl_shutdown > entry points which do the correct job for inScavenger, so everythings > works fine there. What about explicitely calling killOutScavenger from a > key application destructor when things go down ? Thanks, Renzo Tomaselli Renzo, As you have found out, outScavenger is never stopped. We may be able to do a call to killOutScavenger and killInScavenger in the dtor of a global so it will be called when main() returns. For instance, something like this in scavenger.cc class scavengerCleaner { public: ~scavengerCleaner(); static scavengerCleaner theInstance; }; scavengerCleaner scavnegerCleaner::theInstance; scavengerCleaner::~scavengerCleaner() { StrandScavenger::killInScavenger(); StrandScavenger::killOutScavenger(); } Please try this out. Of course, there could still be a number of client threads created by the applications. I suppose these can be left to the application to do something about it. Sai-Lai -- Dr. Sai-Lai Lo | Research Scientist | E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab | 24a Trumpington Street Tel: +44 223 343000 | Cambridge CB2 1QA Fax: +44 223 313542 | ENGLAND From S.Lo@orl.co.uk Tue Jan 26 16:40:34 1999 From: S.Lo@orl.co.uk (Sai-Lai Lo) Date: 26 Jan 1999 16:40:34 +0000 Subject: [omniORB] spawn a server from a server part 2 In-Reply-To: c1040@azfms.com's message of "Tue, 26 Jan 1999 07:33:17 -0700" References: <9901261433.AA09584@fmsserv99.azfms.com> Message-ID: <3ou2xeng1p.fsf@neem.cam-orl.co.uk> >>>>> Rusty Carruth writes: >> >> Are there any mechanisms in omniORB to block all threads for this >> very little time, so I've time to close the fds? >> >> What is the general way to spawn a new omniORB server process from >> another >> server process ?????? > we use fork1, which only forks the current thread. If your OS has > that, then the only thing you have to worry about is the deadlock you > can get into if you are printing in a thread which is not copied, > and then you try to print in the forked thread - you cannot print because > that other (non-existant) thread has the print resources locked, and > since it does not exist, it will never get back around to release them > (it?) for you. So, if you do fork1 (under Solaris, anyway), don't follow > it with a printf unless you are certain that no other thread will ever > be printf'ing when the fork1 happens... > The above is for Solaris 2.5.1, anyway. YMMV. I think as Rusty points out, the way to spawn a new server process is quite OS dependent. In particular, does the OS recreate all the threads in the child? I'm not sure if all the different flavours of Unix behave in the same way and if it is possible to write generic code that works on all platforms. If you find a sure way that works on a specific platform, do share with us on this list. Sai-Lai -- Dr. Sai-Lai Lo | Research Scientist | E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab | 24a Trumpington Street Tel: +44 223 343000 | Cambridge CB2 1QA Fax: +44 223 313542 | ENGLAND From atai@ece.ucsd.edu Wed Jan 27 01:35:59 1999 From: atai@ece.ucsd.edu (Andy Tai) Date: Tue, 26 Jan 1999 17:35:59 -0800 (PST) Subject: [omniORB] is there a way to check if two obj references are colocated? Message-ID: <199901270135.RAA11895@vision.ucsd.edu> Hi, I wonder, given two object references (say a_ptr and b_ptr), is there any way to find out if they are colocated (in the same addressing space)? Also, given an object implementation which implements some interface A, and an object reference of interface B, is there a way to check (from inside the object implementation) if these two objects are colocated? I hope there is a CORBA-blessed way to do this... Thanks for any info. -- Li-Cheng Tai (Andy Tai) e-mail: atai@ece.ucsd.edu Visual Computing Lab telephone: +1 (619) 534-5935 Dept. of ECE, UCSD, Mail Code 0407 fax: +1 (619) 534-1004 La Jolla, CA 92093-0407, USA http://www-vision.ucsd.edu/~atai/ From grohmann@ike.uni-stuttgart.de Wed Jan 27 08:26:04 1999 From: grohmann@ike.uni-stuttgart.de (Grohmann, Axel) Date: Wed, 27 Jan 1999 09:26:04 +0100 Subject: [omniORB] is there a way to check if two obj references are colocated? References: <199901270135.RAA11895@vision.ucsd.edu> Message-ID: <36AECD9C.28A1D58@ike.uni-stuttgart.de> > Hi, I wonder, given two object references (say a_ptr and b_ptr), is > there any way to find out if they are colocated (in the same addressing > space)? Why do you want to know that?(It seems a bit like you are trying to find out something that is irrelevant in the CORBA thinking - it just does not matter where an object lives, as long as you can contact and use it.) Axel Grohmann Department of Knowledge Engineering and Numeric, IKE University of Stuttgart Pfaffenwaldring 31 D-70550 Stuttgart, Germany Phone: 0049 711 685-2130 Fax: 0049 711 685-2010 From Mark.Spiteri@cl.cam.ac.uk Wed Jan 27 11:09:13 1999 From: Mark.Spiteri@cl.cam.ac.uk (Mark David Spiteri) Date: Wed, 27 Jan 1999 11:09:13 +0000 Subject: [omniORB] OmniOrb 2.7 / Linux glibc / libstgc++ 2.9 In-Reply-To: Your message of "26 Jan 1999 13:18:02 GMT." <3oaez6w4tx.fsf@neem.cam-orl.co.uk> Message-ID: Thanks to all the people who advised me on setting this up. Doing as Sai Lai suggests truly seems the easiest way to achieve a working environment. I had tried getting the egcs1.1.1 rpm and its associated binutils(19) rpm, but that seemed to break all gcc/egcs. After toiling away to restore Redhat 5.2 to its original packages, we then got the source distribution of egcs1.1.1 from cygnus and made it up ourselves against the default 5.2 packages. Made and installed without problems and provides all the right bits, including a working libstdc++ 2.9. Now omniORB examples and code is compiling without problems. And those configure options as detailed below by Sai Lai are crucial. Regards Mark > Don't do that or you will have some unexpected crashes in future. > > omniORB 2.7.0 for linux glibc2 is compiled with egcs-1.1.1. libstdc++ 2.9 > comes with egcs-1.1.1. There is no safe alternative but to install > egcs-1.1.1. And use these configure options to build egcs-1.1.1: > > $ ./configure --enable-shared --enable-threads > > We are using binutils-2.9.1.0.14. Older versions have bugs that would > affect C++ programs. I think Redhat 5.2 comes with binutils-2.9.1.0.15 so > it should be alright. > > Until Redhat and other distributions incorporates egcs-1.1.1, there is no > alternative but to build the compiler yourself. > > Sai-Lai From J.Cowan@cs.ucl.ac.uk Wed Jan 27 12:40:11 1999 From: J.Cowan@cs.ucl.ac.uk (James Cowan) Date: Wed, 27 Jan 1999 12:40:11 -0000 Subject: [omniORB] Linux threads problem Message-ID: <01BE49F2.3CF03100@gateway> Hi I am having problems getting omniOrb working under Linux Programs core dump with segmentation violation errors in pthread_mutex_lock - see gdb output when running omniNames below. I guess that I have version mismatch. I have tried using both i586_linux_2.0_glibc and i586_linux_2.0 with no success. I am running Redhat 5 release 2.0.32, glibc development package glibc-devel-2.0.5c-10 and gcc version 2.7.2.3. Any help appreciated. James Cowan GDB is free software and you are welcome to distribute copies of it under certain conditions; type "show copying" to see the conditions. There is absolutely no warranty for GDB; type "show warranty" for details. GDB 4.16 (i386-redhat-linux), Copyright 1996 Free Software Foundation, Inc... (no debugging symbols found)... (gdb) run Starting program: /home/jcowan/omniORB_2.6.1/bin/i586_linux_2.0_glibc/omniNames (no debugging symbols found)...(no debugging symbols found)... Program received signal SIGSEGV, Segmentation fault. 0x401d342c in __pthread_mutex_lock () at mutex.c:112 (gdb) where #0 0x401d342c in __pthread_mutex_lock () at mutex.c:112 #1 0x401d49ac in __fresetlockfiles () at lockfile.c:87 #2 0x402ac7b3 in _IO_fread (buf=0xbffff5f4, size=44, count=1, fp=0x80665a8) at iofread.c:44 #3 0x402caace in __tzfile_compute (timer=1076886616, use_localtime=1076909916, leap_correct=0x4030439c, leap_hit=0xbffff6c4) at tzfile.c:283 #4 0x402c9a63 in tzset_internal () at tzset.c:197 #5 0x402ca7ec in __tz_convert () at tzset.c:561 #6 0x402c72b2 in localtime () at localtime.c:49 #7 0x402c7189 in ctime (t=0xbffff6c4) at ctime.c:33 #8 0x805b302 in timestamp::t () #9 0x805744c in log::log () #10 0x804d7e0 in main () (gdb) quit The program is running. Quit anyway (and kill it)? (y or n) Please answer y or n. From bjornw@fairplay.no Wed Jan 27 13:50:47 1999 From: bjornw@fairplay.no (bjornw@fairplay.no) Date: 27 Jan 1999 14:50:47 +0100 Subject: [omniORB] Linux threads problem In-Reply-To: James Cowan's message of "Wed, 27 Jan 1999 12:40:11 -0000" References: <01BE49F2.3CF03100@gateway> Message-ID: James Cowan writes: > Hi > > I am having problems getting omniOrb working under Linux > Programs core dump with segmentation violation errors in > pthread_mutex_lock - see gdb output when running omniNames below. > > I guess that I have version mismatch. I have tried using > both i586_linux_2.0_glibc and i586_linux_2.0 with no success. > > I am running Redhat 5 release 2.0.32, glibc development > package glibc-devel-2.0.5c-10 and gcc version 2.7.2.3. > > Any help appreciated. You need to upgrade all your components. I recommend installing RedHat 5.2 with kernel 2.0.36, to get the working thread-packages and binutils needed to run egcs-1.1.1 Also install egcs-1.1.1. Then you'll be able to compile and run omniorb happy hacking bjornw> From S.Lo@orl.co.uk Wed Jan 27 16:01:11 1999 From: S.Lo@orl.co.uk (Sai-Lai Lo) Date: 27 Jan 1999 16:01:11 +0000 Subject: [omniORB] Serialize a sequence of ANY In-Reply-To: Byrne_Matt's message of "Wed, 27 Jan 1999 09:32:00 -0600" References: Message-ID: <3oww28g0xk.fsf@neem.cam-orl.co.uk> >>>>> Byrne Matt writes: > How can I Serialize a sequence of ANY's in order to save them to a > file without using the MemBufferedStream. I am new to CORBA so excuse > me if this is not an appropriate question. Now I see where you are coming from! There is nothing in the CORBA core to allow you to do that. I suppose something like the externalization service can do it but you do not have the luxury to have one. A practical solution, which you are already using, is to serialise the values into a CDR stream (a byte stream that encode all data according to the rules that are part of GIOP) and then extract the value out again as if it is a byte stream. The MemBufferedStream class is indeed one such CDR stream. See if the following psuedo code works for you: SeqAny_t val; MemBufferedStream m; val >>= m; CORBA::ULong count = m.unRead(); while (count--) { CORBA::Octet v; v <<= m; StoreOctetToFileAsHex(v); } --------------- And the reverse: MemBufferedStream m; CORBA::Octet v; while (ReadOctetFromFile(v)) { v >>= m; } SeqAny_t val; val <<= m; If you have to do this, be careful to isolate this bit of code and carefully comment this to be omniORB2 specific. (In future versions, MemBufferedStream will be replaced with a more generic cdr stream object.) Regards, Sai-Lai -- Dr. Sai-Lai Lo | Research Scientist | E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab | 24a Trumpington Street Tel: +44 223 343000 | Cambridge CB2 1QA Fax: +44 223 313542 | ENGLAND From paf@inescn.pt Wed Jan 27 16:36:30 1999 From: paf@inescn.pt (Pedro Ferreira) Date: Wed, 27 Jan 1999 16:36:30 -0000 Subject: [omniORB] is there a way to check if two obj references are colocated? Message-ID: <003b01be4a13$31f95350$5a1875c2@inescn.pt> >> Hi, I wonder, given two object references (say a_ptr and b_ptr), is >> there any way to find out if they are colocated (in the same addressing >> space)? > >Why do you want to know that?(It seems a bit like you are trying to find out >something that is irrelevant in the CORBA thinking - it just does not matter where >an object lives, as long as you can contact and use it.) > >Axel Grohmann > Real world applications sometimes _do_ need to know it. Of course, you can always argue that, in a pure distributed system, it should be irrelevant. Imagine a scenario where you want to reansfer a large amount of data between to objects. Due to performance requirements, you can't afford using the ORB to do it. So you decide to create a TCP connection between the two objects and use it to transfer the data. Now, if if you knew the two objects were in the same address space, you could just pass a handle to a memory area and have a much better performance. What you should never do is to look inside the object reference as it is, by definition, opaque. You should always use other means (read, interface functions) to do it. For instance, get process ids and host names, and compare them. Just my two cents. Pedro _____________________________________________________ Pedro Alves Ferreira INESC - Porto Tel: 02 209 42 28 Pc da Republica, 93 R/C Fax: 02 208 41 72 4000 PORTO e-mail: paf@inescn.pt From Renzo Tomaselli" I had a similar problem for a distributed imaging application; however colocated objects do exchange data as memory area addresses, the ORB is n= ot involved. The vtable of C++ does the trick so performance is really at maximum. The great thing is that this is fully transparent to both client and server coding. Moving objects to different address spaces doesn't concern their coding, just performance (and off course retrieving the counterpart object, this is a naming issue). Btw, I'm interested to know why exchanging a large byte sequence through TCP/IP (sockets) should be faster than through ORB marshalling. Thanks, Renzo Tomaselli -------------------------------------------------------------------------= -- TecnoTP s.n.c. Special Information System Design Maso Pelauchi I38050 Ronchi Valsugana, Trento TN ITALY Tel. +39 0461 773164 Fax. +39 0461 771514 e-mail: renzo.tomaselli@tecnotp.it -------------------------------------------------------------------------= -- -----Original Message----- From: Pedro Ferreira To: Grohmann, Axel Cc: omniorb-list@orl.co.uk Date: mercoled=EC 27 gennaio 1999 18.01 Subject: Re: [omniORB] is there a way to check if two obj references are colocated? >>> Hi, I wonder, given two object references (say a_ptr and b_ptr), is >>> there any way to find out if they are colocated (in the same addressi= ng >>> space)? >> >>Why do you want to know that?(It seems a bit like you are trying to fin= d >out >>something that is irrelevant in the CORBA thinking - it just does not >matter where >>an object lives, as long as you can contact and use it.) >> >>Axel Grohmann >> > >Real world applications sometimes _do_ need to know it. >Of course, you can always argue that, in a pure distributed system, it >should be irrelevant. > >Imagine a scenario where you want to reansfer a large amount of data between >to objects. Due to performance requirements, you can't afford using the = ORB >to >do it. >So you decide to create a TCP connection between the two objects and use= it >to transfer the data. >Now, if if you knew the two objects were in the same address space, you >could >just pass a handle to a memory area and have a much better performance. > >What you should never do is to look inside the object reference as it is= , by >definition, opaque. You should always use other means (read, interface >functions) >to do it. >For instance, get process ids and host names, and compare them. > >Just my two cents. > >Pedro >_____________________________________________________ >Pedro Alves Ferreira >INESC - Porto Tel: 02 209 42 28 >Pc da Republica, 93 R/C Fax: 02 208 41 72 >4000 PORTO e-mail: paf@inescn.pt > > > From paf@inescn.pt Wed Jan 27 18:59:45 1999 From: paf@inescn.pt (Pedro Ferreira) Date: Wed, 27 Jan 1999 18:59:45 -0000 Subject: [omniORB] is there a way to check if two obj references are colocated? Message-ID: <00c201be4a27$348d0670$5a1875c2@inescn.pt> -----Original Message----- From: Renzo Tomaselli To: omniorb list Date: Quarta-feira, 27 de Janeiro de 1999 18:08 Subject: Re: [omniORB] is there a way to check if two obj references are colocated? >I had a similar problem for a distributed imaging application; however >colocated objects do exchange data as memory area addresses, the ORB is not >involved. The vtable of C++ does the trick so performance is really at >maximum. The great thing is that this is fully transparent to both client >and server coding. Moving objects to different address spaces doesn't >concern their coding, just performance (and off course retrieving the >counterpart object, this is a naming issue). Great! That's exactly what we do in our Digital TV Studio system. >Btw, I'm interested to know why exchanging a large byte sequence through >TCP/IP (sockets) should be faster than through ORB marshalling. Because using the ORB involves marshalling, unmarshalling, GIOP overhad, etc. However, most ORBs perform quite well when you use byte sequences. Take a look at OMG's "Control and Management of A/V Streams", somewhere at http://www.omg.org Doug Schmidt (http://www.cs.wustl.edu/~schmidt) also has several very interesting papers on that and other subjects, namely http://www.cs.wustl.edu/~schmidt/av.ps.gz Hope this helps, Pedro _____________________________________________________ Pedro Alves Ferreira INESC - Porto Tel: 02 209 42 28 Pc da Republica, 93 R/C Fax: 02 208 41 72 4000 PORTO e-mail: paf@inescn.pt Portugal From ehipp@coactive.com Wed Jan 27 21:37:06 1999 From: ehipp@coactive.com (Emily Hipp) Date: Wed, 27 Jan 1999 13:37:06 -0800 Subject: [omniORB] Dynanmic IP assignment with omni ORB? Message-ID: <21875FDEF3A7D211994600805FC74FEFFE65@AIRBAG> Hi all I have a ORB application that runs on an embedded target. The application has an inital object (similar to bootstrap) where the object reference gets generated by the client. The client, using the inital object, retrieves a list of all the internal object references from the application. Here is the tricky part: The target is contacted via PPP where the IP addresss of the target is dynamically assigned. The inital object reference can be calculated by the client (using the new IP address). The ORB seems to be able to handle this fine. However, the list of object references for the internal objects on the application need to be regenerated using the new IP address before sending them back to the client. Is there an easy way to do this? I tried to use dispose, then new on the internal objects (after changing the local IP address), but the IP address seems to be the same as before. Any help would be great! Emily From JUANMA@sag.es Thu Jan 28 18:20:53 1999 From: JUANMA@sag.es (Juan Manuel Rodriguez) Date: Thu, 28 Jan 1999 19:20:53 +0100 Subject: [omniORB] Problems in the comm between 2 CORBA modules Message-ID: Hello omniORBers. My problem is: I have 2 modules connected to a NameServer: a Sun (SunOS lambda 5.5.1 = Generic sun4m sparc SUNW,SPARCstation-5) and a PC.=20 Both modules are JAVA and one of it ("client") always runs in the PC and = connects to the other one to invoke his method.=20 Well, if I run the "server" module also from the PC all is OK (client gets = its reference and invokes his method), but if this "server" module is = running in the Sun, client gets its reference (server module registers = perfectly in the nameServer), but cannot execute the server function = because it says that is a non-valid reference.=20 I start Sun module with JRE 1.2 for Solaris (exactly jre12-solaris2-sparc.s= h file downloaded) and the PC module with JRE 1.2 for x86_win32. I see in the trace of the client module: Error: org.omg.CORBA.COMM_FAILURE: minor code: 2 completed: No Can anyone help me? What can be the cause? Thanks in advance Juanma. From dmorgen@alum.mit.edu Thu Jan 28 18:49:00 1999 From: dmorgen@alum.mit.edu (David Morgenlender) Date: Thu, 28 Jan 1999 18:49:00 GMT Subject: [omniORB] Sequence of Sequence causes client compiler errors!!! In-Reply-To: <36a16353.167867423@smtp.ne.mediaone.net> References: <366468EE.2615DB12@fairplay.no> <3or9uisp1n.fsf@neem.cam-orl.co.uk> <36a05c28.166031374@smtp.ne.mediaone.net> <36a16353.167867423@smtp.ne.mediaone.net> Message-ID: <36bbb0b7.97420506@smtp.ne.mediaone.net> I've defined a method with an output parameter which is a sequence of = sequences. Everything builds ok, until I try a call from a client, written in Visual= C++ 5.0. This gets a compiler error indicating the parameter has a = mismatched data type. I have similar code, which has a sequence of longs; this works = ok. Here are some excerpts from the code (simplified to only use the relevant calling parameter): .IDL ---- typedef sequence SingleTestResultsList; typedef sequence TestResultsList; void Test(out TestResultsList listTestResults); =09 .HH --- typedef _CORBA_Unbounded_Sequence_w_FixSizeElement=20 SingleTestResultsList; typedef _CORBA_Sequence_Var=20 SingleTestResultsList_var; typedef _CORBA_Unbounded_Sequence< _CORBA_Unbounded_Sequence_w_FixSizeElement >=20 TestResultsList; typedef _CORBA_Sequence_Var >=20 TestResultsList_var; virtual void _0RL__Test ( TestResultsList *& listTestResults ) =3D 0; void Test ( _CORBA_Sequence_OUT_arg< TestResultsList,TestResultsList_var > listTestResults ) { _0RL__Test ( listTestResults._data ); } class Tests : public virtual omniObject, public virtual CORBA::Object { public: typedef _CORBA_Unbounded_Sequence_w_FixSizeElement=20 SingleTestResultsList; typedef _CORBA_Sequence_Var=20 SingleTestResultsList_var; typedef _CORBA_Unbounded_Sequence< _CORBA_Unbounded_Sequence_w_FixSizeElement >=20 TestResultsList; typedef _CORBA_Sequence_Var >=20 TestResultsList_var; virtual void _0RL__Test ( TestResultsList *& listTestResults ) =3D 0; void Test ( = _CORBA_Sequence_OUT_arg =20 listTestResults ) { _0RL__Test ( listTestResults._data ); } Calling code in client ---------------------- Tests::TestResultsList seqResults; =09 INTERFACE_TESTS->Test(&seqResults); // also tried without the "&" =20 COMPILER ERROR -------------- =20 error C2664: 'Test' : cannot convert parameter 1 from=20 'class _CORBA_Unbounded_Sequence< class _CORBA_Unbounded_Sequence_w_FixSizeElement> *'=20 to 'class _CORBA_Sequence_OUT_arg>, class _CORBA_Sequence_Var>, class _CORBA_Unbounded_Sequence_w_FixSizeElement>>' Any idea what's going on??? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Dave Morgenlender e-mail: dmorgen@alum.mit.edu =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D From S.Lo@orl.co.uk Thu Jan 28 19:07:35 1999 From: S.Lo@orl.co.uk (Sai-Lai Lo) Date: 28 Jan 1999 19:07:35 +0000 Subject: [omniORB] Sequence of Sequence causes client compiler errors!!! In-Reply-To: dmorgen@alum.mit.edu's message of "Thu, 28 Jan 1999 18:49:00 GMT" References: <366468EE.2615DB12@fairplay.no> <3or9uisp1n.fsf@neem.cam-orl.co.uk> <36a05c28.166031374@smtp.ne.mediaone.net> <36a16353.167867423@smtp.ne.mediaone.net> <36bbb0b7.97420506@smtp.ne.mediaone.net> Message-ID: <3o90endxmw.fsf@neem.cam-orl.co.uk> >>>>> David Morgenlender writes: > .IDL > ---- > typedef sequence SingleTestResultsList; > typedef sequence TestResultsList; > void Test(out TestResultsList listTestResults); > Calling code in client > ---------------------- > Tests::TestResultsList seqResults; INTERFACE_TESTS-> Test(&seqResults); // also tried without the "&" > COMPILER ERROR > -------------- > error C2664: 'Test' : cannot convert parameter 1 from > 'class _CORBA_Unbounded_Sequence< > class _CORBA_Unbounded_Sequence_w_FixSizeElement> *' > to 'class _CORBA_Sequence_OUT_arg class _CORBA_Unbounded_Sequence_w_FixSizeElement>, > class _CORBA_Sequence_Var class _CORBA_Unbounded_Sequence_w_FixSizeElement>, > class _CORBA_Unbounded_Sequence_w_FixSizeElement>>' > Any idea what's going on??? This is a quick one. The signature of the argument expected is TestResultsList*&. It expects you to pass a TestResultsList* and on return a sequence is allocated on the heap by the callee and its pointer is written into your argument. Try this: Tests::TestResultsList* seqResults; INTERFACE_TESTS-> Test(seqResults); // Remember to free the sequence later. // Or define seqResults as Tests::TestResultsList_var. As to why the this is so, check the C++ mapping spec Table 24. Sai-Lai -- Dr. Sai-Lai Lo | Research Scientist | E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab | 24a Trumpington Street Tel: +44 223 343000 | Cambridge CB2 1QA Fax: +44 223 313542 | ENGLAND From dmorgen@alum.mit.edu Thu Jan 28 20:19:31 1999 From: dmorgen@alum.mit.edu (David Morgenlender) Date: Thu, 28 Jan 1999 20:19:31 GMT Subject: [omniORB] Sequence of Sequence causes client compiler errors!!! In-Reply-To: <3o90endxmw.fsf@neem.cam-orl.co.uk> References: <366468EE.2615DB12@fairplay.no> <3or9uisp1n.fsf@neem.cam-orl.co.uk> <36a05c28.166031374@smtp.ne.mediaone.net> <36a16353.167867423@smtp.ne.mediaone.net> <36bbb0b7.97420506@smtp.ne.mediaone.net> <3o90endxmw.fsf@neem.cam-orl.co.uk> Message-ID: <36bec4c1.102551527@smtp.ne.mediaone.net> Sai-Lai, >This is a quick one. > >The signature of the argument expected is TestResultsList*&. It expects = you >to pass a TestResultsList* and on return a sequence is allocated on the >heap by the callee and its pointer is written into your argument. > >Try this: > >Tests::TestResultsList* seqResults; > >INTERFACE_TESTS-> Test(seqResults); > >// Remember to free the sequence later. >// Or define seqResults as Tests::TestResultsList_var. > >As to why the this is so, check the C++ mapping spec Table 24. Thanks. That was a VERY fast response! This solves the problem. But, I'm mystified, because I could've sworn I = had tried exactly that! =20 IAE, I still don't understand why this compiles: Tests::TestResultsList* seqResults; INTERFACE_TESTS-> Test(seqResults); and this does not: Tests::TestResultsList seqResults; INTERFACE_TESTS-> Test(&seqResults); Clearly, they are very different in terms of execution. But from the compilation point of view, in each case the argument is "Tests::TestResultsList*". What am I missing? BTW, I had already realized I needed to allocate the sequence on the heap= & I was going to make the change as soon as I had solved this problem ... too= bad I didn't try fixing that first! =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Dave Morgenlender e-mail: dmorgen@alum.mit.edu =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D From gdd0@gte.com Thu Jan 28 20:39:36 1999 From: gdd0@gte.com (Gary D. Duzan) Date: Thu, 28 Jan 1999 15:39:36 -0500 Subject: [omniORB] Sequence of Sequence causes client compiler errors!!! Message-ID: <199901282039.PAA25270@lion.gte.com> In Message <36bec4c1.102551527@smtp.ne.mediaone.net> , dmorgen@alum.mit.edu (David Morgenlender) wrote: =>IAE, I still don't understand why this compiles: => => Tests::TestResultsList* seqResults; => INTERFACE_TESTS-> Test(seqResults); => =>and this does not: => => Tests::TestResultsList seqResults; => INTERFACE_TESTS-> Test(&seqResults); Test is probably defined to take a "Tests::TestResultsList*&", or a reference to a pointer. The first one defines storage for a pointer variable, so making a reference to it is no problem. The second is a temporary pointer value which doesn't have a memory location, so can't have a reference to it without creating a temporary variable for it, which is not done automatically unless it is a reference to a const. The basic issue is that Test() wants to write to the pointer, but that doesn't make sense in the second case. Gary Duzan GTE Laboratories From dmorgen@alum.mit.edu Thu Jan 28 21:38:05 1999 From: dmorgen@alum.mit.edu (David Morgenlender) Date: Thu, 28 Jan 1999 21:38:05 GMT Subject: [omniORB] Sequence of Sequence causes client compiler errors!!! In-Reply-To: <199901282039.PAA25270@lion.gte.com> References: <199901282039.PAA25270@lion.gte.com> Message-ID: <36c1d805.107484484@smtp.ne.mediaone.net> Gary, >=3D>IAE, I still don't understand why this compiles: >=3D> >=3D> Tests::TestResultsList* seqResults; >=3D> INTERFACE_TESTS-> Test(seqResults); >=3D> >=3D>and this does not: >=3D> >=3D> Tests::TestResultsList seqResults; >=3D> INTERFACE_TESTS-> Test(&seqResults); > > Test is probably defined to take a "Tests::TestResultsList*&", or a >reference to a pointer. The first one defines storage for a pointer >variable, so making a reference to it is no problem. The second is a >temporary pointer value which doesn't have a memory location, so can't >have a reference to it without creating a temporary variable for it, >which is not done automatically unless it is a reference to a const. > The basic issue is that Test() wants to write to the pointer, but >that doesn't make sense in the second case. I hate it when the answer is so obvious in hindsight ! The compiler = error didn't mention reference, instead saying there's a mismatch between 2 = very long complex types; so I got hung up on figuring out the data types, thereby = missing the obvious. Thanks for pointing that out! =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Dave Morgenlender e-mail: dmorgen@alum.mit.edu =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D From gutier@intergate.bc.ca Fri Jan 29 04:39:37 1999 From: gutier@intergate.bc.ca (Gerald Gutierrez) Date: Thu, 28 Jan 1999 20:39:37 -0800 Subject: [omniORB] wchar/wstring support Message-ID: <3.0.6.32.19990128203937.00798be0@mail.intergate.bc.ca> Hello all. I'm looking for wchar/wstring support in OmniORB. I realize that OmniORB is CORBA-2.0-based and thus doesn't have these. Are these features in OmniORB's near-term plans? From bvisscher@mindspring.com Fri Jan 29 05:43:42 1999 From: bvisscher@mindspring.com (Bruce Visscher) Date: Fri, 29 Jan 1999 00:43:42 -0500 Subject: [omniORB] Sequence of Sequence causes client compiler errors!!! References: <366468EE.2615DB12@fairplay.no> <3or9uisp1n.fsf@neem.cam-orl.co.uk> <36a05c28.166031374@smtp.ne.mediaone.net> <36a16353.167867423@smtp.ne.mediaone.net> <36bbb0b7.97420506@smtp.ne.mediaone.net> <3o90endxmw.fsf@neem.cam-orl.co.uk> <36bec4c1.102551527@smtp.ne.mediaone.net> Message-ID: <36B14A8D.D7DB1A94@mindspring.com> David Morgenlender wrote: > IAE, I still don't understand why this compiles: > > Tests::TestResultsList* seqResults; > INTERFACE_TESTS-> Test(seqResults); > > and this does not: > > Tests::TestResultsList seqResults; > INTERFACE_TESTS-> Test(&seqResults); > > Clearly, they are very different in terms of execution. But from the > compilation point of view, in each case the argument is > "Tests::TestResultsList*". What am I missing? The difference is that in the second case, you're binding a temporary to a non-const reference. C++ won't let you do that. In this case for good reason. You were trying to replace the address of a stack variable with a heap pointer. Not good at all. HTH, Bruce From hlehoux@adways.com Fri Jan 29 09:27:19 1999 From: hlehoux@adways.com (Herve Lehoux) Date: Fri, 29 Jan 1999 10:27:19 +0100 Subject: [omniORB] sequence<> size problem ?? Message-ID: <99012910365301.23209@maestro.adways.com> Hello, has anyone experienced problems with size of sequences with omniorb, or maybe i made a stupid programming error ? i use : idl :: typedef sequence rawdata; void generate( in double x0, in double x1, in double y0, in double y1, in unsigned short sx, in unsigned short sy, in unsigned short i, out rawdata result); client.cc :: rawdata *result= 0; p->generate(.../...,result); THE PROBLEM is i have a core dump when the real size of the output data is more than 1024*1024 ??? using the debugger i can see a CORBA::SystemException is thrown in the serverSK.cc skeleton by the _0RL__generate() method... the server is working ok, just client crashes. both work with smaller sizes i use omniORB 2.6.1 with DIGITAL C++ V6.0-010 on DIGITAL UNIX V4.0 thanks in advance for any help. From rwilson@advantix.com Fri Jan 29 14:44:17 1999 From: rwilson@advantix.com (Randy S Wilson) Date: Fri, 29 Jan 1999 09:44:17 -0500 Subject: [omniORB] 2.7.0, gcc 2.8.1, Solaris X86 Message-ID: <00a701be4b95$d9abd540$879e1ac7@rsw.advantix.com> This is a multi-part message in MIME format. ------=_NextPart_000_00A4_01BE4B6B.F053F310 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I'm considering a port of 2.7.0 to Solaris for X86, but was wondering if = anyone has already done this ? Does anyone have thoughts/comments/rants on Sun CC (4.2) vs gcc (2.8.1) = vs egcs (?) ? Is the thread issue on 2.8.1 gcc resolved (do the gcc managers even know = about it?) ? Does anyone have an interest in this port (if it works) ? This will probably be done in the next month. So if you have help or = suggestions please send them to me and let me know if you want to hear = back on how it goes. RSWilson ADVANTIX ------=_NextPart_000_00A4_01BE4B6B.F053F310 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I'm considering a port of 2.7.0 to = Solaris for=20 X86, but was wondering if anyone has already done this ?
Does anyone have = thoughts/comments/rants on Sun=20 CC (4.2) vs gcc (2.8.1) vs egcs (?) ?
Is the thread issue on 2.8.1 gcc = resolved (do=20 the gcc managers even know about it?) ?
Does anyone have an interest in this = port (if it=20 works) ?
 
This will probably be done in the next month.  = So if you=20 have help or suggestions please send them to me and let me know if you = want to=20 hear back on how it goes.
 
RSWilson
ADVANTIX
------=_NextPart_000_00A4_01BE4B6B.F053F310-- From lojewski@itwm.uni-kl.de Fri Jan 29 22:20:45 1999 From: lojewski@itwm.uni-kl.de (lojewski) Date: Fri, 29 Jan 1999 22:20:45 +0000 Subject: [omniORB] java applets Message-ID: <36B2343D.4B3E55AE@itwm.uni-kl.de> hallo ! i have a problem. i cannot contact the nameservice from an applet, when the applet is running on a different machine like the corba-nameservice. the same java application works fine in this enviroment. is it possible to low-down the secrurity-settings of the java2-appletviewer to do this ? how des it works ? thanks in advance cl. From knemeyer@ix.netcom.com Sat Jan 2 10:22:54 1999 From: knemeyer@ix.netcom.com (Manfred Knemeyer) Date: Sat, 2 Jan 1999 03:22:54 -0700 Subject: [omniORB] Help Please - Unable to contact naming service on Windows-95 Message-ID: <000301be363a$5c0b4c80$b799d6ce@default> This is a multi-part message in MIME format. ------=_NextPart_000_0000_01BE35FF.AFAC7480 Content-Type: text/plain; charset="windows-1250" Content-Transfer-Encoding: quoted-printable Hopefully someone can suggest why I am not able to run omniORB2 on my standalone Windows-95 system. I have not been able to find obviously relevant info in the archives. Any help will be appreciated. I very much would like to experiment and learn using omniOrb2. To narrow the problem, I have tried to list all of the details below. Thanks for your patience in reading them. knemeyer@ix.netcom.com I have installed the Windows-95 binary release of version 2.6.0 and rebuilt the echo examples (only) with MSC++ 6 + Patchkit 1 and gnu-win32-lite. The rebuilt example eg1 runs successfully, eg2's IOR argument exceeds the DOS window cmd line length limit, and eg3 fails in trying to contact the naming service. The environment variable OMNIORB2_CONFIG is set to the filepath of the configuration file (added after initial failures) which contains: NAMESERVICE IOR:. . . ORBInitialHost localhost ORBInitialPort 12345 Registry also contains the above 3 values; the IOR has been checked against the nameservice.exe startup message; localhost is the only entry in the \WINDOWS\Hosts file; the system was rebooted. omninames (not rebuilt) is running: Checkpointing completed. eg3_impl started, then eg3_clt started (in DOS windows). After some delay ... eg3_impl: Caught system exception COMM_FAILURE, unable to contact the = naming service. eg3_clt: Caught system exception COMM_FAILURE, unable to contact the = naming service. hello: cannot invoke on a nil object reference. omninames is still running. ------=_NextPart_000_0000_01BE35FF.AFAC7480 Content-Type: text/html; charset="windows-1250" Content-Transfer-Encoding: quoted-printable
Hopefully = someone can suggest=20 why I am not able to run omniORB2
on my standalone Windows-95 system.  = I have not=20 been able to find
obviously relevant info in the=20 archives.  Any help will be
appreciated.  I very much = would like=20 to experiment and learn using
omniOrb2.  To narrow the = problem, I=20 have tried to list all of the
details below.  Thanks for = your=20 patience in reading them.
 
knemeyer@ix.netcom.com<= /DIV>
 
I have = installed the=20 Windows-95 binary release of version 2.6.0
and rebuilt the = echo examples=20 (only) with MSC++ 6 + Patchkit 1 and
gnu-win32-lite.  The=20 rebuilt example eg1 runs=20 successfully,
eg2's IOR argument exceeds the DOS window cmd line length=20 limit,
and eg3 fails in trying to = contact the=20 naming service.
 
The = environment =20 variable OMNIORB2_CONFIG is set to the filepath
of the configuration file (added after = initial=20 failures) which
contains:
NAMESERVICE IOR:. . = .
ORBInitialHost = localhost
ORBInitialPort = 12345
 
Registry also contains the = above 3 values;=20 the IOR has been checked
against the nameservice.exe = startup=20 message; localhost is the only
entry in the \WINDOWS\Hosts = file; the=20 system was rebooted.
 
omninames (not rebuilt) is running: Checkpointing=20 completed.
 
eg3_impl = started, then=20 eg3_clt started (in DOS windows).
 
After some delay = ...
 
eg3_impl: Caught system = exception=20 COMM_FAILURE, unable to contact the naming service.
eg3_clt: Caught = system=20 exception COMM_FAILURE, unable to contact the naming service.
hello: = cannot=20 invoke on a nil object reference.
omninames is = still=20 running.
 
 
------=_NextPart_000_0000_01BE35FF.AFAC7480-- From Hugo.Vandeputte@meteo.fr Mon Jan 4 11:44:58 1999 From: Hugo.Vandeputte@meteo.fr (Hugo.Vandeputte) Date: Mon, 04 Jan 1999 12:44:58 +0100 Subject: [omniORB] Instantiating objects within (an initially) non executing server References: <199812311311.IAA16648@lion.gte.com> Message-ID: <3690A9BA.71FAB17D@meteo.fr> Gary D. Duzan wrote: > > The short answer is that no, this functionality is not available out > of the box. I believe there are hooks that can let you write a bit of > code to activate the object yourself, but that's it. > > Gary Duzan > GTE Laboratories I am actually working on an example and testsuite on load balancing and server starting on omniOrb (on unix). It's maybe not the better solution,but I hope it could help someone. First release in one or two weeks... Regards. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ H.Vandeputte o o o SCEM/TTI/DEV o o o mailto:Hugo.Vandeputte@meteo.fr _____ _ o __/_ Tel: 05.61.07.81.91 (_____)/ \ /o \/| _____/ ___ _// >____/\| _/_______/ ___/ / / /_/ /_/ ____________________________________________________________________ From dbyron@coactive.com Mon Jan 4 23:43:58 1999 From: dbyron@coactive.com (David Byron) Date: Mon, 04 Jan 1999 15:43:58 -0800 Subject: [omniORB] namespace handling when a compiler doesn't support it Message-ID: <3.0.5.32.19990104154358.00b10640@refuge> Apologies if this has been dealt with before, but the archive search was down when I tried to look.... I am porting OmniORB2 to a compiler that doesn't support namespaces (Diab, for those interested). The macros for dealing with namespaces when the compiler doesn't put code for a particular namespace in a class. I have multiple files that share a namespace, as in: file1.idl --------- module foo { // some declarations }; file2.idl --------- #include "file1.idl" module foo { // some more declarations }; In file2.hh, this becomes: #include class foo { // some more declarations, turned into C++ } Unfortunately, the stubs are trying to declare class foo twice, which my compiler flags as an error. Am I using namespaces in an unexpected way, or is there another way to define the _CORBA_MODULE... macros to deal with this? I can remove the namespace if I must, but I'd rather not. Thanks for your help. -DB --- David Byron dbyron@coactive.com Coactive Networks, Inc. http://www.coactive.com 4000 Bridgeway, Suite 303 voice:(415)289-1722 Sausalito, CA 94965 fax:(415)289-1320 From dcmay@object-workshops.com Tue Jan 5 01:32:24 1999 From: dcmay@object-workshops.com (Dietmar May) Date: Mon, 4 Jan 1999 20:32:24 -0500 Subject: [omniORB] namespace handling when a compiler doesn't support it Message-ID: David, > I am porting OmniORB2 to a compiler that doesn't support namespaces (Diab, for > those interested). The macros for dealing with namespaces when the compiler > doesn't put code for a particular namespace in a class. Orbix (pre-namespace circa ver. 2.2) handled this using concatenation of the module name with the interface name, separated by '_'. This generates: class foo_yourclass : ... { ... }; This is similar to the COM mapping in the CORBA interoperability spec, chapter 13. However, I don't think that omniORB can support this without changes (don't know how much would be required, but pretty sure you'd have to change omniORB sources in omni2idl). Look in src/tool/omniidl2/omniORB2_be/o2be_interface.cc (and o2be_constant.cc, etc). This is where the .hh and .cc generators are located. For instance: void o2be_interface::produce_hdr(std::fstream &s) { ... IND(s); s << "class " << uqname() << "_Helper {\n"; ... } See also o2be_name in src/tool/omniidl2/omniORB2_be/o2be.h. The method fqname() seems to return the fully qualified name (ie. scope name + unqualified name). If you can change uqname() to test a flag (that indicates whether to use concatenation), and return either the original value of uqname() or return fqname(), it may be pretty simple. Hope this is helpful. Regards, Dietmar May Software Architect Object Workshops, Inc. dcmay@object-workshops.com From objectdata@siliware.com Mon Jan 4 19:38:47 1999 From: objectdata@siliware.com (objectdata) Date: Mon, 04 Jan 1999 19:38:47 +0000 Subject: [omniORB] The Jini Community Message-ID: <369118C6.AC4E0B98@siliware.com> Sorry for the interruption. The Jini Community is a new gathering place where developers can discuss Javasoft's Jini technology. It has chat rooms, web board, security, email listserv, and search engine. The url for the new site is http://jini.siliware.com. Currently, we are seeking strategic alliances, partners, forum administrators, volunteers, and Jini related news, products, demos, and tutorials. If you or someone you know would like to participate in making Jini products and services or just simple wish to work with Jini, please let us know. You can become a forum administrator, showcase your Jini products and services, and exchange links to your Jini website. Take advantage of Javasoft's Source Community License. If you have not downloaded Jini and compiled the examples, you don't know what your missing. Jini is the next wave! Why not become a part of it. You got where you are by working harder than the next guy. Here is your chance to do it again. http://jini.siliware.com Jini Community Administrator Siliware, Inc. 45 Rockefeller Center, 20th Floor New York, NY 10111 Voice 212-332-8193 From dbyron@coactive.com Tue Jan 5 00:51:21 1999 From: dbyron@coactive.com (David Byron) Date: Mon, 04 Jan 1999 16:51:21 -0800 Subject: [omniORB] namespace handling when a compiler doesn't support it In-Reply-To: Message-ID: <3.0.5.32.19990104165121.00b07df0@refuge> >> I am porting OmniORB2 to a compiler that doesn't support namespaces (Diab, >for >> those interested). The macros for dealing with namespaces when the compiler >> doesn't put code for a particular namespace in a class. > >Orbix (pre-namespace circa ver. 2.2) handled this using concatenation of the >module name with the interface name, separated by '_'. This generates: > >class foo_yourclass : ... >{ > ... >}; > >This is similar to the COM mapping in the CORBA interoperability spec, chapter >13. However, I don't think that omniORB can support this without changes (don't >know how much would be required, but pretty sure you'd have to change omniORB >sources in omni2idl). > >Look in src/tool/omniidl2/omniORB2_be/o2be_interface.cc (and o2be_constant.cc, >etc). This is where the .hh and .cc generators are located. > >For instance: > >void o2be_interface::produce_hdr(std::fstream &s) >{ > ... > IND(s); s << "class " << uqname() << "_Helper {\n"; > ... >} > >See also o2be_name in src/tool/omniidl2/omniORB2_be/o2be.h. > >The method fqname() seems to return the fully qualified name (ie. scope name + >unqualified name). > >If you can change uqname() to test a flag (that indicates whether to use >concatenation), and return either the original value of uqname() or return >fqname(), it may be pretty simple. > >Hope this is helpful. Thanks for the pointer. This gets me very close to what I need. I think the actual place I'll make the change is in o2be_module.cc in o2be_module::produce_hdr(). It generates a _CORBA_MODULE followed by the name of the module. CORBA_sysdep.h does the 'right thing' depending on whether namespaces are supported or not. It would be nice if I could make the macro in CORAB_sysdep.h really smart by using __FILE__, but it's inside quotes, and doesn't seem easily messed with, besides including the full path, etc. To do this properly, I suppose I'd add a command line parameter to omniidl2 to tell it how to behave. Unfortunately, it makes the generated code platform specific, instead of platform independent. Or maybe, I'll add a script to my makefile that greps for _CORBA_MODULE and makes the change for me. Has anyone else run into this problem, and found another solution? -DB --- David Byron dbyron@coactive.com Coactive Networks, Inc. http://www.coactive.com 4000 Bridgeway, Suite 303 voice:(415)289-1722 Sausalito, CA 94965 fax:(415)289-1320 From dbyron@coactive.com Tue Jan 5 02:11:14 1999 From: dbyron@coactive.com (David Byron) Date: Mon, 04 Jan 1999 18:11:14 -0800 Subject: [omniORB] namespace handling when a compiler doesn't support it In-Reply-To: <3.0.5.32.19990104165121.00b07df0@refuge> References: Message-ID: <3.0.5.32.19990104181114.00b0c1e0@refuge> >>> I am porting OmniORB2 to a compiler that doesn't support namespaces (Diab, >>for >>> those interested). The macros for dealing with namespaces when the compiler >>> doesn't put code for a particular namespace in a class. >> >>Orbix (pre-namespace circa ver. 2.2) handled this using concatenation of the >>module name with the interface name, separated by '_'. This generates: >> >>class foo_yourclass : ... >>{ >> ... >>}; >> >>This is similar to the COM mapping in the CORBA interoperability spec, chapter >>13. However, I don't think that omniORB can support this without changes (don't >>know how much would be required, but pretty sure you'd have to change omniORB >>sources in omni2idl). >> >>Look in src/tool/omniidl2/omniORB2_be/o2be_interface.cc (and o2be_constant.cc, >>etc). This is where the .hh and .cc generators are located. >> >>For instance: >> >>void o2be_interface::produce_hdr(std::fstream &s) >>{ >> ... >> IND(s); s << "class " << uqname() << "_Helper {\n"; >> ... >>} >> >>See also o2be_name in src/tool/omniidl2/omniORB2_be/o2be.h. >> >>The method fqname() seems to return the fully qualified name (ie. scope name + >>unqualified name). >> >>If you can change uqname() to test a flag (that indicates whether to use >>concatenation), and return either the original value of uqname() or return >>fqname(), it may be pretty simple. >> >>Hope this is helpful. > >Thanks for the pointer. This gets me very close to what I >need. I think the actual place I'll make the change is in >o2be_module.cc in o2be_module::produce_hdr(). It generates >a _CORBA_MODULE followed by the name of the module. >CORBA_sysdep.h does the 'right thing' depending on whether >namespaces are supported or not. It would be nice if I >could make the macro in CORAB_sysdep.h really smart by using >__FILE__, but it's inside quotes, and doesn't seem easily >messed with, besides including the full path, etc. To do >this properly, I suppose I'd add a command line parameter to >omniidl2 to tell it how to behave. Unfortunately, it makes >the generated code platform specific, instead of platform >independent. Or maybe, I'll add a script to my makefile >that greps for _CORBA_MODULE and makes the change for me. Hate to reply to myself, but.... The script to hack the module name is not enough. Or at least my simple one wasn't. Changes to omniidl seem to be required to make this work.... I'll post the changes to the IDL compiler if I can get the time to make them. For now, the namespaces have to go :( -DB --- David Byron dbyron@coactive.com Coactive Networks, Inc. http://www.coactive.com 4000 Bridgeway, Suite 303 voice:(415)289-1722 Sausalito, CA 94965 fax:(415)289-1320 From knemeyer@ix.netcom.com Wed Jan 6 15:25:33 1999 From: knemeyer@ix.netcom.com (Manfred Knemeyer) Date: Wed, 6 Jan 1999 08:25:33 -0700 Subject: [omniORB] Failure to connect to omninames Message-ID: <002001be3988$ce5ba2c0$a44bd6ce@default> This is a multi-part message in MIME format. ------=_NextPart_000_001D_01BE394E.20E0FA80 Content-Type: text/plain; charset="windows-1250" Content-Transfer-Encoding: quoted-printable On a standalone Windows-95 system without a network interface card, I can not connect to the names service. Do I need to configure TCP/IP for loop- back? If so, How do I do this? ------=_NextPart_000_001D_01BE394E.20E0FA80 Content-Type: text/html; charset="windows-1250" Content-Transfer-Encoding: quoted-printable
On a standalone = Windows-95 system=20 without a network
interface card, I can = not connect to=20 the names
service.  Do I need = to=20 configure TCP/IP for loop-
back?  If so, How = do I do=20 this?
 
------=_NextPart_000_001D_01BE394E.20E0FA80-- From djr@orl.co.uk Wed Jan 6 15:29:45 1999 From: djr@orl.co.uk (David Riddoch) Date: Wed, 6 Jan 1999 15:29:45 +0000 (GMT) Subject: [omniORB] Re: omniorb and java In-Reply-To: <367E9C42.CA89FDF2@erols.com> Message-ID: Thanks for the suggestion - this will appear in the next release. There will be two new command line options ... -ORBinConScanPeriod -ORBoutConScanPeriod Cheers, David On Mon, 21 Dec 1998, Armen Yampolsky wrote: > In working with Sun's Java CORBA libraries (Java IDL) client-side, we > have noticed another issue: Although setting the > omniORB::idleConnectionScanPeriod on our server gives us control over > omniORB's connection shutdown scheme, it is not a complete fix. Since > the omniNames service runs in its own process, it is not affected by our > settings and uses the default hard-coded 30 second scan period. You will > find that addressing it from a java ORB will fail after a >60 second > delay. We simply altered the omniNames.cc file in order to allow us to > set the timeout via command line. > > This may be a simple but very helpful addition to omniORB. IMHO, it > would give it a consistency (why can we set the timeout for one process > and not another?). Could we convince the developers to add it? > > Cheers, > -Armen > > -- > Armen Yampolsky > Axiom Software Labs > New York From S.Lo@orl.co.uk Wed Jan 6 17:39:39 1999 From: S.Lo@orl.co.uk (Sai-Lai Lo) Date: 06 Jan 1999 17:39:39 +0000 Subject: [omniORB] Re: Connection Handler In-Reply-To: Armen Yampolsky's message of "Tue, 22 Dec 1998 12:06:06 -0500" References: <367FD17E.4A738F3D@erols.com> Message-ID: <3or9t847xg.fsf@neem.cam-orl.co.uk> >>>>> Armen Yampolsky writes: > I posted this question to the mailing list, and received a good number > of responses essentially saying -- "I need to know too, when you find > out, please tell me!" But alas, no information has been forthcoming, so > I would like to ask you directly: > I need to implement strict object disposal on my server. Many of my > servants place locks on databases, and I need a guarantee that all locks > and resources belonging to a rogue (disconnected) client are freed, no > matter the reason for the connection loss. > In working with other ORB vendors, I had implemented an Evictor pattern, > wherein a map was maintained by the server, tracking all connected > clients and their respective objects. I had a handler for the > (proprietary) connected and aborted events. If a client dropped > unexpectedly, my server knew about it and cleaned up after it. Now I am > moving to omniORB2, and am looking for such a hook. I see the events > written to cerr if I crank up the debug level, so I know that somewhere, > the ORB knows about the client IP and knows when the client connects and > disconnects. I'll be looking into the source soon, but am hoping someone > can tell me of such a hook, or even recommend a "proper" way to do > distributed garbage collection with omniORB. Hi! Garbage collecting objects on the server when the clients have failed is a topic that has been discussed quite a few times on the mailing list in the past. You may want to check the archive for some of the proposed solutions. Unlike other ORBs, there is no way to insert a handler into omniORB2 to get a callback when a connection is made or when it is broken. It is my opinion that using the status of network connections to detect client failure is a poor way of doing the job and does not fit in very well with the CORBA framework. It is the job of the ORB to decide when is the best time to establish a connection and how many connections are necessary to communicate with the server. The ORB should also have the freedom to shutdown idle connections when it is appropriate. This is in conflict with the idea of allowing the application to deduce the status of the remote end purely from the status of the related network connections. Essentially what is required is for the server to associate a session with each client. All the objects created on the server within the session are linked together with a representation of the session in the server. When the session is closed or broken, the server can walk through the list and dispose of all its associated objects. The question then reduces to how to represent a session and detects when it has failed. There are various ways to do so. For example, a session can be represented as a CORBA object provided by the client. The server holds an object reference to this session object. Periodically, a thread in the server checks if the session object can still be contacted. If communication with the session object fails, the server thread does the garbage collection. Of course there should also be a fast way for the client to close a session orderly. The refresh mechanism used by the server is only meant to be a last resort to detect client failures. Regards, Sai-Lai -- Dr. Sai-Lai Lo | Research Scientist | E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab | 24a Trumpington Street Tel: +44 223 343000 | Cambridge CB2 1QA Fax: +44 223 313542 | ENGLAND From doug@clark.net Thu Jan 7 01:15:13 1999 From: doug@clark.net (Doug Anderson) Date: Wed, 6 Jan 1999 20:15:13 -0500 Subject: [omniORB] Re: Connection Handler Message-ID: <001601be39db$2e073d40$0500000a@cc702523-a.hwrd1.md.home.com> Hi, Sai Lai wrote: >Unlike other ORBs, there is no way to insert a handler into omniORB2 to get >a callback when a connection is made or when it is broken. It is my opinion >that using the status of network connections to detect client failure is >a poor way of doing the job and does not fit in very well with the CORBA >framework. It is the job of the ORB to decide when is the best time to >establish a connection and how many connections are necessary to communicate >with the server. Not to mention the fact that this would not work well in a connection-LESS GIOP implementation, ala IIOP over UDP?? (if and when such a beast becomes commonplace!) Doug From janssen@parc.xerox.com Thu Jan 7 03:16:05 1999 From: janssen@parc.xerox.com (Bill Janssen) Date: Wed, 6 Jan 1999 19:16:05 PST Subject: [omniORB] Re: Connection Handler In-Reply-To: <3or9t847xg.fsf@neem.cam-orl.co.uk> References: <367FD17E.4A738F3D@erols.com> <3or9t847xg.fsf@neem.cam-orl.co.uk> Message-ID: Excerpts from ext.omniorb: 6-Jan-99 [omniORB] Re: Connection Ha.. Sai-Lai Lo@orl.co.uk (3640) > Unlike other ORBs, there is no way to insert a handler into omniORB2 to get > a callback when a connection is made or when it is broken. It is my opinion > that using the status of network connections to detect client failure is > a poor way of doing the job and does not fit in very well with the CORBA > framework. It is the job of the ORB to decide when is the best time to > establish a connection and how many connections are necessary to communicate > with the server. The ORB should also have the freedom to shutdown idle > connections when it is appropriate. This is in conflict with the idea of > allowing the application to deduce the status of the remote end purely from > the status of the related network connections. Exactly right. We do the same in ILU. > For example, a session can be > represented as a CORBA object provided by the client. The server holds an > object reference to this session object. Periodically, a thread in the > server checks if the session object can still be contacted. If > communication with the session object fails, the server thread does the > garbage collection. Of course there should also be a fast way for the > client to close a session orderly. The refresh mechanism used by the server > is only meant to be a last resort to detect client failures. This mechanism is built into ILU as part of our distributed garbage collection system. Bill From ayampolsky@erols.com Thu Jan 7 03:39:55 1999 From: ayampolsky@erols.com (Armen Yampolsky) Date: Wed, 06 Jan 1999 22:39:55 -0500 Subject: [omniORB] Re: Connection Handler References: <367FD17E.4A738F3D@erols.com> <3or9t847xg.fsf@neem.cam-orl.co.uk> Message-ID: <36942C8B.64D65ECD@erols.com> Thanks, my understanding is much clearer now. I will begin to implement a session-based evictor, and will write a thread that checks clients. I wanted to minimize client pings, but I guess it will not result in too much network traffic... Thank you for this clear explanation. Cheers, -Armen > Armen Yampolsky writes: > > In working with other ORB vendors, I had implemented an Evictor pattern, > > wherein a map was maintained by the server, tracking all connected > > clients and their respective objects. I had a handler for the > > (proprietary) connected and aborted events. If a client dropped > > unexpectedly, my server knew about it and cleaned up after it. Now I am > > moving to omniORB2, and am looking for such a hook. Sai-Lai Lo wrote: > It is the job of the ORB to decide when is the best time to > establish a connection and how many connections are necessary to communicate > with the server. The ORB should also have the freedom to shutdown idle > connections when it is appropriate. This is in conflict with the idea of > allowing the application to deduce the status of the remote end purely from > the status of the related network connections. > > Essentially what is required is for the server to associate a session with > each client. All the objects created on the server within the session are > linked together with a representation of the session in the server. When > the session is closed or broken, the server can walk through the list and > dispose of all its associated objects. > > The question then reduces to how to represent a session and detects when it > has failed. There are various ways to do so. For example, a session can be > represented as a CORBA object provided by the client. The server holds an > object reference to this session object. Periodically, a thread in the > server checks if the session object can still be contacted. If > communication with the session object fails, the server thread does the > garbage collection. Of course there should also be a fast way for the > client to close a session orderly. The refresh mechanism used by the server > is only meant to be a last resort to detect client failures. -- Armen Yampolsky Axiom Software Labs New York From dcmay@object-workshops.com Thu Jan 7 05:09:23 1999 From: dcmay@object-workshops.com (Dietmar May) Date: Thu, 7 Jan 1999 00:09:23 -0500 Subject: [omniORB] Re: Connection Handler Message-ID: Armen, > Thanks, my understanding is much clearer now. I will begin to implement a > session-based evictor, and will write a thread that checks clients. I wanted > to minimize client pings, but I guess it will not result in too much network > traffic... A factor in our handling of network connections is that we DON'T want clients to HAVE to be servers as well. You might consider whether it is acceptable for the client to notify the server that it is still active and using resources, rather than the server querying the client (which requires the client to become a server too). Most clients could perform an occasional keep-alive request during idle time (or GUI-timer) processing without requiring an extra thread. Regards, Dietmar May Software Architect Object Workshops, Inc. dcmay@object-workshops.com From myles@ams.co.nz Thu Jan 7 04:21:12 1999 From: myles@ams.co.nz (Myles Penlington) Date: Thu, 7 Jan 1999 17:21:12 +1300 Subject: [omniORB] Re: Connection Handler Message-ID: <01BE3A62.205C52C0@myles> A minor improvement on this is to borrow the concept of a watch dog = timer from real time embedded systems. So only ping the clients if the = timer expires. How the timer is reset for each session object is the tricky part.=20 The simplest method would be to add code for each CORBA method on the = server side object. eg ResetSessionTimer, i.e So whenever a call is made = to a method on the server side object, the sever side method resets the = watch dog timer for the session object from the originating session. Other variations could be to change the ping frequency/timer expiry = period, depending on the operations in progress. Myles Penlington. -----Original Message----- From: Armen Yampolsky [SMTP:ayampolsky@erols.com] Sent: Thursday, January 07, 1999 4:40 PM To: omniorb-list@orl.co.uk Subject: [omniORB] Re: Connection Handler Thanks, my understanding is much clearer now. I will begin to implement = a session-based evictor, and will write a thread that checks clients. I = wanted to minimize client pings, but I guess it will not result in too much = network traffic... Thank you for this clear explanation. Cheers, -Armen From gdd0@gte.com Thu Jan 7 14:10:32 1999 From: gdd0@gte.com (Gary D. Duzan) Date: Thu, 07 Jan 1999 09:10:32 -0500 Subject: [omniORB] Re: Connection Handler Message-ID: <199901071410.JAA25330@lion.gte.com> Well, strictly speaking you can't do GIOP over a connectionless transport since it is inherently connection-oriented, but not all CORBA communication has to be GIOP-based. Gary Duzan GTE Laboratories In Message <001601be39db$2e073d40$0500000a@cc702523-a.hwrd1.md.home.com> , "Doug Anderson" wrote: =>Hi, => =>Sai Lai wrote: =>>Unlike other ORBs, there is no way to insert a handler into omniORB2 to get =>>a callback when a connection is made or when it is broken. It is my opinion =>>that using the status of network connections to detect client failure is =>>a poor way of doing the job and does not fit in very well with the CORBA =>>framework. It is the job of the ORB to decide when is the best time to =>>establish a connection and how many connections are necessary to =>communicate =>>with the server. => =>Not to mention the fact that this would not work well in a connection-LESS =>GIOP implementation, ala IIOP over UDP?? (if and when such a beast =>becomes commonplace!) => =>Doug => => => From cbst@oce.nl Thu Jan 7 14:31:42 1999 From: cbst@oce.nl (Casper Stoel) Date: Thu, 07 Jan 1999 15:31:42 +0100 Subject: [omniORB] Porting omniEvents to NT? Message-ID: <3694C54E.F4F44E62@oce.nl> As will be clear from the subject, who has ported Paul Nader's omniEvents to NT? I am no porting wizard and could use some help in this task... Any pointers are welcome! Casper Stoel From dcmay@object-workshops.com Thu Jan 7 15:49:56 1999 From: dcmay@object-workshops.com (Dietmar May) Date: Thu, 7 Jan 1999 10:49:56 -0500 Subject: [omniORB] Re: Connection Handler Message-ID: > A minor improvement on this is to borrow the concept of a watch dog timer from > real time embedded systems. So only ping the clients if the timer expires. > > How the timer is reset for each session object is the tricky part. > > The simplest method would be to add code for each CORBA method on the server > side object. eg ResetSessionTimer, i.e So whenever a call is made to a method > on the server side object, the sever side method resets the watch dog timer > for the session object from the originating session. > > Other variations could be to change the ping frequency/timer expiry period, > depending on the operations in progress. > > Myles Penlington. Now, if only we could get the ORB to do this, perhaps changing the IDL compiler to call thru a function pointer (if set) in every dispatch() method ... we might have something like Armen was originally asking for. (It avoids the tediousness (as Stroustrup puts it) of repetitive code - and the accompanying propensity for errors). Now, the question is whether there is a unique handle for each client that could be used automatically (obviously not the socket handle), or does the client have to explicitly pass in a server-assigned handle as a parameter to each IDL call? ie. is it possible to uniquely and unambiguously identify a client based on connection parameters, given the abilty (and need) of the ORB to shut down and re-open connections? Dietmar From renzo.tomaselli@tecnotp.inet.it Thu Jan 7 16:50:33 1999 From: renzo.tomaselli@tecnotp.inet.it (Renzo Tomaselli) Date: Thu, 7 Jan 1999 17:50:33 +0100 Subject: [omniORB] Re: Connection Handler Message-ID: <199901071649.RAA13936@venere.inet.it> Hi, why not using contexts to avoid an extra parameter on each IDL call ? Identifying the client sounds much like identifying the principal for security reasons or identifying the current transaction for other purpose= s (the implicit way). Since the connection is out of this game, it seems to me that the client is the only subject enabled to specify its own identit= y as thread/process/host or whatever else. From long time ago discussions o= n this list about contexts, I remember they weren't much welcome; however having a client identity/principal identity/transaction control as extra parameters in each call would be terrific. Comments are much welcome, Renzo Tomaselli =20 -------------------------------------------------------------------------= -- TecnoTP s.n.c. Special Information System Design Maso Pelauchi I38050 Ronchi Valsugana, Trento TN ITALY Tel. +39 0461 773164 Fax. +39 0461 771514 e-mail: renzo.tomaselli@tecnotp.inet.it =20 -------------------------------------------------------------------------= -- ---------- > From: Dietmar May > To: 'Myles Penlington' ; 'Armen Yampolsky' ; omniorb-list@orl.co.uk > Subject: RE: [omniORB] Re: Connection Handler > Date: gioved=EC 7 gennaio 1999 16.49 >=20 >=20 > Now, if only we could get the ORB to do this, perhaps changing the IDL compiler=20 > to call thru a function pointer (if set) in every dispatch() method ... we=20 > might have something like Armen was originally asking for. (It avoids t= he > tediousness (as Stroustrup puts it) of repetitive code - and the accompanying=20 > propensity for errors). >=20 > Now, the question is whether there is a unique handle for each client that=20 > could be used automatically (obviously not the socket handle), or does the=20 > client have to explicitly pass in a server-assigned handle as a paramet= er to=20 > each IDL call? ie. is it possible to uniquely and unambiguously identif= y a=20 > client based on connection parameters, given the abilty (and need) of t= he ORB=20 > to shut down and re-open connections? >=20 > Dietmar >=20 >=20 From knemeyer@ix.netcom.com Sat Jan 9 05:40:45 1999 From: knemeyer@ix.netcom.com (Manfred Knemeyer) Date: Fri, 8 Jan 1999 22:40:45 -0700 Subject: [omniORB] Failure to connect to omninames Message-ID: <000401be3b92$9bfa78e0$a44bd6ce@default> Thank you for the response, Dietmar. The MS Loopback Adapter seems to be an NT thing; it is not available on Windows-95. My concern about loopback appears unfounded. A "localhost" configuration should be adequate. Sorry to learn that others also have not been able to get omninames to run on standalone Windows-95. >There is a loopback network device driver available under Windows (I think it's >95, not NT that has it). Try to change your network adapter to Microsoft >(801.3) MS Loopback. > >Sorry I can't be more specific: we only run NT here on machines with network >adapters, so I don't have a copy of Windows95 installed on any machines at >present. > >I also don't know if this will fix your underlying problem. I know that we've >had problems running omniNames under Win95 - never debugged the cause. > >Hope this is helpful. > >Regards, >Dietmar May From knemeyer@ix.netcom.com Sat Jan 9 05:45:48 1999 From: knemeyer@ix.netcom.com (Manfred Knemeyer) Date: Fri, 8 Jan 1999 22:45:48 -0700 Subject: [omniORB] Help Please - Unable to contact naming service on Windows-95 Message-ID: <001301be3b93$50a0cf60$a44bd6ce@default> This is a multi-part message in MIME format. ------=_NextPart_000_0010_01BE3B58.A2D23AC0 Content-Type: text/plain; charset="windows-1250" Content-Transfer-Encoding: quoted-printable Thank you for the response, Michael. I have rebuilt everything and still am not able to connect to omninames. Has anyone else been able to get the Windows-95 package to run on a standalone system? HI, try to recompile the whole omniorb2 package. I had the same problem = and it had been fixed afterwards. cu Michael Muchitsch -----Urspr=FCngliche Nachricht----- Von: Manfred Knemeyer An: omniORB Datum: Montag, 4. Januar 1999 11:07 Betreff: [omniORB] Help Please - Unable to contact naming = service on Windows-95 =20 =20 Hopefully someone can suggest why I am not able to run omniORB2 on my standalone Windows-95 system. I have not been able to = find obviously relevant info in the archives. Any help will be appreciated. I very much would like to experiment and learn = using omniOrb2. To narrow the problem, I have tried to list all of = the details below. Thanks for your patience in reading them. =20 knemeyer@ix.netcom.com =20 I have installed the Windows-95 binary release of version 2.6.0 and rebuilt the echo examples (only) with MSC++ 6 + Patchkit 1 = and gnu-win32-lite. The rebuilt example eg1 runs successfully, eg2's IOR argument exceeds the DOS window cmd line length limit, and eg3 fails in trying to contact the naming service. =20 The environment variable OMNIORB2_CONFIG is set to the filepath of the configuration file (added after initial failures) which contains: NAMESERVICE IOR:. . . ORBInitialHost localhost ORBInitialPort 12345 =20 Registry also contains the above 3 values; the IOR has been = checked against the nameservice.exe startup message; localhost is the = only entry in the \WINDOWS\Hosts file; the system was rebooted. =20 omninames (not rebuilt) is running: Checkpointing completed. =20 =20 eg3_impl started, then eg3_clt started (in DOS windows). =20 After some delay ... =20 eg3_impl: Caught system exception COMM_FAILURE, unable to = contact the naming service. =20 eg3_clt: Caught system exception COMM_FAILURE, unable to contact = the naming service. hello: cannot invoke on a nil object reference. =20 omninames is still running. =20 =20 ------=_NextPart_000_0010_01BE3B58.A2D23AC0 Content-Type: text/html; charset="windows-1250" Content-Transfer-Encoding: quoted-printable
Thank you for = the response,=20 Michael.
I have rebuilt everything and still am not = able
to connect to = omninames.
 
Has anyone else been able to = get the=20 Windows-95
package to run on a standalone=20 system?
HI,
try to recompile the whole omniorb2 package. I = had the=20 same problem and it had been fixed afterwards.
cu
Michael Muchitsch
-----Ursprüngliche=20 Nachricht-----
Von: Manfred Knemeyer <knemeyer@ix.netcom.com>
= An:=20 omniORB <omniorb-list@orl.co.uk>
= Datum:=20 Montag, 4. Januar 1999 11:07
Betreff: [omniORB] = Help=20 Please - Unable to contact naming service on=20 Windows-95

Hopefully someone can=20 suggest why I am not able to run omniORB2
on my standalone Windows-95 = system.  I=20 have not been able to find
obviously relevant info = in the=20 archives.  Any help will be
appreciated.  I = very much=20 would like to experiment and learn using
omniOrb2.  To = narrow the=20 problem, I have tried to list all of the
details below.  = Thanks for=20 your patience in reading them.
 
knemeyer@ix.netcom.com<= /DIV>
 
I have = installed the=20 Windows-95 binary release of version 2.6.0
and = rebuilt the echo=20 examples (only) with MSC++ 6 + Patchkit 1 and
gnu-win32-lite. =20 The rebuilt example = eg1 runs=20 successfully,
eg2's IOR argument = exceeds the DOS window cmd line = length=20 limit,
and eg3 fails in trying = to contact=20 the naming service.
 
The = environment =20 variable OMNIORB2_CONFIG is set to the filepath
of the configuration file (added = after initial=20 failures) which
contains:
NAMESERVICE IOR:. . = .
ORBInitialHost=20 localhost
ORBInitialPort = 12345
 
Registry also contains = the above 3=20 values; the IOR has been checked
against the = nameservice.exe startup=20 message; localhost is the only
entry in the = \WINDOWS\Hosts file;=20 the system was rebooted.
 
omninames (not rebuilt) is = running:=20 Checkpointing completed.
 
eg3_impl started,=20 then eg3_clt started (in DOS windows).
 
After some delay = ...
 
eg3_impl: Caught system = exception=20 COMM_FAILURE, unable to contact the naming = service.
eg3_clt: Caught=20 system exception COMM_FAILURE, unable to contact the naming=20 service.
hello: cannot invoke on a nil object=20 reference.
omninames is still=20 running.
 
 
------=_NextPart_000_0010_01BE3B58.A2D23AC0-- From knemeyer@ix.netcom.com Sat Jan 9 13:40:07 1999 From: knemeyer@ix.netcom.com (Manfred Knemeyer) Date: Sat, 9 Jan 1999 06:40:07 -0700 Subject: [omniORB] RE: Unable to contact naming service. Message-ID: <004901be3bd5$92f42820$bd4cd6ce@default> This is a multi-part message in MIME format. ------=_NextPart_000_0046_01BE3B9A.E5A12C20 Content-Type: text/plain; charset="windows-1250" Content-Transfer-Encoding: quoted-printable I have now finally been able to establish a connection to the naming service on a standalone Windows-95 system = without a network interface card. This required that dialup networking (DUN) be up and running (which connects to my ISP) before omninames is started - and DUN not then stopped. Any suggestions on how to get around this ? ------=_NextPart_000_0046_01BE3B9A.E5A12C20 Content-Type: text/html; charset="windows-1250" Content-Transfer-Encoding: quoted-printable
I have now = finally been able=20 to establish a
connection = to the naming service on a = standalone=20 Windows-95 system without a network interface card.
This required = that dialup=20 networking (DUN) be up
and running = (which connects=20 to my ISP) before
omninames is = started - and=20 DUN not then stopped.
Any suggestions = on how to=20 get around = this=20 ?
 
------=_NextPart_000_0046_01BE3B9A.E5A12C20-- From shichunhui@usa.net Mon Jan 11 02:14:30 1999 From: shichunhui@usa.net (shich) Date: Mon, 11 Jan 1999 10:14:30 +0800 Subject: [omniORB] how can I download omniORB Message-ID: <36995E86.92A07C44@usa.net> hi,I am a new comer,I have tried to download the omniORB for windows and solaris.But the ftp.orl.co.uk doesn't support broken-resume download so I always ended my download with broken file and broken heart.Anyone here would suggest a better site for me? From dbyron@coactive.com Tue Jan 12 00:19:29 1999 From: dbyron@coactive.com (David Byron) Date: Mon, 11 Jan 1999 16:19:29 -0800 Subject: [omniORB] method call in nbufferedstream.cc Message-ID: <3.0.5.32.19990111161929.00b33950@refuge> In nbufferedstream.cc, I'm having a problem compiling the following line of code from NetBufferedStream::WrUnlock() Strand_Sync::WrUnlock(); Strand_Sync comes from: typedef Strand::Sync Strand_Sync; in rope.h. Anyway, there is a static function in class Strand::Sync called WrUnlock. It's signature is: static void WrUnlock(Strand* s); >From this, it would appear that the call in nbufferedstream.cc is missing an argument. Another possibility is that the desired method is: void WrUnlock(_CORBA_Boolean held_rope_mutex=0); which is a protected method in class Strand::Sync. If this is the desired method, then the Strand_Sync:: would be removed. Doing this causes the code to compile fine. To note, I'm using the Metaware High C/C++ compiler... So the question is, which of the two WrUnlock methods is supposed to be called here? Thanks for your help. -DB --- David Byron dbyron@coactive.com Coactive Networks, Inc. http://www.coactive.com 4000 Bridgeway, Suite 303 voice:(415)289-1722 Sausalito, CA 94965 fax:(415)289-1320 From djr@orl.co.uk Tue Jan 12 09:12:29 1999 From: djr@orl.co.uk (David Riddoch) Date: Tue, 12 Jan 1999 09:12:29 +0000 (GMT) Subject: [omniORB] method call in nbufferedstream.cc In-Reply-To: <3.0.5.32.19990111161929.00b33950@refuge> Message-ID: On Mon, 11 Jan 1999, David Byron wrote: > In nbufferedstream.cc, I'm having a problem compiling the following > line of code from NetBufferedStream::WrUnlock() > > Strand_Sync::WrUnlock(); > > Strand_Sync comes from: > > typedef Strand::Sync Strand_Sync; > > in rope.h. > > Anyway, there is a static function in class Strand::Sync called > WrUnlock. It's signature is: > > static void WrUnlock(Strand* s); > > >From this, it would appear that the call in nbufferedstream.cc is > missing an argument. Another possibility is that the desired method is: > > void WrUnlock(_CORBA_Boolean held_rope_mutex=0); > > which is a protected method in class Strand::Sync. Yes its this one. > If this is the desired method, then the Strand_Sync:: would be removed. > Doing this causes the code to compile fine. To note, I'm using the > Metaware High C/C++ compiler... But Strand_Sync::WrUnlock() is being called from NetBufferedStream::WrUnlock(). If you remove the Strand_Sync:: then you will get a recursive call back into NetBufferedStream::WrUnlock(). Looks like you have a compiler bug. To work-around the problem try: Strand::Sync::WrUnlock(); Hope this solves the problem. David From bjornw@fairplay.no Tue Jan 12 15:55:30 1999 From: bjornw@fairplay.no (bjornw@fairplay.no) Date: 12 Jan 1999 16:55:30 +0100 Subject: [omniORB] To delete or not to delete.... Message-ID: Hi omniorbers! Let us say that I have a server that allocates a sequence of elements, and that the client deletes it. Is that it? The reason I'm asking is because I have a server that grows and grows and grows ...=20 Here is some pseudo code that illustrate a typical scenario // idl file typedef sequence long_seq; interface server { long_seq query(); }; // server-implementation long_seq * server::query() { long_seq *ptr =3D new long_seq; return ptr; } // client implementation long_seq *ptr =3D server->query(); delete ptr; bjornw> Sincerely ------------------------------------------------------- Bj=F8rn Wennberg email: bjornw@fairplay.no=20 ms: +47 950 82 657 Senior Programmer phone: +47 22405538 FairPlay International AS fax: +47 22405539 From djr@orl.co.uk Wed Jan 13 09:38:18 1999 From: djr@orl.co.uk (David Riddoch) Date: Wed, 13 Jan 1999 09:38:18 +0000 (GMT) Subject: [omniORB] To delete or not to delete.... In-Reply-To: Message-ID: As far as I know what you've done is correct. If you look in the stub code, you should see something like this ... CORBA::Boolean _sk_server::dispatch(...) { if (strcmp(_0RL_op,"query") =3D=3D 0) { ... long_seq_var _0RL_result; _0RL_result =3D query(); ... } ... } So the sequence should be deleted by the destructor of long_seq_var. Let us know if you find a leak in the ORB! Cheers, David On 12 Jan 1999 bjornw@fairplay.no wrote: > Hi omniorbers! >=20 > Let us say that I have a server that allocates a sequence of elements, > and that the client deletes it. Is that it? The reason I'm asking is > because I have a server that grows and grows and grows ...=20 >=20 > Here is some pseudo code that illustrate a typical scenario >=20 > // idl file > typedef sequence long_seq; >=20 > interface server { > long_seq query(); > }; >=20 > // server-implementation > long_seq * > server::query() > { > =09long_seq *ptr =3D new long_seq; > =09return ptr; > } >=20 > // client implementation > long_seq *ptr =3D server->query(); > delete ptr; >=20 > bjornw> Sincerely >=20 > ------------------------------------------------------- > Bj=F8rn Wennberg email: bjornw@fairplay.no=20 > ms: +47 950 82 657 > Senior Programmer phone: +47 22405538 > FairPlay International AS fax: +47 22405539 >=20 >=20 From renzo.tomaselli@eclipse-net.it Wed Jan 13 11:07:42 1999 From: renzo.tomaselli@eclipse-net.it (Renzo Tomaselli) Date: Wed, 13 Jan 1999 12:07:42 +0100 Subject: [omniORB] object versioning Message-ID: <00d001be3ee4$f4615e40$11fc46c1@big> This is a multi-part message in MIME format. ------=_NextPart_000_00CD_01BE3EED.5284AAB0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi there, as a developer of a distributed imaging application which makes use = of OmniORB I run into some maintenance issues since the application is = packaged into a number of dlls connected through a dynamic loader. = Everything works fine as far as OmniORB is concerned. It happens that = modules which have indipendent life but some form of dependency (A calls = B methods) run into incompatibility problems such as changing a method = signature because IDL design changed but runtime or installation made a = poor job. A quick screening of OmniORB sources pointed out as the = version field of Interface Rep. Id is not used and it seems also that = IIOP doesn't transmit IntfRepID along requests. Woudn't it be a good = choice for version control of interdipendent objects ? Would it violate = any CORBA specs to have it transmitted from client stubs to the server = so that the implementation skeleton can check it against its own, = refusing to dispatch unmatched versions ? Comments are welcome, Renzo = Tomaselli =20 -------------------------------------------------------------------------= -- TecnoTP s.n.c. Special Information System Design Maso Pelauchi I38050 Ronchi Valsugana, Trento TN ITALY Tel. +39 0461 773164 Fax. +39 0461 771514 e-mail: renzo.tomaselli@eclipse-net.it =20 -------------------------------------------------------------------------= -- ------=_NextPart_000_00CD_01BE3EED.5284AAB0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi there,
    as a developer of = a=20 distributed imaging application which makes use of OmniORB I run into = some=20 maintenance issues since the application is packaged into a number of = dlls=20 connected through a dynamic loader. Everything works fine as far as = OmniORB is=20 concerned. It happens that modules which have indipendent life but some = form of=20 dependency (A calls B methods) run into incompatibility problems such as = changing a method signature because IDL design changed but runtime or=20 installation made a poor job. A quick screening of OmniORB sources = pointed out=20 as the version field of Interface Rep. Id is not used and it seems also = that=20 IIOP doesn't transmit IntfRepID along requests. Woudn't it be a good = choice for=20 version control of interdipendent objects ? Would it violate any CORBA = specs to=20 have it transmitted from client stubs to the server so that the = implementation=20 skeleton can check it against its own, refusing to dispatch = unmatched =20 versions ?
Comments are=20 welcome,
          &nbs= p;            = ;            =             &= nbsp;           &n= bsp;  =20 Renzo Tomaselli     =20
---------------------------------------------------------------------= ------
TecnoTP=20 s.n.c. Special Information System Design
Maso Pelauchi I38050 Ronchi=20 Valsugana,  Trento TN  ITALY
Tel. +39 0461=20 773164      Fax. +39 0461 771514
e-mail: renzo.tomaselli@eclipse-ne= t.it  =20
---------------------------------------------------------------------= ------
------=_NextPart_000_00CD_01BE3EED.5284AAB0-- From rshoup@tumbleweed.com Wed Jan 13 17:03:52 1999 From: rshoup@tumbleweed.com (Randy Shoup) Date: Wed, 13 Jan 1999 09:03:52 -0800 Subject: [omniORB] HTTP tunnelling issues? Message-ID: <369CD1F8.95670082@tumbleweed.com> All -- We are potentially considering developing an addition to omniORB to support ORB requests over HTTP (to tunnel under firewalls). I just wanted to query the folks on the list to see if there has been any work done on this by anyone else for omniORB. We are aware of Orbix's WonderWall product, but suspect (without proof) that this might not work in a purely omniORB environment. Before deciding to embark on this project, we also will look carefully at Sai Lai's suggestions about how to add an additional transport to omniORB (http://www.orl.co.uk:80/omniORB/archives/1998-02/0050.html). Any further issues that anyone might be aware of? If we do, in fact, develop this, we would of course make it available to the omniORB community at large. Judging by the several requests for this functionality on the list over time, I suspect that there is demand out there. Thanks, -- Randy _________________________________________________________________ Randy Shoup (650)569-3682 Software Architect rshoup@tumbleweed.com Tumbleweed Software Corporation From lavoie@proksim.com Wed Jan 13 19:39:32 1999 From: lavoie@proksim.com (Martin Lavoie) Date: Wed, 13 Jan 1999 14:39:32 -0500 Subject: [omniORB] omniORB 2.5.0 Message-ID: <41C174DACD99D211AD090008C760380D0917@proksim.com> Hi everyone, Anybody still has version 2.5.0 or know where I can get it ? We have old code here which does not compile because of IDL changes that we just want to execute for test purposes and we don't want to go back and patch it to work with 2.6.1. We use to have it on our server, but our server got robbed 8-(. So if you know where I can get it, I would appreciate a lot. I'm looking for the win32_x86 compiled version. thanks, - martin ------------------------------------------------------------------------= --------------- Martin Lavoie Proksim Software Inc. System Architect 425, Place Jacques-Cartier lavoie@proksim.com Suite 201 Tel: (514) 940-4263 Montr=E9al, Qu=E9bec Fax: (514) 940-9091 Canada. H2Y 3B1 ------------------------------------------------------------------------= --------------- L'imagination est plus importante que le savoir. (Imagination is more important than knowledge.)=20 Einstein (Albert), On Science. From dbyron@coactive.com Wed Jan 13 20:11:29 1999 From: dbyron@coactive.com (David Byron) Date: Wed, 13 Jan 1999 12:11:29 -0800 Subject: [omniORB] another module/namespace question Message-ID: <3.0.5.32.19990113121129.00b492f0@refuge> As my search for namespace-aware compilers continues, it appears there are (at least) three levels of namespace support: 1. none 2. as long as the contents of a namespace are declared in exactly one file 3. namespace declarations work even if they in multiple files I'm working with a compiler that falls into category 2 (MetaWare High C/C++ 4.0a), so I figured I'd structure my IDL files as follows: master.idl ---------- module my_module { #include #include #include ... }; instead of having module my_module inside each IDL file. I figured omniidl would create a stub file master.hh with something like: _CORBA_MODULE my_module _CORBA_MODULE_BEG #include #include #include ... _CORBA_MODULE_END Unfortunately, the actual master.hh that's generated looks something like: #include #include #include _CORBA_MODULE my_module _CORBA_MODULE_BEG _CORBA_MODULE_END Is my solution a valid one? Should I change the IDL compiler to do what I want? Thanks for your help. -DB --- David Byron dbyron@coactive.com Coactive Networks, Inc. http://www.coactive.com 4000 Bridgeway, Suite 303 voice:(415)289-1722 Sausalito, CA 94965 fax:(415)289-1320 From myles@ams.co.nz Wed Jan 13 21:19:50 1999 From: myles@ams.co.nz (Myles Penlington) Date: Thu, 14 Jan 1999 10:19:50 +1300 Subject: [omniORB] HTTP tunnelling issues? Message-ID: <01BE3FA7.6C138720@myles> The Inprise/Visibroker firewall/tunnelling product may work with OmniORB = - it just passes the requests through the firewall - have a look at = their website. >From what I have been told about Orbix's product - your suspicions would = be correct. Myles Penlington. -----Original Message----- From: Randy Shoup [SMTP:rshoup@tumbleweed.com] Sent: Thursday, January 14, 1999 6:04 AM To: omniorb-list@orl.co.uk Subject: [omniORB] HTTP tunnelling issues? All -- We are potentially considering developing an addition to omniORB to support ORB requests over HTTP (to tunnel under firewalls). I just wanted to query the folks on the list to see if there has been any work done on this by anyone else for omniORB. We are aware of Orbix's WonderWall product, but suspect (without proof) that this might not work in a purely omniORB environment. =20 Before deciding to embark on this project, we also will look carefully at Sai Lai's suggestions about how to add an additional transport to omniORB (http://www.orl.co.uk:80/omniORB/archives/1998-02/0050.html).=20 Any further issues that anyone might be aware of? If we do, in fact, develop this, we would of course make it available to the omniORB community at large. Judging by the several requests for this functionality on the list over time, I suspect that there is demand out there. Thanks, -- Randy _________________________________________________________________ =20 Randy Shoup (650)569-3682 =20 Software Architect rshoup@tumbleweed.com =20 Tumbleweed Software Corporation From rshoup@tumbleweed.com Thu Jan 14 03:46:51 1999 From: rshoup@tumbleweed.com (Randy Shoup) Date: Wed, 13 Jan 1999 19:46:51 -0800 Subject: [omniORB] SSL support status? Message-ID: <369D68AB.D4988563@tumbleweed.com> omniORB crew -- There have been some rumors of a working IIOP over SSL transport with omniORB (http://www.orl.co.uk/omniORB/archives/1998-11/0041.html). We would be very interested in SSL support, and may have to develop it ourselves if we can't beg, borrow, or steal it. We would prefer, of course, to leverage the hard work of others here :-) Is there a time-frame on when SSL support will be ready for prime time? The note I reference above says that you don't want to release it before IIOP1.1. Is IIOP1.1 required to get SSL to work with IIOP? -- Randy _________________________________________________________________ Randy Shoup (650)569-3682 Software Architect rshoup@tumbleweed.com Tumbleweed Software Corporation From djr@orl.co.uk Thu Jan 14 09:20:02 1999 From: djr@orl.co.uk (David Riddoch) Date: Thu, 14 Jan 1999 09:20:02 +0000 (GMT) Subject: [omniORB] another module/namespace question In-Reply-To: <3.0.5.32.19990113121129.00b492f0@refuge> Message-ID: David, When you #include an IDL file the compiler makes the assumption that you will also compile that file separately (to generate interface1.hh etc.). It will not produce stub code for the IDL in included files. To achieve a (partial) solution you could run the C pre-processor over master.idl yourself, remove the file and line number information (using sed or something) and IDL compile the result. I think this would be a lot less work than modifying the compiler yourself. David On Wed, 13 Jan 1999, David Byron wrote: > As my search for namespace-aware compilers continues, it appears there > are (at least) three levels of namespace support: > > 1. none > 2. as long as the contents of a namespace are declared in exactly one file > 3. namespace declarations work even if they in multiple files > > I'm working with a compiler that falls into category 2 (MetaWare High > C/C++ 4.0a), so I figured I'd structure my IDL files as follows: > > master.idl > ---------- > module my_module > { > #include > #include > #include > ... > }; > > instead of having module my_module inside each IDL file. > > I figured omniidl would create a stub file master.hh with something like: > > _CORBA_MODULE my_module > _CORBA_MODULE_BEG > > #include > #include > #include > ... > > _CORBA_MODULE_END > > Unfortunately, the actual master.hh that's generated looks something like: > > #include > #include > #include > > _CORBA_MODULE my_module > _CORBA_MODULE_BEG > > _CORBA_MODULE_END > > Is my solution a valid one? Should I change the IDL compiler to do > what I want? > > Thanks for your help. > > -DB > --- > David Byron dbyron@coactive.com > Coactive Networks, Inc. http://www.coactive.com > 4000 Bridgeway, Suite 303 voice:(415)289-1722 > Sausalito, CA 94965 fax:(415)289-1320 > > > From dmorgen@alum.mit.edu Thu Jan 14 21:20:33 1999 From: dmorgen@alum.mit.edu (David Morgenlender) Date: Thu, 14 Jan 1999 21:20:33 GMT Subject: [omniORB] #include in .IDL file works incorrectly!!! In-Reply-To: <3or9uisp1n.fsf@neem.cam-orl.co.uk> References: <366468EE.2615DB12@fairplay.no> <3or9uisp1n.fsf@neem.cam-orl.co.uk> Message-ID: <36a05c28.166031374@smtp.ne.mediaone.net> I'm trying to #include a .H file into my .IDL file. But the IDL compiler= is having problems: 1. If I do the #include within an interface, I get a "can't parse = statement" error & the compiler (omniidl2) crashes with a system exception. =20 2. So, for testing purposes, I moved the #include outside any interface = & tried again. I preceded the #include with a typedef statement, defining a type= used by the .H file. This compiled without error, but generated incorrect = code, e.g. in the .HH file: a. The #include statement is put at the front of the .HH file, while = the typedef is placed later, AFTER the #include, which requires it. b. The #include is for x.HH, when it should be for x.H. How can I get the IDL compiler to do what I need, which is handle a = struct defined within an interface, via a .H file, placing a typedef before the = struct? BTW, here's why I'm doing things this way ... I use the same struct in = different apps, some of which use CORBA, some of which use COM, & some of which use= both. The variables within the struct are carefully used so they generate = compatible data for both CORBA & COM, assuming the typedef mentioned above is = defined appropriately in both CORBA & COM .IDL files. I desperately want to = avoid having to define 2 different structs for CORBA & COM ... this is a very = large struct!!! =20 So I'm #include'ing one .H into both my CORBA & COM IDL files. I want to= do this within an interface, so the struct typedef is essentially given a = different name for CORBA than for COM, since one app will have both definitions. If the CORBA IDL compiler cannot be made to work with this approach, can = you suggest something better??? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Dave Morgenlender e-mail: dmorgen@alum.mit.edu =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D From dmorgen@alum.mit.edu Thu Jan 14 21:44:36 1999 From: dmorgen@alum.mit.edu (David Morgenlender) Date: Thu, 14 Jan 1999 21:44:36 GMT Subject: [omniORB] Re: #include in .IDL file works incorrectly!!! In-Reply-To: <36a05c28.166031374@smtp.ne.mediaone.net> References: <366468EE.2615DB12@fairplay.no> <3or9uisp1n.fsf@neem.cam-orl.co.uk> <36a05c28.166031374@smtp.ne.mediaone.net> Message-ID: <36a16353.167867423@smtp.ne.mediaone.net> One other thing I've tried, which doesn't provide a solution ... use = #define's instead of the typedef & to override the struct's name. The IDL compiler= seems to use the #define when reading the #include'd file. However, it doesn't= put it into the .HH file. So any C++ source file #include'ing the .HH file, = thinking this will provide definitions for the CORBA stuff will be disappointed = when it comes to the struct ... it won't have the overridden name & type; the = solution is to provide redundant #define's (or perhaps in a #include ... assuming = the IDL compiler doesn't have problems with this ... which it probably will by generating a #include for a non-existent .HH file). Actually, the C++ = file, which #include's the .HH file will not compile because of the #include = created for a non-existent .HH file! BTW, I just confirmed that this approach works on the COM side, except = for the struct being defined outside the interface. However, a #define works appropriately (i.e. the IDL compiler applies it to the struct definition = code being generated), so it can be used to specify a unique struct name. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Dave Morgenlender e-mail: dmorgen@alum.mit.edu =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D From rshoup@tumbleweed.com Fri Jan 15 02:15:26 1999 From: rshoup@tumbleweed.com (Randy Shoup) Date: Thu, 14 Jan 1999 18:15:26 -0800 Subject: [omniORB] SSL support status? References: <369D68AB.D4988563@tumbleweed.com> <3oiue97osj.fsf@neem.cam-orl.co.uk> Message-ID: <369EA4BE.B9D2F591@tumbleweed.com> Sai-Lai Lo wrote: > > Randy, > > >>>>> Randy Shoup writes: > > > There have been some rumors of a working IIOP over SSL transport with > > omniORB (http://www.orl.co.uk/omniORB/archives/1998-11/0041.html). We > > would be very interested in SSL support, and may have to develop it > > ourselves if we can't beg, borrow, or steal it. We would prefer, of > > course, to leverage the hard work of others here :-) > > I should be able to give you access to a version of omniORB with SSL > support in the next few days. Note that this version has not been subject > to vigorous testing and was done independent of the main development and > with omniORB_2.5.0. > > What I would like is to have your feedback on the API that we have added. > And of course any bug fixes you have done. Perfect. We've done some SSL stuff before, so hopefully we can give some constructive feedback. We'll also do the "vigorous testing" part :-), and would be happy to reintegrate the changes with 2.6.1 (or 2.7.0, if that becomes available soon). > > My intention is to integrate the stuff after the IIOP 1.1 work is done. > > > Is there a time-frame on when SSL support will be ready for prime > > time? The note I reference above says that you don't want to release it > > before IIOP1.1. Is IIOP1.1 required to get SSL to work with IIOP? > > The IIOP IOR extension to support SSL is defined in 1.1. So strictly > speaking omniORB should really talk IIOP 1.1 to get SSL to work but as far > as the message exchange is concern 1.0 will do. This was what I suspected. In my brief review of the OMG spec yesterday, it seemed like the IOR extensions are pretty much required for doing any sort of augmentation of the protocol (e.g., SSL, compression, etc.). It also seemed to me that the 1.1 IOR extensions might be required for introducing any alternate transport. I hope I am wrong, but I couldn't figure out how to shoehorn an alternate transport into an IIOP 1.0 profile, or similarly, how to give enough information through an IIOP 1.0 profile to help the ORB to make an intelligent decision between two transports. > > I have a bit of time at hand this week so I've started implementing > GIOP/IIOP 1.1. Once this is done, I may release a snapshot for people to > try out. That would be ideal. We'd be happy to beta test this. Thanks, -- Randy _________________________________________________________________ Randy Shoup (650)569-3682 Software Architect rshoup@tumbleweed.com Tumbleweed Software Corporation From bjornw@fairplay.no Fri Jan 15 12:55:51 1999 From: bjornw@fairplay.no (bjornw@fairplay.no) Date: 15 Jan 1999 13:55:51 +0100 Subject: [omniORB] Nasty omni_thread::sleep bug in posix.cc In-Reply-To: rshoup@tumbleweed.com's message of "Wed, 13 Jan 1999 19:46:51 -0800" References: <369D68AB.D4988563@tumbleweed.com> Message-ID: Hi there! If I'm calling omni_thread::sleep() with an argument greater that 2000 omni_thread:sleep() calls itself until my stack is full.... This only happens for platforms that do not use nanosleep(); Here is how it should be: void omni_thread::sleep(unsigned long secs, unsigned long nsecs /*=3D0*/) { ... if (nsecs > 2000) { // sleep(nsecs); // calls omni_thread::sleep(2000, 0); ::sleep(nsecs); // make sure we call correct sleep() } ... } bjornw> ------------------------------------------------------- Bj=F8rn Wennberg email: bjornw@fairplay.no=20 ms: +47 950 82 657 Senior Programmer phone: +47 22405538 FairPlay International AS fax: +47 22405539 From jlai@uswest.com Fri Jan 15 19:40:07 1999 From: jlai@uswest.com (Lai, Johnny) Date: Fri, 15 Jan 1999 12:40:07 -0700 Subject: [omniORB] Problem compiling 2.6.1 on HP-UX with aCC Message-ID: <93E5AA4FDA9FD011A53E00805FA74D430167F029@OMAEX01.mrg.uswest.com> I am having problem compiling 2.6.1 on HP-UX. When compiling posix.cc in the src/lib/omnithread directory, aCC gave these errors: aCC -c -g -I /opt/aCC/include -I /opt/HP-RT/usr/include +inst_v +DAportable -D_CMA_NOWRAPPERS_ -D_REENTRANT -DPthreadDraftVersion=4 -I. -I../../../include -D__hppa__ -D__hpux__ -D__OSVERSION __=10 -ldir posix.cc -o posix.o Error (future) 600: "/usr/include/stdio.h", line 79 # Type specifier is omitted; "int" is no longer assumed. typedef int64_t fpos64_t; /* 32bit position inside a file */ ^^^^^^^ Error 20: "/usr/include/stdio.h", line 79 # ',' expected before 'fpos64_t'. typedef int64_t fpos64_t; /* 32bit position inside a file */ ^^^^^^^^ .... .... The compile went fine until it got to the omnithread directory. Could this be an incompatibility between our pthread and aCC? Our pthread came with HP-RT developer's kit. Has anybody experienced similar problems? My system: HP-UX B.10.20 A 9000/829 HP aC++ Compiler S800 B3913DB A.01.07.01 HP-RT Developer's Kit B5487AA_APZ A.03.01 libcma.1: HP DCE/9000 1.5 Module: libcma.sl (Export) Date: Apr 29 1996 22:11:24 Thanks Johnny From gdd0@gte.com Fri Jan 15 20:12:33 1999 From: gdd0@gte.com (Gary D. Duzan) Date: Fri, 15 Jan 1999 15:12:33 -0500 Subject: [omniORB] Problem compiling 2.6.1 on HP-UX with aCC Message-ID: <199901152012.PAA22158@lion.gte.com> Just a guess from a quick look at the docs, but try adding the "-ext" flag to the compiler options. That may allow int64_t to be typedefed correctly. Gary Duzan GTE Laboratories In Message <93E5AA4FDA9FD011A53E00805FA74D430167F029@OMAEX01.mrg.uswest.com> , "Lai, Johnny" wrote: =>I am having problem compiling 2.6.1 on HP-UX. When compiling posix.cc in the =>src/lib/omnithread directory, aCC gave these errors: => =>aCC -c -g -I /opt/aCC/include -I /opt/HP-RT/usr/include +inst_v +DAportable =>-D_CMA_NOWRAPPERS_ -D_REENTRANT -DPthreadDraftVersion=4 -I. -I../../../include -D__hppa__ =>-D__hpux__ -D__OSVERSION __=10 -ldir posix.cc -o posix.o Error (future) 600: "/usr/include/stdio.h", line 79 # Type specifier is =>omitted; "int" is no longer assumed. typedef int64_t fpos64_t; /* 32bit position inside a file */ ^^^^^^^ Error 20: "/usr/include/stdio.h", line 79 # ',' expected before 'fpos64_t'. typedef int64_t fpos64_t; /* 32bit position inside a file */ ^^^^^^^^ .... =>.... => =>The compile went fine until it got to the omnithread directory. Could this =>be an incompatibility between our pthread and aCC? Our pthread came with =>HP-RT developer's kit. Has anybody experienced similar problems? => =>My system: =>HP-UX B.10.20 A 9000/829 =>HP aC++ Compiler S800 B3913DB A.01.07.01 =>HP-RT Developer's Kit B5487AA_APZ A.03.01 =>libcma.1: HP DCE/9000 1.5 Module: libcma.sl (Export) =>Date: Apr 29 1996 22:11:24 => =>Thanks =>Johnny => => From anders.ostling@neurope.ikea.com Sat Jan 16 18:04:47 1999 From: anders.ostling@neurope.ikea.com (Anders Vstling) Date: Sat, 16 Jan 1999 19:04:47 +0100 Subject: [omniORB] AIX runtime bomb Message-ID: <36A0D4BF.1E76C696@neurope.ikea.com> Hi AIX 4.2 RS/6000 (not PowerPC, only "Power") EGCS 1.1 Omniorb 2.6.1 (built using EGCS) My app bombs in (gdb) brea main Breakpoint 1 at 0x1000168c: file main.cxx, line 464. (gdb) r Starting program: /home/anos/acid/bin/acid Program received signal SIGSEGV, Segmentation fault. 0xd0311644 in pthread_key_create () (gdb) bt #0 0xd0311644 in pthread_key_create () #1 0xd031158c in pthread_key_create () #2 0xd0165538 in omni_thread::init_t::init_t () #3 0xd0167ef4 in global constructors keyed to omni_mutex::omni_mutex () #4 0xd01685e0 in _GLOBAL__FI_libomnithread_so () #5 0x100226ac in __do_global_ctors () #6 0x10022724 in __main () #7 0x10001688 in main () at main.cxx:455 #8 0x100001a0 in __start () (gdb) quit The program is running. Exit anyway? (y or n) y The program works fine on Linux /Anders From pooh@msu.ru Mon Jan 18 09:38:55 1999 From: pooh@msu.ru (Andrey Slepuhin) Date: Mon, 18 Jan 1999 12:38:55 +0300 (MEST) Subject: [omniORB] AIX runtime bomb In-Reply-To: <36A0D4BF.1E76C696@neurope.ikea.com> Message-ID: On 16-Jan-99 Anders Vstling wrote: > Hi > > AIX 4.2 RS/6000 (not PowerPC, only "Power") > EGCS 1.1 > Omniorb 2.6.1 (built using EGCS) > > My app bombs in > > (gdb) brea main > Breakpoint 1 at 0x1000168c: file main.cxx, line 464. > (gdb) r > Starting program: /home/anos/acid/bin/acid > > Program received signal SIGSEGV, Segmentation fault. > 0xd0311644 in pthread_key_create () > (gdb) bt >#0 0xd0311644 in pthread_key_create () >#1 0xd031158c in pthread_key_create () >#2 0xd0165538 in omni_thread::init_t::init_t () >#3 0xd0167ef4 in global constructors keyed to omni_mutex::omni_mutex () > >#4 0xd01685e0 in _GLOBAL__FI_libomnithread_so () >#5 0x100226ac in __do_global_ctors () >#6 0x10022724 in __main () >#7 0x10001688 in main () at main.cxx:455 >#8 0x100001a0 in __start () > (gdb) quit > The program is running. Exit anyway? (y or n) y > > The program works fine on Linux How do you link your program? The SIGSEGV above is typical when you link your program with non-thread-safe version of libc. Type dump -H and be sure that your program is linked against libc_r.a. Also note that by default egcs installation is not thread-safe. Regards, Andrey. From anders.ostling@neurope.ikea.com Mon Jan 18 11:34:43 1999 From: anders.ostling@neurope.ikea.com (Anders Vstling) Date: Mon, 18 Jan 1999 12:34:43 +0100 Subject: [omniORB] AIX runtime bomb References: Message-ID: <36A31C53.FA8281E5@neurope.ikea.com> Hi I found the problem in dejanews ! I had to specify -mthreads in the compiler command line, and now it magically works !!! /Anders Andrey Slepuhin wrote: > On 16-Jan-99 Anders Vstling wrote: > > Hi > > > > AIX 4.2 RS/6000 (not PowerPC, only "Power") > > EGCS 1.1 > > Omniorb 2.6.1 (built using EGCS) > > > > My app bombs in > > > > (gdb) brea main > > Breakpoint 1 at 0x1000168c: file main.cxx, line 464. > > (gdb) r > > Starting program: /home/anos/acid/bin/acid > > > > Program received signal SIGSEGV, Segmentation fault. > > 0xd0311644 in pthread_key_create () > > (gdb) bt > >#0 0xd0311644 in pthread_key_create () > >#1 0xd031158c in pthread_key_create () > >#2 0xd0165538 in omni_thread::init_t::init_t () > >#3 0xd0167ef4 in global constructors keyed to omni_mutex::omni_mutex () > > > >#4 0xd01685e0 in _GLOBAL__FI_libomnithread_so () > >#5 0x100226ac in __do_global_ctors () > >#6 0x10022724 in __main () > >#7 0x10001688 in main () at main.cxx:455 > >#8 0x100001a0 in __start () > > (gdb) quit > > The program is running. Exit anyway? (y or n) y > > > > The program works fine on Linux > > How do you link your program? The SIGSEGV above is typical when > you link your program with non-thread-safe version of libc. > Type dump -H and be sure that your program is > linked against libc_r.a. > > Also note that by default egcs installation is not thread-safe. > > Regards, > Andrey. -- -------------------------------------------------------- Anders Östling IKEA Corporate Technology Group Email: anders dot ostling AT neurope dot ikea dot com Phone: +46-42-25 73 45 Fax : +46-42-25 73 70 Mobil: +46-70-753 70 39 -------------------------------------------------------- From pooh@msu.ru Mon Jan 18 12:21:18 1999 From: pooh@msu.ru (Andrey Slepuhin) Date: Mon, 18 Jan 1999 15:21:18 +0300 (MEST) Subject: [omniORB] AIX runtime bomb In-Reply-To: <36A31C53.FA8281E5@neurope.ikea.com> Message-ID: On 18-Jan-99 Anders Vstling wrote: > Hi > > I found the problem in dejanews ! I had to specify -mthreads in the > compiler command line, and now it magically works !!! Well, -mthreads only implies -D_THREAD_SAFE at compile time and -lc_r -lpthreads at link time. But: *all* libraries should be rebuilt with -mthreads option. The same should be done for libstdc++ and libgcc. I use a custom patch that builds multilibbed egcs installation with thread-safe version of libraries. Also note that egcs-1.1 doesn't have thread-safe exception handling (IIRC this was fixed in egcs-1.1.1). Regards, Andrey. From S.Lo@orl.co.uk Mon Jan 18 18:00:02 1999 From: S.Lo@orl.co.uk (Sai-Lai Lo) Date: 18 Jan 1999 18:00:02 +0000 Subject: [omniORB] SSL support status? In-Reply-To: rshoup@tumbleweed.com's message of "Thu, 14 Jan 1999 18:15:26 -0800" References: <369D68AB.D4988563@tumbleweed.com> <3oiue97osj.fsf@neem.cam-orl.co.uk> <369EA4BE.B9D2F591@tumbleweed.com> Message-ID: <3ohfto31i5.fsf@neem.cam-orl.co.uk> OK! As promised, I have left a tar-ball of omniORB 2.5.0 + SSL stuff for Solaris 2.5 in ftp://ftp.orl.co.uk/pub/omniORB/omniORB_2.5.0_ssl.tar.gz. The SSL stuff uses SSLeay-0.9.0. Included in the tar-ball is the library and header files from SSLeay. The SSLeay executables are not included. The tar-ball compiles and the examples work for me. Documentation is still sparse. The source code and header files might be the best documentation. If you have questions and need some pointers, please contact Tatsuo Nakajima (CC:omniorb@orl.co.uk). As I said before, this is a snapshot of an ongoing development and has not been merged into the main development. Be prepared to dive in the source code if you encounter any problems. Regards, Sai-Lai >>>>> Randy Shoup writes: > Perfect. We've done some SSL stuff before, so hopefully we can give > some constructive feedback. > We'll also do the "vigorous testing" part :-), and would be happy to > reintegrate the changes with 2.6.1 (or 2.7.0, if that becomes available > soon). -- Dr. Sai-Lai Lo | Research Scientist | E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab | 24a Trumpington Street Tel: +44 223 343000 | Cambridge CB2 1QA Fax: +44 223 313542 | ENGLAND From dmorgen@alum.mit.edu Mon Jan 18 21:42:36 1999 From: dmorgen@alum.mit.edu (David Morgenlender) Date: Mon, 18 Jan 1999 21:42:36 GMT Subject: [omniORB] #include in .IDL file works incorrectly!!! In-Reply-To: <36a05c28.166031374@smtp.ne.mediaone.net> References: <366468EE.2615DB12@fairplay.no> <3or9uisp1n.fsf@neem.cam-orl.co.uk> <36a05c28.166031374@smtp.ne.mediaone.net> Message-ID: <36a6a90e.123601759@smtp.ne.mediaone.net> My email was down for awhile, and I lost some messages. If anybody = responded to my messages, I'd appreciate it if you re-send the messages. Thanks! =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Dave Morgenlender e-mail: dmorgen@alum.mit.edu =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D From mcfadden@dstc.edu.au Tue Jan 19 03:40:47 1999 From: mcfadden@dstc.edu.au (Ted McFadden) Date: Tue, 19 Jan 1999 13:40:47 +1000 (EST) Subject: [omniORB] 2.6.1 / error in code generated for unions... Message-ID: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. ---559023410-33463914-916717247=:2710 Content-Type: TEXT/PLAIN; charset=US-ASCII (This bug did not turn up in a search of the archive, please disregard if it is a known problem) For unions like: union switch(long){ case 2: string aString; }; the generated code for getting/setting the discriminator is: CORBA::Long _d () const { return pd__d;} void _d(CORBA::Long _value) {} // EMPTY?? The union can still be set to 2 by calling aString(*) and the _default value but nothing else. Most of the copying and streaming code generated appears to be prepared to handle the other values if they could be set. There is an attached UnionTrouble.idl file that illustrates the problem with a few simple unions. One other thing, the legal: union bad switch(long){ case 1: case 2: string test; }; will not compile, complaining about redefinitions. Cheers, Ted. -- Ted McFadden http://www.dstc.edu.au/BDU/staff/ted-mcfadden.html DSTC Level 7, GPS Building 78, Staff House Road The University of Queensland St Lucia 4072 +61 7 3365-4310 ---559023410-33463914-916717247=:2710 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="UnionTrouble.idl" Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename="UnionTrouble.idl" DQptb2R1bGUgVW5pb25Ucm91YmxlICB7DQoNCiAgLy9maXJzdCB0ZXN0IGNh c2UgdGFrZW4gZnJvbSBidWcgcmVwb3J0ICMzNA0KDQoNCiAgLy8gZ2VuZXJh dGVkIF9kKENPUkJBOjpCb29sZWFuKSBpZ25vcmVzIGl0cyBhcmcsIGNhbid0 DQogIC8vIHNldCBkaXNjcmltaW5hdG9yLCBjYW4gb25seSBzZXQgdG8gRkFM U0UgYnkgY2FsbGluZw0KICAvLyBfZGVmYXVsdCgpDQoNCiAgdW5pb24gWCBz d2l0Y2ggKGJvb2xlYW4pIHsNCiAgICBjYXNlIFRSVUU6IHNob3J0IHM7DQog IH07DQoNCiAvLyBfZCBpZ25vcmVzIGFyZywgY2FuIG9ubHkgc2V0IGRpc2Ny aW1pbmF0b3IgdG8gLTIxNDc0ODM2NDcNCiAvLyB2aWEgX2RlZmF1bHQoKSBv ciAyIHZpYSAgc3RyaW5nX2Zvcl90d28oLi4uKS4NCg0KICB1bmlvbiBDaG9v c2VMb25nIHN3aXRjaChsb25nKXsNCiAgICBjYXNlIDI6IHN0cmluZyBzdHJp bmdfZm9yX3R3bzsNCiAgfTsNCg0KICBlbnVtIENob2ljZSB7IG9uZSwgdHdv LCB0aHJlZSwgZm91ciAgfTsNCiAgDQogIHVuaW9uIENob29zZU9uZSBzd2l0 Y2ggKCBDaG9pY2UgKSB7DQogICAgIGNhc2UgdHdvOiBzdHJpbmcgZm9yX3R3 bzsNCiAgfTsNCg0KLy8gIHdpbGwgbm90IGNvbXBpbGUgDQovLyAgdW5pb24g YmFkIHN3aXRjaChsb25nKXsNCi8vICAgICBjYXNlIDE6DQovLyAgICAgY2Fz ZSAyOiBzdHJpbmcgdGVzdDsNCi8vICB9Ow0KfTsNCg0K ---559023410-33463914-916717247=:2710-- From S.Lo@orl.co.uk Tue Jan 19 12:11:39 1999 From: S.Lo@orl.co.uk (Sai-Lai Lo) Date: 19 Jan 1999 12:11:39 +0000 Subject: [omniORB] #include in .IDL file works incorrectly!!! In-Reply-To: dmorgen@alum.mit.edu's message of "Thu, 14 Jan 1999 21:20:33 GMT" References: <366468EE.2615DB12@fairplay.no> <3or9uisp1n.fsf@neem.cam-orl.co.uk> <36a05c28.166031374@smtp.ne.mediaone.net> Message-ID: <3o90ezbgxw.fsf@neem.cam-orl.co.uk> David, I guess what you are trying to do is something like this in pure OMG IDL. // File S.IDL // OMG IDL struct X { string A; char B; }; // File MAIN.IDL #include "S.IDL" interface I { X op(); }; The complication is you want the definition of struct X to be done in a single source file for both COM and CORBA. 1. Remember, the IDL compiler handle all the #include files only as IDL files so any C++ specific constructs in the files would not be recognised. 2. I suppose it is a bug that the compiler translate something like this: interface I { #include "S.IDL" X op(); }; into #include "S.hh" class I { .... }; Hence relocate the #include out of the context it is used in the IDL. However, it is difficult to detect this and generate #include in the output at the right context. 3. I don't know if I have an answer to achieve what you want. One possibility may be to define a single IDL file with appropriate #if to separate OMG IDL specific and COM IDL specific part while sharing as much as possible. Regards, Sai-Lai >>>>> David Morgenlender writes: > I'm trying to #include a .H file into my .IDL file. But the IDL compiler is > having problems: > 1. If I do the #include within an interface, I get a "can't parse statement" > error & the compiler (omniidl2) crashes with a system exception. > 2. So, for testing purposes, I moved the #include outside any interface & tried > again. I preceded the #include with a typedef statement, defining a type used > by the .H file. This compiled without error, but generated incorrect code, e.g. > in the .HH file: > a. The #include statement is put at the front of the .HH file, while the > typedef is placed later, AFTER the #include, which requires it. > b. The #include is for x.HH, when it should be for x.H. > How can I get the IDL compiler to do what I need, which is handle a struct > defined within an interface, via a .H file, placing a typedef before the struct? > BTW, here's why I'm doing things this way ... I use the same struct in different > apps, some of which use CORBA, some of which use COM, & some of which use both. > The variables within the struct are carefully used so they generate compatible > data for both CORBA & COM, assuming the typedef mentioned above is defined > appropriately in both CORBA & COM .IDL files. I desperately want to avoid > having to define 2 different structs for CORBA & COM ... this is a very large > struct!!! > So I'm #include'ing one .H into both my CORBA & COM IDL files. I want to do > this within an interface, so the struct typedef is essentially given a different > name for CORBA than for COM, since one app will have both definitions. > If the CORBA IDL compiler cannot be made to work with this approach, can you > suggest something better??? > ======================================================= > Dave Morgenlender > e-mail: dmorgen@alum.mit.edu > ======================================================= -- Dr. Sai-Lai Lo | Research Scientist | E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab | 24a Trumpington Street Tel: +44 223 343000 | Cambridge CB2 1QA Fax: +44 223 313542 | ENGLAND From kai@oxford.demon.co.uk Tue Jan 19 12:13:14 1999 From: kai@oxford.demon.co.uk (Kai Chen) Date: Tue, 19 Jan 1999 12:13:14 +0000 Subject: [omniORB] OmniOrb - ODBMS adaptors ??? Message-ID: <36A476DA.D6F8DBF8@oxford.demon.co.uk> Has anybody had any experience in using one of the Object Databases (e.g. O2, Objectivity and ObjectStore) with OmniORB? Any comments are appreciated. Thanks very much. Kai Chen Oxford Forecasting Services 58 St. Aldates Oxford OX1 1ST UK Tel: +44 (0) 1865 249002 Fax: +44 (0) 1865 200565 E-mail: kai@oxford.demon.co.uk From dmorgen@alum.mit.edu Tue Jan 19 13:59:20 1999 From: dmorgen@alum.mit.edu (David Morgenlender) Date: Tue, 19 Jan 1999 13:59:20 GMT Subject: [omniORB] #include in .IDL file works incorrectly!!! In-Reply-To: <3o90ezbgxw.fsf@neem.cam-orl.co.uk> References: <366468EE.2615DB12@fairplay.no> <3or9uisp1n.fsf@neem.cam-orl.co.uk> <36a05c28.166031374@smtp.ne.mediaone.net> <3o90ezbgxw.fsf@neem.cam-orl.co.uk> Message-ID: <36ab858c.180055749@smtp.ne.mediaone.net> Sai-Lai, >I guess what you are trying to do is something like this in pure OMG = IDL. > >// File S.IDL >// OMG IDL >struct X { > string A; > char B; >}; > > >// File MAIN.IDL >#include "S.IDL" > >interface I { > X op(); >}; Almost: 1. I'm doing: typedef struct ... But I could live with the way you have it. 2. The struct is being used as a parameter type, not a return value. >The complication is you want the definition of struct X to be done in a >single source file for both COM and CORBA. > >1. Remember, the IDL compiler handle all the #include files only as IDL > files so any C++ specific constructs in the files would not be > recognised. That's not a problem given the nature of this particular struct. Among = other things, all variables must be fixed length ... so no "string", = variable-length array, etc. >2. I suppose it is a bug that the compiler translate something like = this: > > interface I { > #include "S.IDL" > X op(); > }; > > into > #include "S.hh" > > class I { > .... > }; > > Hence relocate the #include out of the context it is used in the IDL. > However, it is difficult to detect this and generate #include in the > output at the right context. This bug is annoying, but not fatal. >3. I don't know if I have an answer to achieve what you want. > One possibility may be to define a single IDL file with appropriate > #if to separate OMG IDL specific and COM IDL specific part while > sharing as much as possible.=20 The difference between this & my solution is that in my solution, the differences are handled by using typedef (& possibly #if) in the invoking= source file, while your approach puts everything in the #include'd file, except = the #define's. However, both approaches have problems with the way the = compiler currently works: The compiler generated incorrect code, e.g. in the .HH file: a. The #include statement is put at the front of the .HH file, while = the typedef is placed later, AFTER the #include, which requires it. b. The #include is for x.HH, which is not generated by the compiler & = does not exist. =20 c. There is no #include for x.H. d. The struct definition does not exist for any source file created by= the compiler! It's not in any compiler output file. It's only in the = original .H file ... but this is not #include'd anywhere. So the compiler-produced = source files will not compile! Neither will any application source file, which #include's the compiler-produced header files. e. Any #define in the main .IDL file is lost! My playing around with = it, I was able to determine the compiler used it when processing x.H. However,= it's totally lost after the IDL compilation! f. The typedef in the main .IDL file is not lost. However, it is = placed in the main .HH file AFTER the #include of x.HH, where it doesn't do any = good. I can kludge around the problems both in my application source code & the compiler-generated sourse code. =20 a. I can create a dummy x.HH file, which is already #include'd by the compiler-generated files & will be #include'd by my app. b. The dummy x.HH file will redundantly have the relevant typedef's & #define's as are in the main .IDL file. c. The dummy x.HH file then #include's x.H. But even this still has a problem. There is now a redundant typedef: = the one I put in x.HH & the one the IDL compiler puts in the main .HH file in the = wrong place. I'm not sure if this will cause a C++ compiler error. I may be able to get tye typedef problem by using redundant #define's = instead. I think my approach covers everything else; but haven't tried it. IAE, = it's VERY kludgey. It requires redundant #define's, which I hate to do, since= it tends to lead to future errors. Do you think this will work? Do you have any better suggestions? ------------------------------------------------------------------------- I've thought of one other strategy, which avoids all the CORBA issues, = but is somewhat ugly. On the COM side, I really need to use the #include in the= .IDL file; this allows any COM client to use the struct, whether it be C++ or= VB, without any redundant struct definitions, such as in VB. In the CORBA = server application I also want to use the same .H file for cleanliness & = avoiding future errors. =20 However, I can take a different approach when handling the struct between= COM server & client. I can pass the struct as a fixed-length array of bytes.= I can layer functions, such that the COM server application code never sees the= kludge ... it will #include x.H & just see structs as calling parameters. The = IDL file never sees a definition of the struct. My interface code on the COM = server can at least insure the size of the array matches the expected size of the = struct to reduce, but not eliminate, the chances of use of inconsistent struct definitions, etc. Opinions? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Dave Morgenlender e-mail: dmorgen@alum.mit.edu =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D From djr@orl.co.uk Tue Jan 19 17:45:25 1999 From: djr@orl.co.uk (David Riddoch) Date: Tue, 19 Jan 1999 17:45:25 +0000 (GMT) Subject: [omniORB] #include in .IDL file works incorrectly!!! In-Reply-To: <36ab858c.180055749@smtp.ne.mediaone.net> Message-ID: David, The IDL compiler treats #includes in a special way because it assumes that what you are including will be IDL, and also that you will compile this IDL separately. If you want #includes to work the way you expect them to then you could try running the C pre-processor over your IDL file separately. You will then need to remove the information that the C pre-processor adds before running it through the IDL compiler. The C pre-processor adds lines that start with a # and contain info about what file and line number it is currently at. The advantage of this approach is that the IDL compiler will see a single pure IDL file, and will define your structure in C++ for you. All you have to do is write a script to automate it! I hope this solution works for you. Cheers, David From c1040@azfms.com Tue Jan 19 18:49:58 1999 From: c1040@azfms.com (Rusty Carruth) Date: Tue, 19 Jan 1999 11:49:58 -0700 Subject: [omniORB] #include in .IDL file works incorrectly!!! Message-ID: <9901191849.AA02706@fmsserv99.azfms.com> > > The advantage of this approach is that the IDL compiler will see a single > pure IDL file, and will define your structure in C++ for you. All you have > to do is write a script to automate it! > and it can be done automatically in the makefile (you ARE using make files, right?). If I were doing it, I'd run the c preprocessor on a file, do some diffs, and make a sed or awk or grep or perl script to remove the new stuff added to the file, then stick that into the makefile... rusty From dmorgen@alum.mit.edu Tue Jan 19 21:17:08 1999 From: dmorgen@alum.mit.edu (David Morgenlender) Date: Tue, 19 Jan 1999 21:17:08 GMT Subject: [omniORB] #include in .IDL file works incorrectly!!! In-Reply-To: References: Message-ID: <36a4f5d6.12845476@smtp.ne.mediaone.net> David, >The IDL compiler treats #includes in a special way because it assumes = that >what you are including will be IDL, and also that you will compile this >IDL separately. > >If you want #includes to work the way you expect them to then you could >try running the C pre-processor over your IDL file separately. You will >then need to remove the information that the C pre-processor adds before >running it through the IDL compiler. The C pre-processor adds lines that >start with a # and contain info about what file and line number it is >currently at. > >The advantage of this approach is that the IDL compiler will see a = single >pure IDL file, and will define your structure in C++ for you. All you = have >to do is write a script to automate it! > >I hope this solution works for you. Thanks for the suggestion. That sounds like it should work. But it will= take more time than I have to spend on it now. So for now I'm going to use = the kludge of treating the struct as an array of bytes as far as CORBA is = concerned. I'll write some low level code to hide this from the app, which will only= deal with the struct. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Dave Morgenlender e-mail: dmorgen@alum.mit.edu =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D From dmorgen@alum.mit.edu Tue Jan 19 21:21:15 1999 From: dmorgen@alum.mit.edu (David Morgenlender) Date: Tue, 19 Jan 1999 21:21:15 GMT Subject: [omniORB] #include in .IDL file works incorrectly!!! In-Reply-To: <9901191849.AA02706@fmsserv99.azfms.com> References: <9901191849.AA02706@fmsserv99.azfms.com> Message-ID: <36a5f662.12985742@smtp.ne.mediaone.net> Rusty, =20 >> The advantage of this approach is that the IDL compiler will see a = single >> pure IDL file, and will define your structure in C++ for you. All you = have >> to do is write a script to automate it! >>=20 > >and it can be done automatically in the makefile (you ARE using >make files, right?). If I were doing it, I'd run the c preprocessor >on a file, do some diffs, and make a sed or awk or grep or perl=20 >script to remove the new stuff added to the file, then stick that >into the makefile... I'm only using makefiles indirectly. I'm using the Visual C++ 5 IDE. So= I'd have to figure out how to customize the build in the IDE to do this; but= I believe that is readily doable. However, I don't have time to deal with this approach now, especially = writing the script (& having to learn awk, or whatever). So I'm going to take = the Q&D approach of treating the struct as an array of bytes at the low level & = for CORBA. The higher level app code will still deal with it as a struct. Thanks for the suggestion. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Dave Morgenlender e-mail: dmorgen@alum.mit.edu =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D From c1040@azfms.com Tue Jan 19 21:29:08 1999 From: c1040@azfms.com (Rusty Carruth) Date: Tue, 19 Jan 1999 14:29:08 -0700 Subject: [omniORB] #include in .IDL file works incorrectly!!! Message-ID: <9901192129.AA05762@fmsserv99.azfms.com> > However, I don't have time to deal with this approach now, especially writing > the script (& having to learn awk, or whatever). So I'm going to take the Q&D well, its not THAT hard to make a script: if the lines you want to remove look like this: ----begin file---- good stuff...; #line 2 /* the bad stuff */ #debuginfo foo /* more bad stuff */ some good stuff; #hellothere now /* the last bad thing */ ----end of file------ then you could just use a grep (grep is available for windows as well as unix - go get gnugrep) like this: cat thefile.c | grep -v '^#(line)|(debuginfo)|(hellothere) ' > theoutputfile.cpp in fact, you don't really have to put it into your make file if you don't mind making it manually... (just have theoutputfile.cpp rely on your original file - the one you pre process with the c preprocessor to get 'thefile.c' - but don't tell it how to make it and you'll get forcefully reminded to update the file when needed ;-) Or, use m4 instead of the c preprocessor... rusty From dmorgen@alum.mit.edu Tue Jan 19 21:44:57 1999 From: dmorgen@alum.mit.edu (David Morgenlender) Date: Tue, 19 Jan 1999 21:44:57 GMT Subject: [omniORB] #include in .IDL file works incorrectly!!! In-Reply-To: <9901192129.AA05762@fmsserv99.azfms.com> References: <9901192129.AA05762@fmsserv99.azfms.com> Message-ID: <36a7fc6b.14530386@smtp.ne.mediaone.net> Rusty, >then you could just use a grep (grep is available for windows as >well as unix - go get gnugrep) like this: > >cat thefile.c | grep -v '^#(line)|(debuginfo)|(hellothere) ' > = theoutputfile.cpp Thanks. I didn't realize grep could do such things ... the DOS greps = I've used could not. There's no 'cat' in Windows or DOS; but that's easy to = workaround. >Or, use m4 instead of the c preprocessor... What's m4? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Dave Morgenlender e-mail: dmorgen@alum.mit.edu =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D From c1040@azfms.com Tue Jan 19 22:20:01 1999 From: c1040@azfms.com (Rusty Carruth) Date: Tue, 19 Jan 1999 15:20:01 -0700 Subject: [omniORB] #include in .IDL file works incorrectly!!! Message-ID: <9901192220.AA06287@fmsserv99.azfms.com> > Thanks. I didn't realize grep could do such things ... the DOS greps I've used > could not. There's no 'cat' in Windows or DOS; but that's easy to workaround. Its either grep or egrep that has the '-v' (invert) flag. REALLY handy... > >Or, use m4 instead of the c preprocessor... > > What's m4? > m4 is a macro processor program. Its used a lot by folks doing sendmail configuration (and possibly smail, I don't know). (Used for reasons I won't bore anyone with ;-). Anyway, its a macro processor. Here's part of the man page on my Solaris machine: m4(1) User Commands m4(1) NAME m4 - macro processor SYNOPSIS /usr/ccs/bin/m4 [ -e ] [ -s ] [ -B int ] [ -H int ] [ -S int ] [ -T int ] [ -Dname [=val] ] ... [ -U name ] ... [ file ... ] /usr/xpg4/bin/m4 [ -e ] [ -s ] [ -B int ] [ -H int ] [ -S int ] [ -T int ] [ -Dname [=val] ] ... [ -U name ] ... [ file ... ] AVAILABILITY /usr/ccs/bin/m4 SUNWcsu /usr/xpg4/bin/m4 SUNWxcu4 DESCRIPTION The m4 command is a macro processor intended as a front end for C, assembler, and other languages. Each of the argument files is processed in order; if there are no files, or if a file is -, the standard input is read. The processed text is written on the standard output. Macro Syntax Macro calls have the form: name(arg1,arg2, ..., argn) The ( must immediately follow the name of the macro. If the name of a defined macro is not followed by a (, it is deemed to be a call of that macro with no arguments. Potential macro names consist of alphanumeric characters and under- score (_), where the first character is not a digit. Leading unquoted blanks, TABs, and NEWLINEs are ignored while collecting arguments. Left and right single quotes are used to quote strings. The value of a quoted string is the string stripped of the quotes. ...LOTS of stuff deleted.... Anyway, its probably easier to just run your stuff through the c pre processor, since that's what you're doing anyway... rusty. From storm@ifad.dk Wed Jan 20 14:45:55 1999 From: storm@ifad.dk (Ole Storm) Date: Wed, 20 Jan 1999 15:45:55 +0100 Subject: [omniORB] Condition Variables on NT and Linux Message-ID: <36A5EC23.F7D52E4F@ifad.dk> Greetings all, I am using omniORB 2.6.1 on Windows NT 4.0 and on Linux. I am experiencing some troubles with condition variables which I am using in the following way: Client applications and my server application synchronize at certain points using a condition variable. I.e. if some data (a list of events in this case) is not available at the time of request, the client thread is set to wait by a call to wait() on a global omni_condition variable held by the server. When the server provides the data all waiting clients are awakened by calling broadcast() on the condition variable. It should be noted that the client and server are running in separate processes. Problem 1: On WindowsNT the client threads are apparently never awakened by the call to broadcast(). On Linux things works OK - waiting clients are actually awakened. In the mailing list-archive I have seen this problem described in articles: http://www.orl.co.uk:80/omniORB/archives/1998-07/0076.html http://www.orl.co.uk:80/omniORB/archives/1998-04/0116.html however, I thought that this problem was already fixed in omniORB 2.6.1 Problem 2: On Linux I experience a minor problem too. If, at some point in time, two clients have been waiting on the same condition variable, and then at a later point in time one of the two clients terminate execution (it is terminated nicely, i.e. it is not interrupted while waiting!), then later calls to broadcast() fails to awaken the remaining client. The client is not awakened until a second client thread is started and set to wait on the condition variable. It seems that broadcast() can not handle if the number of clients using a condition variable is decreased at some point in time. It should be noted that I have compiled omniORB 2.6.1 with egcs1.1.1 Any ideas as to what I may be doing wrong??? Best regards, Ole. --------------------------------------------------------------- Ole Storm The Institute of Applied Computer Science (IFAD) Forskerparken 10, DK-5230 Odense M, Denmark Phone: +45 6315 7134, Fax: +45 6593 2999, Email: storm@ifad.dk WWW: http://www.ifad.dk --------------------------------------------------------------- From zeynep@top.cis.syr.edu Wed Jan 20 19:52:50 1999 From: zeynep@top.cis.syr.edu (Zeynep Ozdemir) Date: Wed, 20 Jan 1999 14:52:50 -0500 (EST) Subject: [omniORB] omniORB2.6.1 on irix6.3/4/5 Message-ID: Hi, does anybody use omniorb on sgi machine say irix 6.3/5? I compiled it on irix6.5 with mipsPro cc version 7.2.1.1m when I tried eg1/eg2 or nameclt but during runtime, I am getting Error: unresolvable symbol in /u/zeynep/omniORB_2.6.1/lib/mips_irix_6.5_n32/libomniORB2.so: allowFile__10gateKeeper Error: unresolvable symbol in /u/zeynep/omniORB_2.6.1/lib/mips_irix_6.5_n32/libomniORB2.so: denyFile__10gateKeeper rld: Fatal Error: this executable has unresolvable symbols can anybody help me to solve this? regards, Zeynep Odcikin-Ozdemir Syracuse University From andrew.king@mocom.co.nz Thu Jan 21 04:36:36 1999 From: andrew.king@mocom.co.nz (Andrew King) Date: Thu, 21 Jan 1999 17:36:36 +1300 Subject: [omniORB] Omniorb and Java Message-ID: <36A6AED4.908FD436@mocom.co.nz> Hi, How do I go about using OmniOrb with Java objects?. I understand (from looking at the documentation) that Omniorb only provides an IDL to C++ generator. If Java (or infact any language) can be used how much effort is required. Please excuse my ignorance as I'm totally new to CORBA/OmniOrb etc. Cheers Andrew. -- _______________________________________________________________________ Andrew King Phone: (+64 4) 473 1480 OO Developer Fax: (+64 4) 473 1515 Mocom Corporation (NZ) Ltd, 10 Brandon Street, Wellington. email: andrew.king@mocom.co.nz PO Box 10-278, Wellington. *********************************************************************** This communication is confidential to MOCOM and is intended for use only by the addressee. MOCOM does not represent that this communication (including any files attached) is free from computer viruses or other faults or defects. MOCOM accepts no responsibility or liability for information, errors or omissions in this communication or use or misuse thereof or any act done or omitted to be done in connection with same. It is the responsibility of any person opening files attached to this communication to scan those files for computer viruses. *********************************************************************** From storm@ifad.dk Thu Jan 21 10:16:24 1999 From: storm@ifad.dk (Ole Storm) Date: Thu, 21 Jan 1999 11:16:24 +0100 Subject: [omniORB] Condition varaibles - follow up... Message-ID: <36A6FE78.ECE2C9E2@ifad.dk> This is a multi-part message in MIME format. --------------C4213DF93B80E2AAEF4EF518 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Greetings, Yesterday I mentioned a problem with condition variables on Windows NT. To clarify my problems I have made a small example, a simple bounded buffer that can be accessed from one or more producer and consumer processes. The code is attached to this mail. When the buffer process is run on Linux everything works OK. Producers are set to wait if the buffer is full and consumers are set to wait if the buffer is empty. Waiting threads _are_ awakened when the state of the buffer changes. On Windows NT 4.0, however, a process that has been set to wait is never awakened!!! Why is that?? Could someone _please_ try out my example and explain to me why this does not work om WindowsNT. Best regards, Ole. --------------------------------------------------------------- Ole Storm The Institute of Applied Computer Science (IFAD) Forskerparken 10, DK-5230 Odense M, Denmark Phone: +45 6315 7134, Fax: +45 6593 2999, Email: storm@ifad.dk WWW: http://www.ifad.dk --------------------------------------------------------------- --------------C4213DF93B80E2AAEF4EF518 Content-Type: text/plain; charset=us-ascii; name="buffer.idl" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="buffer.idl" typedef short BufferItem; interface Buffer { BufferItem GetItem(); void PutItem(in BufferItem item); }; --------------C4213DF93B80E2AAEF4EF518 Content-Type: text/plain; charset=us-ascii; name="buffer.cc" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="buffer.cc" #include "buffer.hh" #include "omnithread.h" #include #define BUF_SIZE 10 // Declaration of condition variables: static omni_mutex cond_mutex; static omni_condition empty_buf(&cond_mutex); static omni_condition full_buf(&cond_mutex); static omni_mutex mutex_region; class Buffer_i : public virtual _sk_Buffer // // Implementation of the Buffer interface // { public: Buffer_i() : index(0) {} BufferItem GetItem ( ); void PutItem ( BufferItem ); private: // The fixed size buffer: BufferItem TheBuffer[BUF_SIZE]; int index; }; BufferItem Buffer_i::GetItem() { while(!index){ // No items awailable. Wait on the condition varaible empty_buf: empty_buf.wait(); } mutex_region.lock(); BufferItem itm = TheBuffer[--index]; cout << "Returned item: " << itm << "\n" << flush; // Signal one of the possible waiting threads on PutItem() full_buf.signal(); mutex_region.unlock(); return itm; } void Buffer_i::PutItem(BufferItem it) { while(index >= BUF_SIZE){ cout << "PutItem() waiting to put an item..."; full_buf.wait(); if(index < BUF_SIZE) cout << "OK\n"; else cout << "Retry\n"; } mutex_region.lock(); // OK to put an item now: TheBuffer[index++] = it; cout << "Got item: " << it << "\n"; // Signal one of the possible waiting threads on GetItem() empty_buf.signal(); mutex_region.unlock(); } CORBA::ORB_var _the_orb; CORBA::BOA_var _the_boa; main(int argc, char *argv[]) { _the_orb = CORBA::ORB_init(argc, argv, "omniORB2"); _the_boa = _the_orb->BOA_init(argc, argv, "omniORB2_BOA"); Buffer_i *theBuffer = new Buffer_i(); theBuffer->_obj_is_ready(_the_boa); Buffer_var buf_ref = theBuffer->_this(); CORBA::String_var pp = _the_orb->object_to_string(buf_ref); cerr << pp << "\n" << flush; _the_boa->impl_is_ready(0); // // Create a file for the object reference: // ofstream newfile; // newfile.open("object.string"); // if(newfile.good()) { // newfile << (char *)pp << endl; // } // else{ // err = "Could not create file object.string\n"; // } // newfile.close(); return 0; } --------------C4213DF93B80E2AAEF4EF518 Content-Type: text/plain; charset=us-ascii; name="consumer.cc" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="consumer.cc" #ifdef _MSC_VER #define SLEEP(n) Sleep(n) #else #include // For usleep() #define SLEEP(n) usleep(1000*n) #endif #include #include "buffer.hh" CORBA::ORB_var _the_orb; CORBA::BOA_var _the_boa; main(int argc, char *argv[]) { _the_orb = CORBA::ORB_init(argc, argv, "omniORB2"); _the_boa = _the_orb->BOA_init(argc, argv, "omniORB2_BOA"); if (argc < 2) { cerr << "usage: consumer []" << endl; return 1; } int period = 2000; if (argc == 3) { period = atoi(argv[2]); } try { CORBA::Object_var obj = _the_orb->string_to_object(argv[1]); Buffer_var buf = Buffer::_narrow(obj); if(CORBA::is_nil(buf)){ cout << "Error: Object reference not valid\n"; exit(0); } int i=0; while(1){ cout << "Trying to get an item..." << flush; BufferItem it = buf->GetItem(); cout << "Got " << it << "\n"; SLEEP(period); } } catch(CORBA::COMM_FAILURE& ex) { cerr << "Caught system exception COMM_FAILURE, unable to contact the " << "object." << endl; } catch(omniORB::fatalException& ex) { cerr << "Caught omniORB2 fatalException. This indicates a bug is caught " << "within omniORB2.\nPlease send a bug report.\n" << "The exception was thrown in file: " << ex.file() << "\n" << " line: " << ex.line() << "\n" << "The error message is: " << ex.errmsg() << endl; } catch(...) { cerr << "Caught a system exception." << endl; } return 0; } --------------C4213DF93B80E2AAEF4EF518 Content-Type: text/plain; charset=us-ascii; name="producer.cc" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="producer.cc" #ifdef _MSC_VER #define SLEEP(n) Sleep(n) #else #include // For usleep() #define SLEEP(n) usleep(1000*n) #endif #include #include "buffer.hh" CORBA::ORB_var _the_orb; CORBA::BOA_var _the_boa; main(int argc, char *argv[]) { _the_orb = CORBA::ORB_init(argc, argv, "omniORB2"); _the_boa = _the_orb->BOA_init(argc, argv, "omniORB2_BOA"); if (argc < 2) { cerr << "usage: producer []" << endl; return 1; } int period = 2000; if (argc == 3) { period = atoi(argv[2]); } try { CORBA::Object_var obj = _the_orb->string_to_object(argv[1]); Buffer_var buf = Buffer::_narrow(obj); if(CORBA::is_nil(buf)){ cout << "Error: Object reference not valid\n"; exit(0); } int i=0; while(1){ cout << "Trying to put item " << i << "..." << flush; buf->PutItem(i++); cout << "OK\n"; SLEEP(period); } } catch(CORBA::COMM_FAILURE& ex) { cerr << "Caught system exception COMM_FAILURE, unable to contact the " << "object." << endl; } catch(omniORB::fatalException& ex) { cerr << "Caught omniORB2 fatalException. This indicates a bug is caught " << "within omniORB2.\nPlease send a bug report.\n" << "The exception was thrown in file: " << ex.file() << "\n" << " line: " << ex.line() << "\n" << "The error message is: " << ex.errmsg() << endl; } catch(...) { cerr << "Caught a system exception." << endl; } return 0; } --------------C4213DF93B80E2AAEF4EF518 Content-Type: text/plain; charset=us-ascii; name="Makefile" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="Makefile" # # Win 32 # ifeq ($(OSTYPE),win32) # Edit these variables to reflect the location of your installation OMNIDIR = c:/omniORB_2.6.1 CORBA_CPPFLAGS = -D__WIN32__ -D__x86__ -D__NT__ -D__OSVERSION__=4 INCDIR = -I. -I$(OMNIDIR)/include CORBA_LIB = wsock32.lib advapi32.lib \ $(OMNIDIR)/lib/x86_win32/omniORB260_rt.lib \ $(OMNIDIR)/lib/x86_win32/omnithread2_rt.lib CXX = cl /nologo CXXDLL = -LD $(DEBUGDLL) CXXFLAGS = -MT -GX $(DEBUG) $(CORBA_CPPFLAGS) DEBUG = -Zi -MTd DEBUGDLL = -LDd #DEBUG = #DEBUGDLL = COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $(INCDIR) -c CCOUT = -Fo CCIN = -Tp LNKOUT = -Fe OBJ = obj EXE = .exe OMNIIDL2 = $(OMNIDIR)/bin/x86_win32/omniidl2 endif # # Linux # ifeq ($(OSTYPE),Linux) # Edit these variables to reflect the location of your installation OMNIDIR = /local/share/lib/omniORB_2.6.1 PTHREAD_DIR = /opt/linuxthreads-0.71/ CORBA_CPPFLAGS = -D__x86__ -D__linux__ -D__OSVERSION__=2 INCDIR = -I$(PTHREAD_DIR)/include -I. -I$(OMNIDIR)/include -I$(TBDIR)/cg/include CORBA_LIB = -lomniORB2 -lomnithread -ltcpwrapGK -lpthread -L$(OMNIDIR)/lib/i586_linux_2.0_glibc -L$(PTHREAD_DIR)/lib -L$(TBDIR)/cg/lib CXX = g++ CXXFLAGS = -Wall -Wno-unused $(DEBUG) $(CORBA_CPPFLAGS) DEBUG = -g #DEBUG = COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $(INCDIR) -c CCOUT = -o CCIN = LNKOUT = -o LINK = $(CXX) OBJ = o EXE = OMNIIDL2 = $(OMNIDIR)/bin/i586_linux_2.0_glibc/omniidl2 endif ifeq ($(OSTYPE),solaris2.6) # Edit this variable to reflect the location of your installation OMNIDIR = /local/share/lib/omniORB_2.5.0 TBDIR = /opt/toolbox CORBA_CPPFLAGS = -DUsePthread -D_REENTRANT -D__sparc__ -D__sunos__ -D__OSVERSION__=5 INCDIR = -I. -I$(OMNIDIR)/include -I$(TBDIR)/cg/include CORBA_LIB = -lomniORB2 -lomnithread -lpthread -lposix4 -lsocket -lnsl -ltcpwrapGK -L. -L$(OMNIDIR)/lib/sun4_sosV_5.5 -L$(TBDIR)/cg/lib CXX = g++ CXXFLAGS = -Wall -Wno-unused $(DEBUG) $(CORBA_CPPFLAGS) #DEBUG = -g DEBUG = COMPILE.cc = $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) $(INCDIR) -c CCOUT = "-o " CCIN = LNKOUT = -o LINK = $(CXX) OBJ = o EXE = OMNIIDL2 = $(OMNIDIR)/bin/sun4_sosV_5.5/omniidl2 endif all:: buffer$(EXE) producer$(EXE) consumer$(EXE) clean: rm *.$(OBJ) buffer$(EXE) consumer$(EXE) rm *.hh *SK* ifeq ($(OSTYPE),win32) rm *.pdb *.ilk *.opt endif %.$(OBJ): %.cc $(COMPILE.cc) $(CCIN)$< buffer.$(OBJ): buffer.cc bufferSK.$(OBJ) bufferSK.cc: buffer.idl $(OMNIIDL2) -s SK.cc $< buffer$(EXE): buffer.$(OBJ) bufferSK.$(OBJ) $(CXX) $(LNKOUT)$@ $(CXXFLAGS) $+ $(CORBA_LIB) producer.$(OBJ): producer.cc producer$(EXE): producer.$(OBJ) bufferSK.$(OBJ) $(CXX) $(LNKOUT)$@ $(CXXFLAGS) $+ $(CORBA_LIB) consumer.$(OBJ): consumer.cc consumer$(EXE): consumer.$(OBJ) bufferSK.$(OBJ) $(CXX) $(LNKOUT)$@ $(CXXFLAGS) $+ $(CORBA_LIB) --------------C4213DF93B80E2AAEF4EF518-- From suzuki@wni.co.jp Thu Jan 21 10:52:00 1999 From: suzuki@wni.co.jp (Shinji Suzuki) Date: Thu, 21 Jan 1999 19:52:00 +0900 Subject: [omniORB] Condition varaibles - follow up... In-Reply-To: Your message of "Thu, 21 Jan 1999 11:16:24 +0100." <36A6FE78.ECE2C9E2@ifad.dk> Message-ID: <9901211052.AA21499@linus.wni.co.jp> Ole, You may not be using conidion vairable properly. Rather than doing BufferItem Buffer_i::GetItem() { while(!index){ // No items awailable. Wait on the condition varaible empty_buf: empty_buf.wait(); } mutex_region.lock(); BufferItem itm = TheBuffer[--index]; cout << "Returned item: " << itm << "\n" << flush; // Signal one of the possible waiting threads on PutItem() full_buf.signal(); mutex_region.unlock(); return itm; } you may have to do BufferItem Buffer_i::GetItem() { omni_mutex_lock l(omni_mutex_cond_mutex); // safer this way than m.lock() while( !index ) { // No items awailable. Wait on the condition varaible empty_buf: empty_buf.wait(); } BufferItem itm = TheBuffer[--index]; cout << "Returned item: " << item << "\n" << flush // Signal one of the possible waiting threads on PutItem() full_buf.signal(); return itm; } and apply similar changes elsewhere. -shinji From storm@ifad.dk Thu Jan 21 11:53:14 1999 From: storm@ifad.dk (Ole Storm) Date: Thu, 21 Jan 1999 12:53:14 +0100 Subject: [omniORB] Condition varaibles - follow up... References: <9901211052.AA21499@linus.wni.co.jp> Message-ID: <36A7152A.55A3AF6F@ifad.dk> Hi Shinji, Shinji Suzuki wrote: > (...) > you may have to do > > BufferItem > Buffer_i::GetItem() > { > omni_mutex_lock l(omni_mutex_cond_mutex); // safer this way than m.lock() > while( !index ) { > // No items awailable. Wait on the condition varaible empty_buf: > empty_buf.wait(); > } > BufferItem itm = TheBuffer[--index]; > cout << "Returned item: " << item << "\n" << flush > // Signal one of the possible waiting threads on PutItem() > full_buf.signal(); > return itm; > } > > and apply similar changes elsewhere. I agree that the omni_mutex_lock class is a better way to mutex-lock an _entire_ function, but I don't think that this has anything to do with the problems I experience on WinNT. The example works fine on Linux without using the omni_mutex_lock - remember. Actually, mutex-locking the entire GetItem() and PutItem() functions as proposed will result in a dead-lock at some point. If, for instance GetItem() is called on an empty buffer, the call will be set to wait in the call to empty_buf.wait(). But since GetItem() locks on the global mutex variable, PutItem() is never allowed to execute --> no items will be put into the buffer --> the thread waiting for new items will never be signalled --> dead-lock. This was the reason for calling mutext_region.lock() _after_ the while loop and not before it! Thanks anyway and best regards, Ole. --------------------------------------------------------------- Ole Storm The Institute of Applied Computer Science (IFAD) Forskerparken 10, DK-5230 Odense M, Denmark Phone: +45 6315 7134, Fax: +45 6593 2999, Email: storm@ifad.dk WWW: http://www.ifad.dk --------------------------------------------------------------- From S.Lo@orl.co.uk Thu Jan 21 12:25:04 1999 From: S.Lo@orl.co.uk (Sai-Lai Lo) Date: 21 Jan 1999 12:25:04 +0000 Subject: [omniORB] Condition varaibles - follow up... In-Reply-To: Ole Storm's message of "Thu, 21 Jan 1999 12:53:14 +0100" References: <9901211052.AA21499@linus.wni.co.jp> <36A7152A.55A3AF6F@ifad.dk> Message-ID: <3ovhi0izj3.fsf@neem.cam-orl.co.uk> Hi Ole, I think there is some misunderstanding on how to use conditional variable. In your code, you have never lock the mutex cond_mutex which is the mutex that you have initialised the conditional variables empty_buf and full_buf. Remember in your code, the conditional variables have to be initialised with a mutex as the ctor argument. When you use wait(), it is a pre-condition that the calling thread must hold the lock on the mutex with which the conditional variable is held. This is how the semantics of wait() is defined. (The wait operation may atomically **unlocks** the mutex and blocks the thread.) Have a look at omnithread.h for some explanation. For a tutorial on how to use conditional variables, I think the DEC SRC report no. 35 by Andrew Birrell "An Introduction to Programming with Threads" is the best. (http://www.research.digital.com/SRC/home.html) Sai-Lai -- Dr. Sai-Lai Lo | Research Scientist | E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab | 24a Trumpington Street Tel: +44 223 343000 | Cambridge CB2 1QA Fax: +44 223 313542 | ENGLAND From djr@orl.co.uk Thu Jan 21 12:24:40 1999 From: djr@orl.co.uk (David Riddoch) Date: Thu, 21 Jan 1999 12:24:40 +0000 (GMT) Subject: [omniORB] Condition varaibles - follow up... In-Reply-To: <36A7152A.55A3AF6F@ifad.dk> Message-ID: Ole, omni_condition::wait() implicity unlocks the mutex. In fact it is an error to call it if the calling thread does not already hold the mutex. If your implementation worked on Linux then that was luck. Have a read of http://www.orl.co.uk/omniORB/doc/omnithread/omnithread.html The section 'Synchronisation objects' explains omni_condition. The DEC SRC report 'An Introduction to Programming with Threads' (#35) is a very good introduction to this stuff, available at: http://gatekeeper.dec.com/pub/DEC/SRC/research-reports/ David On Thu, 21 Jan 1999, Ole Storm wrote: > I agree that the omni_mutex_lock class is a better way to mutex-lock an > _entire_ function, but I don't think that this has anything to do with the > problems I experience on WinNT. The example works fine on Linux without > using the omni_mutex_lock - remember. > > Actually, mutex-locking the entire GetItem() and PutItem() functions as > proposed will result in a dead-lock at some point. If, for instance > GetItem() is called on an empty buffer, the call will be set to wait in the > call to empty_buf.wait(). But since GetItem() locks on the global mutex > variable, PutItem() is never allowed to execute --> no items will be put > into the buffer --> the thread waiting for new items will never be signalled > --> dead-lock. > This was the reason for calling mutext_region.lock() _after_ the while loop > and not before it! > > > Thanks anyway and best regards, > > Ole. > > --------------------------------------------------------------- > Ole Storm > The Institute of Applied Computer Science (IFAD) > Forskerparken 10, DK-5230 Odense M, Denmark > Phone: +45 6315 7134, Fax: +45 6593 2999, Email: storm@ifad.dk > WWW: http://www.ifad.dk > --------------------------------------------------------------- > > From suzuki@wni.co.jp Thu Jan 21 12:34:03 1999 From: suzuki@wni.co.jp (Shinji Suzuki) Date: Thu, 21 Jan 1999 21:34:03 +0900 Subject: [omniORB] Condition varaibles - follow up... In-Reply-To: Your message of "Thu, 21 Jan 1999 12:53:14 +0100." <36A7152A.55A3AF6F@ifad.dk> Message-ID: <9901211234.AA21885@linus.wni.co.jp> Ole, Forgive me if I'm wrong, I think wait() will relinquishes the mutex acquired by omni_mutex_lock::omni_mutex_lock. With that said, sharing a mutex among multiple cond-var may not be something you are allowed to do. -shinji > Message-Id: <36A7152A.55A3AF6F@ifad.dk> > Date: Thu, 21 Jan 1999 12:53:14 +0100 > From: Ole Storm > Organization: IFAD > X-Mailer: Mozilla 4.5 [en] (WinNT; I) > X-Accept-Language: en > Mime-Version: 1.0 > To: Shinji Suzuki > Cc: "omniorb-list@orl.co.uk" > Subject: Re: [omniORB] Condition varaibles - follow up... > Content-Transfer-Encoding: 7bit > > Hi Shinji, > > Shinji Suzuki wrote: > > (...) > > you may have to do > > > > BufferItem > > Buffer_i::GetItem() > > { > > omni_mutex_lock l(omni_mutex_cond_mutex); // safer this way than m.lock() > > while( !index ) { > > // No items awailable. Wait on the condition varaible empty_buf: > > empty_buf.wait(); > > } > > BufferItem itm = TheBuffer[--index]; > > cout << "Returned item: " << item << "\n" << flush > > // Signal one of the possible waiting threads on PutItem() > > full_buf.signal(); > > return itm; > > } > > > > and apply similar changes elsewhere. > > I agree that the omni_mutex_lock class is a better way to mutex-lock an > _entire_ function, but I don't think that this has anything to do with the > problems I experience on WinNT. The example works fine on Linux without > using the omni_mutex_lock - remember. > > Actually, mutex-locking the entire GetItem() and PutItem() functions as > proposed will result in a dead-lock at some point. If, for instance > GetItem() is called on an empty buffer, the call will be set to wait in the > call to empty_buf.wait(). But since GetItem() locks on the global mutex > variable, PutItem() is never allowed to execute --> no items will be put > into the buffer --> the thread waiting for new items will never be signalled > --> dead-lock. > This was the reason for calling mutext_region.lock() _after_ the while loop > and not before it! > > > Thanks anyway and best regards, > > Ole. > > --------------------------------------------------------------- > Ole Storm > The Institute of Applied Computer Science (IFAD) > Forskerparken 10, DK-5230 Odense M, Denmark > Phone: +45 6315 7134, Fax: +45 6593 2999, Email: storm@ifad.dk > WWW: http://www.ifad.dk > --------------------------------------------------------------- > From djr@orl.co.uk Thu Jan 21 12:43:05 1999 From: djr@orl.co.uk (David Riddoch) Date: Thu, 21 Jan 1999 12:43:05 +0000 (GMT) Subject: [omniORB] Condition varaibles - follow up... In-Reply-To: <9901211234.AA21885@linus.wni.co.jp> Message-ID: On Thu, 21 Jan 1999, Shinji Suzuki wrote: > said, sharing a mutex among multiple cond-var may not be > something you are allowed to do. Thats ok - you can. From storm@ifad.dk Thu Jan 21 13:49:51 1999 From: storm@ifad.dk (Ole Storm) Date: Thu, 21 Jan 1999 14:49:51 +0100 Subject: [omniORB] Condition varaibles - follow up... References: <9901211052.AA21499@linus.wni.co.jp> <36A7152A.55A3AF6F@ifad.dk> <3ovhi0izj3.fsf@neem.cam-orl.co.uk> Message-ID: <36A7307F.721BC1E3@ifad.dk> Hi, Sai-Lai Lo wrote: > > Hi Ole, > > I think there is some misunderstanding on how to use conditional variable. > In your code, you have never lock the mutex cond_mutex which is the mutex > that you have initialised the conditional variables empty_buf and full_buf. > > Remember in your code, the conditional variables have to be initialised > with a mutex as the ctor argument. When you use wait(), it is a > pre-condition that the calling thread must hold the lock on the mutex with > which the conditional variable is held. This is how the semantics of wait() > is defined. (The wait operation may atomically **unlocks** the mutex and > blocks the thread.) Yes, you are right, I misunderstood the use of condition varaibles. My condition variables were initialized with a mutex all-right, but another mutex that the one used by the function doing the wait(). I was not aware that the condition varaible should actually be initialized with the mutex that is used in the synchronization. My problem is now solved! Thanks to everyone who responded, and my apollogies to Shinji - you vere right all the way!!! Best regards, Ole. From gdd0@gte.com Thu Jan 21 14:30:27 1999 From: gdd0@gte.com (Gary D. Duzan) Date: Thu, 21 Jan 1999 09:30:27 -0500 Subject: [omniORB] Condition varaibles - follow up... Message-ID: <199901211430.JAA41494@lion.gte.com> On a similar note, I believe the OmniEvents service as released has the same condition usage problem, which allows it to work on Linux but causes problems on other platforms. I have notified the code's owner and provided a patch for the locking as well as some AIX-specific fixes, which will hopefully be included in an upcoming release. Gary Duzan GTE Laboratories In Message <36A7307F.721BC1E3@ifad.dk> , Ole Storm wrote: =>Hi, => =>Sai-Lai Lo wrote: =>> =>> Hi Ole, =>> =>> I think there is some misunderstanding on how to use conditional variable. =>> In your code, you have never lock the mutex cond_mutex which is the mutex =>> that you have initialised the conditional variables empty_buf and full_buf. =>> =>> Remember in your code, the conditional variables have to be initialised =>> with a mutex as the ctor argument. When you use wait(), it is a =>> pre-condition that the calling thread must hold the lock on the mutex with =>> which the conditional variable is held. This is how the semantics of wait() =>> is defined. (The wait operation may atomically **unlocks** the mutex and =>> blocks the thread.) => =>Yes, you are right, I misunderstood the use of condition varaibles. My =>condition variables were initialized with a mutex all-right, but another =>mutex that the one used by the function doing the wait(). I was not aware =>that the condition varaible should actually be initialized with the mutex =>that is used in the synchronization. => =>My problem is now solved! Thanks to everyone who responded, and my =>apollogies to Shinji - you vere right all the way!!! => => =>Best regards, => => Ole. => From ayampolsky@erols.com Thu Jan 21 15:25:37 1999 From: ayampolsky@erols.com (Armen Yampolsky) Date: Thu, 21 Jan 1999 15:25:37 +0000 Subject: [omniORB] Re: Omniorb and Java References: <36A6AED4.908FD436@mocom.co.nz> Message-ID: <36A746F1.A225EFED@erols.com> You will need a java->idl compiler, and java libraries from other vendors. People (including myself) have been successful in using java ORBs with omniORB in varying degrees. I suggest you search through the list. Also, the omniORB web site has a good, albeit outdated page: http://www.orl.co.uk/omniORB/javaORBs.html which compares campatibility between the java ORBs and omni. I have had personal success with Sun's JDK1.2 libraries and omni. There are a few important issues, not the least of which is Sun's poor (non-)implementation of connection re-opening functionality. In using their ORB, if you are using a java client, you must turn off the idletimeoutperiod for both the omniORB server and the naming service. I would not use Sun's libraries for server-side code, I get a queasy feeling about it. Of course there are other vendors. ORBacus is said to be good. Commercial ORBs such as Visigenic's and Orbix's are said to be good as well. Good luck, -Armen Andrew King wrote: > Hi, > How do I go about using OmniOrb with Java objects?. > I understand (from looking at the documentation) that Omniorb only > provides an IDL to C++ generator. > If Java (or infact any language) can be used how much effort is > required. > > Please excuse my ignorance as I'm totally new to CORBA/OmniOrb etc. -- Armen Yampolsky Axiom Software Labs New York From nickr@harlequin.co.uk Thu Jan 21 15:43:49 1999 From: nickr@harlequin.co.uk (Nick Reeves) Date: Thu, 21 Jan 1999 15:43:49 GMT Subject: [omniORB] DII Message-ID: <199901211543.PAA03124@spot.cam.harlequin.co.uk> Last year there was a posting that a DII implementation was likely to be available soon, is there any further information on possible timescales. Ta ! -- Nick Reeves From djr@orl.co.uk Thu Jan 21 16:09:50 1999 From: djr@orl.co.uk (David Riddoch) Date: Thu, 21 Jan 1999 16:09:50 +0000 (GMT) Subject: [omniORB] omniORB 2.7.0 is released! Message-ID: Well it took a little longer than anticipated - but isn't that just always the way with software. I blame feature creep. Hope it works. Hope you enjoy it! David ******************************************************** ******* Free CORBA 2 ORB for C++ available now ******* ******************************************************** At last, another release of possibly the fastest CORBA 2 ORB available ... omniORB 2.7.0 Exciting new features in this release: o support for the Dynamic Invocation Interface (DII) and Dynamic Skeleton Interface (DSI) o new implementation of TypeCode and Any o new implementation of DynAny o improvements to stub code - the overhead per operation is dramatically reduced omniORB is copyright Olivetti & Oracle Research Laboratory. It is free software. The programs in omniORB2 are distributed under the GNU General Public Licence as published by the Free Software Foundation. The libraries in omniORB2 are distributed under the GNU Library General Public Licence. Source code and binary distributions are available from our Web pages: http://www.orl.co.uk/omniORB/omniORB.html Technical Highlights ==================== omniORB2 implements specification 2.0 of the Common Object Request Broker Architecture (CORBA). - C++ language bindings are supported. The mapping conforms to the revision 2.0 of the CORBA specification. - The Internet Inter-ORB Protocol (IIOP) is used as the native protocol. - The omniORB2 runtime is fully multithreaded. It uses native platform thread support encapsulated with a small class library, omnithread, to abstract away from differences in native thread APIs. - `Typecode' and the type `Any' are supported. - The Dynamic Invocation and Dynamic Skeleton interfaces are supported. - DynAny (CORBA 2.2) is supported. - A COS Naming Service, omniNames, is provided. - The following platforms are supported: o Solaris 2.5 / Sun SparcCompiler C++ version 4.2 o Solaris 2.6/ Sun SparcCompiler C++ version 4.2 o Digital Unix 3.2 / DEC C++ compiler version 5.5 o Digital Unix 4.0D/ DEC C++ compiler version 6.0 o x86 Linux 2.0 / GNU C++ compiler version 2.7.2 / Linuxthreads 0.5 o x86 Linux 2.0 /egcs-1.1b/binutils-2.9.1.0.14/GNU Libc version 2 o x86 Windows NT / Windows 95 / Visual C++ version 5.0 o Alpha NT / Visual C++ version 5.0 Ports to the following platforms are available. These ports are done by external contributors and have been integrated into the source tree. For these platforms, no pre-compiled binary is available. o IBM AIX 4.2/ IBM C Set++ 3.1.4 o HPUX 10.20/ aC++ (B3910 A.01.04) o OpenVMS Alpha 6.2/ DEC C++ compiler 5.5 (UCX 4.1 ECO 8) o OpenVMS Vax 6.1/ DEC C++ compiler 5.5 (UCX 4.0 ECO 1) o NextStep 3.3/ gcc-2.7.2 o Reliant Unix 5.43/CDS++ o SCO OpenServer 5/g++ o Phar Lap's Real Time ETS Kernel o SGI Irix 6.x/SGI C++ compiler 7.2 The ports to Mac OS is known to exist. However, the ports have not been merged into the source tree yet. It should be straightforward to port omniORB2 to any platform which supports POSIX style threads, BSD style sockets and has a decent C++ compiler which supports exceptions. - It has been tested for interoperability via IIOP with other ORBs, such as Iona Orbix 2.2 MT, Iona OrbixWeb 2.0.1, Visigenic Visibroker for C++, and HP ORB Plus 2.5. Work in progress ================ omniORB2 is not yet a complete implementation of the CORBA 2.2 core. The following features are not supported in the current release. Support for these features will be included shortly in a future release of omniORB2. - The Portable Object Adapter (POA) is not supported - GIOP 1.1 is not supported. Missing features ================ The following features are missing from omniORB2. We are not currently planning on adding support for these features. - The BOA only supports the persistent server activation policy. Other dynamic activation and deactivation polices are not supported. - omniORB2 does not has its own Interface Repository. From ayampolsky@erols.com Thu Jan 21 16:58:23 1999 From: ayampolsky@erols.com (Armen Yampolsky) Date: Thu, 21 Jan 1999 16:58:23 +0000 Subject: [omniORB] Re: Omniorb and Java References: Message-ID: <36A75CAF.6A4AE0B7@erols.com> This is a multi-part message in MIME format. --------------8F3454A18961122B7C754851 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit You need to change it in two places. First, in your server, write omniORB::idleConnectionScanPeriod(omniORB::idleIncoming, 0); //0 turns timeout off Next, if you are using omniNames, you must alter the source code to do the same thing. I am attaching our modification to omniNames.cc which allows you to call it with an additional argument: '-ORBinConScanPeriod '. ORL said they will add the args: -ORBinConScanPeriod -ORBoutConScanPeriod in the next release. Anyway, you must set that (the incoming) to 0. Let's hope Sun gets on the ball and fixes this! Cheers, -Armen Michael Quigley wrote: > On Thu, 21 Jan 1999, Armen Yampolsky wrote: > > > I have had personal success with Sun's JDK1.2 libraries and omni. There > > are a few important issues, not the least of which is Sun's poor > > (non-)implementation of connection re-opening functionality. In using > > their ORB, if you are using a java client, you must turn off the > > idletimeoutperiod for both the omniORB server and the naming service. I > > would not use Sun's libraries for server-side code, I get a queasy feeling > > about it. > > I'm starting a project using JDK1.2 and omniORB. I'm having that same > problem with connection re-opening.. I'm not quite sure where to change > the idletimeoutperiod within omniORB.. Any pointers would be appreciated.. > > Thanks, > Michael > > ---- > Michael F. Quigley, Jr. > Chief Technology Officer > Going Virtual, L.L.C. > Matthews, NC -- Armen Yampolsky Axiom Software Labs New York --------------8F3454A18961122B7C754851 Content-Type: text/plain; charset=us-ascii; name="omniNames.cc" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="omniNames.cc" // -*- Mode: C++; -*- // Package : omniNames // omniNames.cc Author : Tristan Richardson (tjr) // // Copyright (C) 1997 Olivetti & Oracle Research Laboratory // // This file is part of omniNames. // // omniNames is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, // USA. // #include #include #include #include #include #include #include #include #include #ifdef __WIN32__ #include #else #include #endif // Minimum idle period before we take a checkpoint (15 mins) #define DEFAULT_IDLE_TIME_BTW_CHKPT (15*60) void usage() { cerr << "\nusage: omniNames [-start ]\n" << " [-logdir ]\n" << " [-errlog ]\n" /***** patch *****/ << " [-ORBinConScanPeriod ]\n" /***** end of patch *****/ << " [...]" << endl; cerr << "\nUse -start option to start omniNames for the first time." << endl; cerr << "\nUse -logdir option to specify the directory where the log/data files are kept.\n"; cerr << "\nUse -errlog option to specify where standard error output is redirected.\n"; cerr << "\nYou can also set the environment variable " << LOGDIR_ENV_VAR << " to specify the\ndirectory where the log/data files are kept.\n" << endl; exit(1); } static void removeArgs(int& argc, char** argv, int idx, int nargs) { if ((idx+nargs) > argc) return; for (int i = idx+nargs; i < argc; i++) { argv[i-nargs] = argv[i]; } argc -= nargs; } static void insertArgs(int& argc, char**& argv, int idx, int nargs) { char** newArgv = new char*[argc+nargs]; int i; for (i = 0; i < idx; i++) { newArgv[i] = argv[i]; } for (i = idx; i < argc; i++) { newArgv[i+nargs] = argv[i]; } argv = newArgv; argc += nargs; } // // main // int main(int argc, char **argv) { // // If we have a "-start" option, get the given port number. // int port = 0; char* logdir = 0; /***** patch *****/ int idletimeout = 0; /***** end of patch *****/ while (argc > 1) { if (strcmp(argv[1], "-start") == 0) { if (argc < 3) usage(); port = atoi(argv[2]); removeArgs(argc, argv, 1, 2); } else if (strcmp(argv[1], "-logdir") == 0) { if (argc < 3) usage(); logdir = argv[2]; removeArgs(argc, argv, 1, 2); } /***** patch *****/ else if (strcmp(argv[1], "-ORBinConScanPeriod") == 0) { if (argc < 3) usage(); idletimeout = atoi(argv[2]); removeArgs(argc, argv, 1, 2); } /***** end of patch *****/ else if (strcmp(argv[1], "-errlog") == 0) { if (argc < 3) usage(); #ifdef __WIN32__ int fd = _open(argv[2], O_WRONLY | O_CREAT | O_TRUNC, _S_IWRITE); if (fd < 0 || _dup2(fd,2)) { #else int fd = open(argv[2], O_WRONLY | O_CREAT | O_TRUNC | O_SYNC, 0666); if (fd < 0 || dup2(fd,2) < 0) { #endif cerr << "Cannot open error log file: " << argv[2] << endl; usage(); } removeArgs(argc, argv, 1, 2); } else if ((strncmp(argv[1], "-BOA", 4) != 0) && (strncmp(argv[1], "-ORB", 4) != 0)) { usage(); } else { break; } } // // Set up an instance of class log. This also gives us back the port // number from the log file if "-start" wasn't specified. // log l(port,logdir); // // Add a fake command line option to tell the BOA which port to use. // insertArgs(argc, argv, 1, 2); argv[1] = strdup("-BOAiiop_port"); argv[2] = new char[16]; sprintf(argv[2], "%d", port); /***** patch *****/ omniORB::idleConnectionScanPeriod(omniORB::idleIncoming, (CORBA::ULong)idletimeout); omniORB::idleConnectionScanPeriod(omniORB::idleOutgoing, (CORBA::ULong)idletimeout); /***** end of patch *****/ // // Initialize the ORB and the object adaptor. // CORBA::ORB_ptr orb = CORBA::ORB_init(argc,argv,"omniORB2"); CORBA::BOA_ptr boa = orb->BOA_init(argc,argv,"omniORB2_BOA"); boa->impl_is_ready(0,1); // // Read the log file and set up all the naming contexts described in it. // l.init(orb, boa); // // Now this thread has nothing much to do. Simply take a checkpoint once // every so often. // int idle_time_btw_chkpt; char *itbc = getenv("OMNINAMES_ITBC"); if (itbc == NULL || sscanf(itbc,"%d",&idle_time_btw_chkpt) != 1) idle_time_btw_chkpt = DEFAULT_IDLE_TIME_BTW_CHKPT; omni_mutex m; omni_condition c(&m); m.lock(); while (1) { l.checkpoint(); unsigned long s, n; omni_thread::get_time(&s, &n, idle_time_btw_chkpt); c.timedwait(s,n); } m.unlock(); return 0; } --------------8F3454A18961122B7C754851-- From renzo.tomaselli@eclipse-net.it Fri Jan 22 09:16:36 1999 From: renzo.tomaselli@eclipse-net.it (Renzo Tomaselli) Date: Fri, 22 Jan 1999 10:16:36 +0100 Subject: [omniORB] outScavenger kill Message-ID: <01bb01be45e9$2bd49080$11fc46c1@big> This is a multi-part message in MIME format. ------=_NextPart_000_01AD_01BE45F0.4B0021C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, we experienced a problem with Visual Basic managing an OCX which = links to an OmniORB related implementation. When switching from design = mode to run mode and the contrary, Visual Basic crashes because DLLs are = unloaded from memory, while the outScavenger thread is still alive. When = the timer wakes it up, there is no loaded code to run and everything = blows up. We cannot understand how VB unloads depending modules while active = threads are still alive (it doesn't happen with VC). Anyway, the problem is that killOutScavenger is never called from = OmniORB code; also there is no explicit ORB shutdown to call when all = things are going to die. >From the BOA point of view there are impl_is_ready/impl_shutdown entry = points which do the correct job for inScavenger, so everythings works = fine there. What about explicitely calling killOutScavenger from a key application = destructor when things go down ? Thanks, Renzo = Tomaselli =20 -------------------------------------------------------------------------= -- TecnoTP s.n.c. Special Information System Design Maso Pelauchi I38050 Ronchi Valsugana, Trento TN ITALY Tel. +39 0461 773164 Fax. +39 0461 771514 e-mail: renzo.tomaselli@eclipse-net.it =20 -------------------------------------------------------------------------= -- ------=_NextPart_000_01AD_01BE45F0.4B0021C0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
    we experienced a = problem with=20 Visual Basic managing an OCX which links to an OmniORB related = implementation.=20 When switching from design mode to run mode and the contrary, Visual = Basic=20 crashes because DLLs are unloaded from memory, while the outScavenger = thread is=20 still alive. When the timer wakes it up, there is no loaded code to run = and=20 everything blows up.
We cannot = understand how VB=20 unloads depending modules while active threads are still alive (it = doesn't=20 happen with VC).
Anyway, the problem is that killOutScavenger is = never called=20 from OmniORB code; also there is no explicit ORB shutdown to call when = all=20 things are going to die.
From the BOA point of view there are=20 impl_is_ready/impl_shutdown entry points which do the correct job for=20 inScavenger, so everythings works fine there.
What about explicitely calling killOutScavenger from = a key=20 application destructor when things go down ?
Thanks,
          &nbs= p;            = ;            =             &= nbsp;           &n= bsp;  =20 Renzo Tomaselli     =20
---------------------------------------------------------------------= ------
TecnoTP=20 s.n.c. Special Information System Design
Maso Pelauchi I38050 Ronchi=20 Valsugana,  Trento TN  ITALY
Tel. +39 0461=20 773164      Fax. +39 0461 771514
e-mail: renzo.tomaselli@eclipse-ne= t.it  =20
---------------------------------------------------------------------= ------
------=_NextPart_000_01AD_01BE45F0.4B0021C0-- From Martin.Renner@pp-ulm.de Fri Jan 22 09:25:46 1999 From: Martin.Renner@pp-ulm.de (Martin Renner) Date: Fri, 22 Jan 1999 10:25:46 +0100 Subject: [omniORB] omniORB 2.7.0 is released! In-Reply-To: Message-ID: <4.1.19990122101053.00a2e8d0@email> Hi. I just tried to switch from 2.6.1 to 2.7.0 (Windows NT 4.0, MSVC 5.0). Now, I get a warning message for each of my object implementations: omniORB2\include\omniORB2/bufferedStream.h(621) : warning C4800: 'unsigned char' : variable is getting set to a boolean value ('true' or 'false') bufferedStream.h looks like that: 616: inline _CORBA_Char byteOrder() const { 617: return pd_byte_order; 618: } 619: 620: inline void byteOrder(_CORBA_Char b) { 621: pd_byte_order = b; 622: } 692: _CORBA_Boolean pd_byte_order; "_CORBA_Char vs. _CORBA_Boolean" (or "unsigned char" vs. "bool" on my platform). Martin From b.keeping@ic.ac.uk Fri Jan 22 14:47:30 1999 From: b.keeping@ic.ac.uk (b.keeping@ic.ac.uk) Date: Fri, 22 Jan 1999 14:47:30 GMT Subject: [omniORB] Idea on in-process execution Message-ID: <3089.199901221447@ultra11.ps.ic.ac.uk> Hi fellow omniORBers, Although we're probably all busy trying out 2.7.0, I'd like to share some ideas I've been trying out - and perhaps get some better ones in return! I am interested in making alternative implementations of Corba objects available in-process at runtime. The mechanism I'm using for this dynamic loading of shared objects. I have built an example based on "eg1", the simplest in-process example provided with OmniORB. My main program eg1load.cc is as follows: ---------------------------------------------------------------------- // eg1load.cc - This a shared object version by Ben Keeping // of example 1 used in Chapter 2 // "The Basics" of the omniORB2 user guide. // // In this example, both the object implementation and the // client are in the same process. // // Usage: eg1 // #include #include #include "echo.hh" #include "greeting.cc" typedef CORBA::Object_var (*omserver) (CORBA::ORB_ptr orb,CORBA::BOA_ptr boa); int main(int argc, char **argv) { CORBA::ORB_ptr orb = CORBA::ORB_init(argc,argv,"omniORB2"); CORBA::BOA_ptr boa = orb->BOA_init(argc,argv,"omniORB2_BOA"); //load shared object implementing echo. void* temp=dlopen("./echo.so", RTLD_LAZY); if (!temp) { cerr<< dlerror(); // exit(1); }; //Get a handle to the shared objects "init" routine, and call it. omserver echoinit=(omserver) dlsym(temp,"init"); CORBA::Object_var obj=(*echoinit)(orb,boa); // It returns an object reference for our echo object. // In a real application this would usually be a factory object. Echo_ptr myobjRef = Echo::_narrow(obj); // Obtain an object reference. // Note: always use _this() to obtain an object reference from the // object implementation. hello(myobjRef); CORBA::release(myobjRef); // Dispose of the object reference. return 0; } ---------------------------------------------------------------------- The shared object echo.so is created by compiling echoso.cc which follows: ---------------------------------------------------------------------- // Shared object server code extracted from the eg1 example by // Ben Keeping #include "echo_i.cc" // init routine which the client will call, passing its orb and boa // and getting back an object reference. extern "C" CORBA::Object_var init(CORBA::ORB_ptr orb,CORBA::BOA_ptr boa) { // Create the object. Echo_i *echo = new Echo_i(); echo->_obj_is_ready(boa); // Start the server: note - uses the nonblocking OmniORB version. // Without this we would need to do our own multithreading. boa->impl_is_ready(0,1); return echo; } ---------------------------------------------------------------------- greeting.cc and echo_i.cc are unchanged from those in the example directory. Some changes were made to the dir.mk file to build the executable eg1load and the shared object echo.so. "eg1load" and "echoso" were added to the `all' list, and rules for shared object compilation and linking added. The IRIX version of these is: CXXDEBUGFLAGS = -g -mips4 -KPIC CXXSOLINKOPTIONS = -shared -n32 -mips4 -KPIC define CXXSharedObj (set -x; \ $(RM) $@; \ $(CXX) -o $@ $(CXXSOLINKOPTIONS) $(IMPORT_LIBRARY_FLAGS) \ $(filter-out $(LibSuffixPattern),$^) $$libs; \ ) endef The rule for building echoso is then: $(echoso): echoso.o $(CORBA_STUB_OBJS) $(CORBA_LIB_DEPEND) @(libs="$(CORBA_LIB)"; $(CXXSharedObj)) the "client", eg1load, is built just by compiling eg1load.cc given above: $(eg1load): eg1load.o $(CORBA_STUB_OBJS) $(CORBA_LIB_DEPEND) @(libs="$(CORBA_LIB)"; $(CXXExecutable)) The idea of all this is that if I have two alternative implementations of "echo", I can specify at runtime which one I want to use. The argument to dlopen doesn't have to be a literal string of course! For the type of application I am interested in, it is important for the objects to be defined in-process because I anticipate large, frequent interactions. I have used this mechanism successfully on Solaris and SGI implementations. But I would like to know if there are better/different ways of achieving the same thing? Note: for Windows users, LoadLibrary and GetProcAddress can be used instead of dlopen and dlsym. Ben Keeping Imperial College From Fabien.Azavant@enst.fr Fri Jan 22 16:27:11 1999 From: Fabien.Azavant@enst.fr (Fabien Azavant) Date: Fri, 22 Jan 1999 17:27:11 +0100 Subject: [omniORB] omniORB2 and ADA95 Message-ID: <36A8A6DF.FC437834@enst.fr> Hello, we are a group of students about to program an IDL compiler for ADA95 on top of omniORB2, under GNU licence. If anyone has comments, questions, or things you would like to tell us, that would help us in this project, feel free to reply. Fabien Azavant http://www.enst.fr/~azavant From Oliver.Kellogg@vs.dasa.de Fri Jan 22 18:06:23 1999 From: Oliver.Kellogg@vs.dasa.de (Oliver M. Kellogg) Date: Fri, 22 Jan 1999 19:06:23 +0100 Subject: [omniORB] omniORB2 and ADA95 Message-ID: <9901221803.AA31558@gatekeeper.vs.dasa.de> Fabien Azavant wrote: > we are a group of students about to program an IDL compiler for ADA95 on > top of > omniORB2, under GNU licence. If anyone has comments, questions, or > things you would like to tell us, > that would help us in this project, feel free to reply. > I looked into this, but got shyed off by the copious use of multiple inheritance in OmniORB. Not so great for mapping to Ada... apart from the fact that GNAT-3.11 still has problems with the C++ interfacing (I am in touch with ACT for clearing these up) -- Oliver From vanco@sonic.net Sat Jan 23 06:25:56 1999 From: vanco@sonic.net (Aaron Van Couwenberghe) Date: Fri, 22 Jan 1999 22:25:56 -0800 Subject: [omniORB] 2.7.0 question: IOP::TaggedProfile multiple defs. Message-ID: <19990122222556.A16367@spire.ddns.org> Quick question. I just got and built omniorb 2.7.0 (also added a few random lc mods from duncan -- this doesn't affect what this post is about though) for use with the Berlin project. Just had one problem. our 115k of idl worked fine with >=3D 2.6.0; seems to here as well. however upon linking the SK.o/DynSK.o files into the usual shared library, I recieve this error: glyphSK.o: In function OP::TaggedProfile::NP_alignedSize(unsigned int)': /usr/local/include/omniORB2/IOP.h:64: multiple definition of =07lobal constructors keyed to _CORBA_Unbounded_Sequence::NP_alignedSize(unsigned int) const' unicharSK.o:/usr/local/include/omniORB2/IOP.h:64: first defined here collect2: ld returned 1 exit status Anybody ever encountered this before? Any known method to fix it? I also went back over my files to make sure I hadn't left any dangling extras in there. --=20 =2E.Aaron Van Couwenberghe... ..vanco@sonic.net.. ..aaronv@debian.org.... Berlin: http://www.berlin-consortium.org Debian GNU/Linux: http://www.debian.org Nullum magnum ingenium sine mixtura dementiae fuit. -- Seneca From paul.nader@auss1.alcatel.com.au Mon Jan 25 06:20:39 1999 From: paul.nader@auss1.alcatel.com.au (Paul Nader) Date: Mon, 25 Jan 1999 17:20:39 +1100 Subject: [omniORB] Re: Porting omniEvents to NT? References: <3694C54E.F4F44E62@oce.nl> Message-ID: <99Jan25.171157est.40324@border.alcanet.com.au> Hi Casper, My appologies if I haven't replied to your mail (I honestly can't remember and my mail filters have been playing up lately). The short answer is 'try it'. It shouln't be very difficult because omniORB already runs on NT. All you have to do is get an implementation of the STL (which Visual C++ probably already has) and compile the code. If you have any specific problems let me know and I'll lend a hand. Again, sorry for the late reply... Paul. Casper Stoel wrote: > As will be clear from the subject, who has ported Paul Nader's > omniEvents to NT? I am no porting wizard and could use some help in this > task... > Any pointers are welcome! > > Casper Stoel -- Paul Nader mailto:Paul.Nader@alcatel.com.au Principal Engineer PH: (61.2) 9690 5421 Network Integration Division FX: (61.2) 9690 5225 Alcatel Telecom, Australia 280 Botany Rd, Alexandria, Sydney From bednarz@smartsol.ch Mon Jan 25 11:09:56 1999 From: bednarz@smartsol.ch (Thomas Bednarz) Date: Mon, 25 Jan 1999 12:09:56 +0100 Subject: [omniORB] Beginner question connection management Message-ID: Hello, I am new to CORBA and OmniORB, so please forgive my stupid questions. However I have some experience in writing RPC applications and I am currently starting porting them to CORBA. As with my RPC apps I don't like to use any naming services, since every client knows to which server he needs to talk. The thing is that all Servers are Win32 services but can be a client or server at the same time (in different threads inside the service). Additionally some web clients (JAVA applets or servlets) may also call these Servers. I have read chapter 7 regarding the connection management, but still a lot of things remain unclear to me. The problem is, that most of my objects need to be created dynamically, since they represent some OS and machine specific operations. As I understand it, I need to implement a factory interface which then creates, registers and afterwards destroys my objects dynamically on client requests. Is it correct, that this factory object needs to be registered with BOA when my server starts? How do I obtain a reference to this object from a different machine WITHOUT using the naming service? Do I need to specify -ORBInitialHost and -ORBInitialPort on the CLIENT and pass the name of the server? In chapter 4.6 I read that since version 2.6 a bootstrap service is provided. From reading this I guess this would be a good thing for me to use. Is it correct that on Solaris I have to provide a cfg file and on NT I have to key in the data into the registry. Can't I use a cfg file on ALL platforms? Where must I place this cfg file? I would greatly appreciate any help that could bring me a few steps further. Thank you! Thomas --------------------------------------- SMART Solutions AG Software Engineering & Consulting PO Box Oberwiesenstrasse 5 CH-8304 Wallisellen / Switzerland Phone: +41 1 877 72 72 FAX: +41 1 883 16 79 Web: www.smartsol.ch --------------------------------------- From Byrne_Matt@videojet.com Mon Jan 25 14:16:00 1999 From: Byrne_Matt@videojet.com (Byrne_Matt) Date: Mon, 25 Jan 1999 08:16:00 -0600 Subject: [omniORB] omniORB 2.7.0 is released! Message-ID: Hi. I just tried to switch from 2.6.1 to 2.7.0 (Windows NT 4.0, MSVC 5.0). Now, I get a exception when accessing a MemBufferedStream. A sample of my code is below. Has anyone else run into this problem? Datum& a_datum; MemBufferedStream buffer((_CORBA_Char *)a_datum.m_dptr); unsigned long len; len <<= buffer; //I receive an exception here The constructor for MemBufferedStream was changed from 2.6.1 to 2.7.0. I believe there is a bug here but I am not familiar enough with the code to be sure. Can someone help me out? Thanks Matt From rw@neurotec.de Mon Jan 25 16:01:00 1999 From: rw@neurotec.de (Ralf Walther) Date: Mon, 25 Jan 99 16:01:00 GMT Subject: [omniORB] How to spawn savely new Servers from a o Message-ID: <36AC9578@mailgateway.neurotec.de> Hi CORBAholics! I have implemented an omniOrb server, which has a special method to spawn a new server process. At first it forks and then replaces via execl the execution code of the new process. The father process has opened a pipe to communicate with the child process; the new server stringifies its IOR and returns it to the father process. Unfortunatly we run into trouble, because open file descriptors of the orb have been copied, too. In the archive, I've found an article about this topic, but it wasn't able to answer my questions ... (http://www.orl.co.uk:80/omniORB/archives/1998-04/0110.html) HOW TO spawn savely a new CORBA server within a servers method ??? Why isn't it enough to act like this? - fork server process - child process calls setsid() to change the father process id to 1 (init) - close fds (But which? All but 0,1,2 ?) - execl Thanks in advance Ralf From Mark.Spiteri@cl.cam.ac.uk Mon Jan 25 15:18:37 1999 From: Mark.Spiteri@cl.cam.ac.uk (Mark David Spiteri) Date: Mon, 25 Jan 1999 15:18:37 +0000 Subject: [omniORB] OmniOrb 2.7 / Linux glibc / libstgc++ 2.9 Message-ID: Hi, I've downloaded and installed omniorb 2.7 on Redhat 5.2 and got the complaint regarding lack of libstdc++ 2.9. So I downloaded the relevant 2.9 rpm from redhat's contrib ftp server but now I get the following omniORB/bin/i586_linux_2.0_glibc/omniNames: error in loading shared libraries /usr/lib/libstdc++.so.2.9: undefined symbol: __register_frame_info I can only assume I have not quite got the same version as omniOrb is compiled against. Any pointers as to the exact version this is supposed to be? Thanks. Mark From ayampolsky@erols.com Mon Jan 25 16:04:53 1999 From: ayampolsky@erols.com (Armen Yampolsky) Date: Mon, 25 Jan 1999 16:04:53 +0000 Subject: [omniORB] Re: OmniOrb 2.7 / Linux glibc / libstgc++ 2.9 References: Message-ID: <36AC9625.8A31EABA@erols.com> Mark, I had some trouble getting the newest egcs and all dependent packages onto my system through rpm, so I am using "old" versions. The following work fine on my system (RedHat 5.1) with the latest omniORB: libstdc++-2.8.0-8 egcs-1.0.2-8 gcc-2.7.2.3-11 glibc-2.0.7-13 Good luck, -Armen Mark David Spiteri wrote: > Hi, I've downloaded and installed omniorb 2.7 on Redhat 5.2 and got the > complaint regarding lack of libstdc++ 2.9. So I downloaded the relevant 2.9 > rpm from redhat's contrib ftp server but now I get the following > > omniORB/bin/i586_linux_2.0_glibc/omniNames: error in loading shared libraries > /usr/lib/libstdc++.so.2.9: undefined symbol: __register_frame_info > > I can only assume I have not quite got the same version as omniOrb is compiled > against. Any pointers as to the exact version this is supposed to be? Thanks -- Armen Yampolsky Axiom Software Labs New York From Fabien.Azavant@enst.fr Mon Jan 25 18:16:08 1999 From: Fabien.Azavant@enst.fr (Fabien Azavant) Date: Mon, 25 Jan 1999 19:16:08 +0100 Subject: [omniORB] OmniOrb 2.7 / Linux glibc / libstgc++ 2.9 References: Message-ID: <36ACB4E8.9E3D277A@enst.fr> Hello, I encountered a similar problem with Redhat 5.1 I just put a symbolic link from libstdc++ 2.9 to libstdc++ 2.8 It seems to work fine, but if someone can tell me where I can download a libstdc++ 2.9 for redhat, I'm interested. Thanks. Fabien Azavant Mark David Spiteri wrote: > Hi, I've downloaded and installed omniorb 2.7 on Redhat 5.2 and got the > complaint regarding lack of libstdc++ 2.9. So I downloaded the relevant 2.9 > rpm from redhat's contrib ftp server but now I get the following > > omniORB/bin/i586_linux_2.0_glibc/omniNames: error in loading shared libraries > /usr/lib/libstdc++.so.2.9: undefined symbol: __register_frame_info > > I can only assume I have not quite got the same version as omniOrb is compiled > against. Any pointers as to the exact version this is supposed to be? Thanks. > > Mark From bjornw@fairplay.no Mon Jan 25 18:58:35 1999 From: bjornw@fairplay.no (bjornw@fairplay.no) Date: 25 Jan 1999 19:58:35 +0100 Subject: [omniORB] OmniOrb 2.7 / Linux glibc / libstgc++ 2.9 In-Reply-To: Fabien Azavant's message of "Mon, 25 Jan 1999 19:16:08 +0100" References: <36ACB4E8.9E3D277A@enst.fr> Message-ID: Fabien Azavant writes: I'm running binutils-2.9.1.0.19 together with egcs-1.1.1 and omniORB works like a charm. Get binutil-2.9.1.0.19 from the maintainer if you can't find it anywhere else: ftp://ftp.yggdrasil.com/private/hjl/ get egcs-1.1.1 from egcs.cygnus.com Compile and install! I experienced a problem with a rpm called binutils-2.9.1.0.19-2.rpm, which worked very well with /usr/bin/gcc (2.7.2) but didn't work at all with egcs-1.1.1, so to be 100% sure, compile and install by yourself. (And btw, you should grab the kernel of 2.0.36 which has some thread-patches for omniorb to work properly.) > Hello, > > I encountered a similar problem with Redhat 5.1 > I just put a symbolic link from libstdc++ 2.9 to libstdc++ 2.8 > It seems to work fine, > but if someone can tell me where I can download a libstdc++ 2.9 for redhat, > I'm interested. Thanks. > > Fabien Azavant > > Mark David Spiteri wrote: > > > Hi, I've downloaded and installed omniorb 2.7 on Redhat 5.2 and got the > > complaint regarding lack of libstdc++ 2.9. So I downloaded the relevant 2.9 > > rpm from redhat's contrib ftp server but now I get the following > > > > omniORB/bin/i586_linux_2.0_glibc/omniNames: error in loading shared libraries > > /usr/lib/libstdc++.so.2.9: undefined symbol: __register_frame_info > > > > I can only assume I have not quite got the same version as omniOrb is compiled > > against. Any pointers as to the exact version this is supposed to be? Thanks. > > > > Mark From Martin.Renner@pp-ulm.de Tue Jan 26 06:59:25 1999 From: Martin.Renner@pp-ulm.de (Martin Renner) Date: Tue, 26 Jan 1999 07:59:25 +0100 Subject: [omniORB] omniORB 2.7.0 is released! In-Reply-To: <4.1.19990122101053.00a2e8d0@email> References: Message-ID: <4.1.19990126074914.00a24040@email> Hi. >omniORB2\include\omniORB2/bufferedStream.h(621) : warning C4800: [...] >620: inline void byteOrder(_CORBA_Char b) { >621: pd_byte_order = b; >622: } > >692: _CORBA_Boolean pd_byte_order; Noone of the programmers wants to give a statement about that? I think that one should change the implementation of "byteOrder". Either _CORBA_Boolean or _CORBA_Char, but not both mixed up.... or am I wrong? I want to compile my applications without any warning messages from the compiler. But "bufferedStream" causes a warning in each skeleton file. Martin From aaron98602@aol.com Tue Jan 26 08:49:08 1999 From: aaron98602@aol.com (aaron98602@aol.com) Date: Tue, 26 Jan 1999 08:49:08 +0000 Subject: [omniORB] question. Message-ID: INTERNATIONAL DRIVER'S LICENSE Need a new driver's license? Too many points or other trouble? Want a license that can never be suspended or revoked? Want ID for nightclubs or hotel check-in? Avoid tickets, fines, and mandatory driver's education. Protect your privacy, and hide your identity. The United Nations gave you the privilege to drive freely throughout the world! (Convention on International Road Traffic of September 19, 1949 & World Court Decision, The Hague, Netherlands, January 21, 1958) Take advantage of your rights. Order a valid International Driver's License that can never be suspended or revoked. Confidentiality assured. CALL NOW!!! 1-937-586-9313 From rw@neurotec.de Tue Jan 26 12:01:00 1999 From: rw@neurotec.de (Ralf Walther) Date: Tue, 26 Jan 99 12:01:00 GMT Subject: [omniORB] spawn a server from a server part 2 Message-ID: <36ADAEB5@mailgateway.neurotec.de> Hi CORBAholics, again on the topic of spawning a new omniORB server from another omniORB server. As I've mentioned in my last request, I think I have to close all omniORB specific file descriptors (fds) after the fork call and BEFORE the exec call. That's ok, because after the exec a new server initializes the omniORB resources and this could raise problems. (I think this could be done via setting the close-on-exec flag of every fd, which was opened from the orb). BUT, what about the time span between the fork and the closing of the fds? Is it possible or not, that after the fork, two threads read concurrently from a fd? If yes, it's in principle possible, that a thread in the child process reads some data from a fd and the parent waits for them ... and wait ...! The data would be lost after the exec. Is this true? Are there any mechanisms in omniORB to block all threads for this very little time, so I've time to close the fds? What is the general way to spawn a new omniORB server process from another server process ?????? I would be very pleased, if anybody could tell me some hints on this topic. Thanks in advance Ralf ----------------------- rw@neurotec.de From S.Lo@orl.co.uk Tue Jan 26 13:18:02 1999 From: S.Lo@orl.co.uk (Sai-Lai Lo) Date: 26 Jan 1999 13:18:02 +0000 Subject: [omniORB] OmniOrb 2.7 / Linux glibc / libstgc++ 2.9 In-Reply-To: Fabien Azavant's message of "Mon, 25 Jan 1999 19:16:08 +0100" References: <36ACB4E8.9E3D277A@enst.fr> Message-ID: <3oaez6w4tx.fsf@neem.cam-orl.co.uk> >>>>> Fabien Azavant writes: > I encountered a similar problem with Redhat 5.1 I just put a symbolic > link from libstdc++ 2.9 to libstdc++ 2.8 It seems to work fine, but if > someone can tell me where I can download a libstdc++ 2.9 for redhat, I'm > interested. Thanks. Don't do that or you will have some unexpected crashes in future. omniORB 2.7.0 for linux glibc2 is compiled with egcs-1.1.1. libstdc++ 2.9 comes with egcs-1.1.1. There is no safe alternative but to install egcs-1.1.1. And use these configure options to build egcs-1.1.1: $ ./configure --enable-shared --enable-threads We are using binutils-2.9.1.0.14. Older versions have bugs that would affect C++ programs. I think Redhat 5.2 comes with binutils-2.9.1.0.15 so it should be alright. Until Redhat and other distributions incorporates egcs-1.1.1, there is no alternative but to build the compiler yourself. Sai-Lai -- Dr. Sai-Lai Lo | Research Scientist | E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab | 24a Trumpington Street Tel: +44 223 343000 | Cambridge CB2 1QA Fax: +44 223 313542 | ENGLAND From c1040@azfms.com Tue Jan 26 14:33:17 1999 From: c1040@azfms.com (Rusty Carruth) Date: Tue, 26 Jan 1999 07:33:17 -0700 Subject: [omniORB] spawn a server from a server part 2 Message-ID: <9901261433.AA09584@fmsserv99.azfms.com> > > Are there any mechanisms in omniORB to block all threads for this > very little time, so I've time to close the fds? > > What is the general way to spawn a new omniORB server process from > another > server process ?????? we use fork1, which only forks the current thread. If your OS has that, then the only thing you have to worry about is the deadlock you can get into if you are printing in a thread which is not copied, and then you try to print in the forked thread - you cannot print because that other (non-existant) thread has the print resources locked, and since it does not exist, it will never get back around to release them (it?) for you. So, if you do fork1 (under Solaris, anyway), don't follow it with a printf unless you are certain that no other thread will ever be printf'ing when the fork1 happens... The above is for Solaris 2.5.1, anyway. YMMV. rusty From bjornw@fairplay.no Tue Jan 26 15:03:06 1999 From: bjornw@fairplay.no (bjornw@fairplay.no) Date: 26 Jan 1999 16:03:06 +0100 Subject: [omniORB] OmniOrb 2.7 / Linux glibc / libstgc++ 2.9 In-Reply-To: Sai-Lai Lo's message of "26 Jan 1999 13:18:02 +0000" References: <36ACB4E8.9E3D277A@enst.fr> <3oaez6w4tx.fsf@neem.cam-orl.co.uk> Message-ID: Sai-Lai Lo writes: > >>>>> Fabien Azavant writes: > > > I encountered a similar problem with Redhat 5.1 I just put a symbolic > > link from libstdc++ 2.9 to libstdc++ 2.8 It seems to work fine, but if > > someone can tell me where I can download a libstdc++ 2.9 for redhat, I'm > > interested. Thanks. > > Don't do that or you will have some unexpected crashes in future. > > omniORB 2.7.0 for linux glibc2 is compiled with egcs-1.1.1. libstdc++ 2.9 > comes with egcs-1.1.1. There is no safe alternative but to install > egcs-1.1.1. And use these configure options to build egcs-1.1.1: > > $ ./configure --enable-shared --enable-threads > > We are using binutils-2.9.1.0.14. Older versions have bugs that would > affect C++ programs. I think Redhat 5.2 comes with binutils-2.9.1.0.15 so > it should be alright. > > Until Redhat and other distributions incorporates egcs-1.1.1, there is no > alternative but to build the compiler yourself. btw, I saw a recommendation from H.J.Lu (maintainer of binutils) on the egcs-news group to use binnutils-2.9.1.0.19 together with egcs-1.1.1. Apparently the new binutils should work better with shared libraries and exception-handling. I'm using binutils-2.9.1.0.19 together with egcs-1.1.1 and omniorb-2.6.1 and it works without problems. btw: did you fix the ::sleep() call from omni_thread::sleep() ? > > Sai-Lai > > -- > Dr. Sai-Lai Lo | Research Scientist > | > E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab > | 24a Trumpington Street > Tel: +44 223 343000 | Cambridge CB2 1QA > Fax: +44 223 313542 | ENGLAND From S.Lo@orl.co.uk Tue Jan 26 16:07:36 1999 From: S.Lo@orl.co.uk (Sai-Lai Lo) Date: 26 Jan 1999 16:07:36 +0000 Subject: [omniORB] omniORB 2.7.0 is released! In-Reply-To: Byrne_Matt's message of "Mon, 25 Jan 1999 08:16:00 -0600" References: Message-ID: <3obtjmow53.fsf@neem.cam-orl.co.uk> >>>>> Byrne Matt writes: > Hi. > I just tried to switch from 2.6.1 to 2.7.0 (Windows NT 4.0, MSVC 5.0). > Now, I get a exception when accessing a MemBufferedStream. A sample > of my code is below. Has anyone else run into this problem? > Datum& a_datum; > MemBufferedStream buffer((_CORBA_Char *)a_datum.m_dptr); > unsigned long len; > len <<= buffer; //I receive an exception here > The constructor for MemBufferedStream was changed from 2.6.1 to 2.7.0. > I believe there is a bug here but I am not familiar enough with the > code to be sure. Can someone help me out? Byrne, Warning! MemBufferedStream is an internal interface and is not intended to be used in the application code. The interface has indeed been cleaned up in 2.7.0. All the changes should be transparent if you stay with the C++ mapping as defined in the CORBA spec. May be there are other compliant ways to do what you want. Sai-Lai -- Dr. Sai-Lai Lo | Research Scientist | E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab | 24a Trumpington Street Tel: +44 223 343000 | Cambridge CB2 1QA Fax: +44 223 313542 | ENGLAND From S.Lo@orl.co.uk Tue Jan 26 16:11:01 1999 From: S.Lo@orl.co.uk (Sai-Lai Lo) Date: 26 Jan 1999 16:11:01 +0000 Subject: [omniORB] omniORB 2.7.0 is released! In-Reply-To: Martin Renner's message of "Tue, 26 Jan 1999 07:59:25 +0100" References: <4.1.19990126074914.00a24040@email> Message-ID: <3o7luaovze.fsf@neem.cam-orl.co.uk> >>>>> Martin Renner writes: > Hi. >> omniORB2\include\omniORB2/bufferedStream.h(621) : warning C4800: > [...] >> 620: inline void byteOrder(_CORBA_Char b) { >> 621: pd_byte_order = b; >> 622: } >> >> 692: _CORBA_Boolean pd_byte_order; > Noone of the programmers wants to give a statement about that? > I think that one should change the implementation of "byteOrder". Either > _CORBA_Boolean or _CORBA_Char, but not both mixed up.... or am I wrong? > I want to compile my applications without any warning messages from the > compiler. But "bufferedStream" causes a warning in each skeleton file. Yes, it is a mistake. Part of the changes in a big merge got left out. Will be fixed in future releases. In the mean time: Just do this: bufferedStream.h, line 621: pd_byte_order = (b != 0); Sai-Lai -- Dr. Sai-Lai Lo | Research Scientist | E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab | 24a Trumpington Street Tel: +44 223 343000 | Cambridge CB2 1QA Fax: +44 223 313542 | ENGLAND From S.Lo@orl.co.uk Tue Jan 26 16:15:22 1999 From: S.Lo@orl.co.uk (Sai-Lai Lo) Date: 26 Jan 1999 16:15:22 +0000 Subject: [omniORB] Re: Omniorb and Java In-Reply-To: Armen Yampolsky's message of "Thu, 21 Jan 1999 16:58:23 +0000" References: <36A75CAF.6A4AE0B7@erols.com> Message-ID: <3o3e4yovs5.fsf@neem.cam-orl.co.uk> >>>>> Armen Yampolsky writes: > You need to change it in two places. First, in your server, write > omniORB::idleConnectionScanPeriod(omniORB::idleIncoming, 0); //0 turns > timeout off > Next, if you are using omniNames, you must alter the source code to do > the same thing. I am attaching our modification to omniNames.cc which > allows you to call it with an additional argument: '-ORBinConScanPeriod > '. ORL said they will add the args: > -ORBinConScanPeriod > -ORBoutConScanPeriod > in the next release. Anyway, you must set that (the incoming) to 0. As promised, the command line options are there in 2.7.0. Sai-Lai From S.Lo@orl.co.uk Tue Jan 26 16:34:19 1999 From: S.Lo@orl.co.uk (Sai-Lai Lo) Date: 26 Jan 1999 16:34:19 +0000 Subject: [omniORB] outScavenger kill In-Reply-To: "Renzo Tomaselli"'s message of "Fri, 22 Jan 1999 10:16:36 +0100" References: <01bb01be45e9$2bd49080$11fc46c1@big> Message-ID: <3oyamqngc4.fsf@neem.cam-orl.co.uk> >>>>> Renzo Tomaselli writes: > Hi, we experienced a problem with Visual Basic managing an OCX which > links to an OmniORB related implementation. When switching from design > mode to run mode and the contrary, Visual Basic crashes because DLLs are > unloaded from memory, while the outScavenger thread is still alive. When > the timer wakes it up, there is no loaded code to run and everything > blows up. We cannot understand how VB unloads depending modules while > active threads are still alive (it doesn't happen with VC). Anyway, the > problem is that killOutScavenger is never called from OmniORB code; also > there is no explicit ORB shutdown to call when all things are going to > die. > From the BOA point of view there are impl_is_ready/impl_shutdown > entry points which do the correct job for inScavenger, so everythings > works fine there. What about explicitely calling killOutScavenger from a > key application destructor when things go down ? Thanks, Renzo Tomaselli Renzo, As you have found out, outScavenger is never stopped. We may be able to do a call to killOutScavenger and killInScavenger in the dtor of a global so it will be called when main() returns. For instance, something like this in scavenger.cc class scavengerCleaner { public: ~scavengerCleaner(); static scavengerCleaner theInstance; }; scavengerCleaner scavnegerCleaner::theInstance; scavengerCleaner::~scavengerCleaner() { StrandScavenger::killInScavenger(); StrandScavenger::killOutScavenger(); } Please try this out. Of course, there could still be a number of client threads created by the applications. I suppose these can be left to the application to do something about it. Sai-Lai -- Dr. Sai-Lai Lo | Research Scientist | E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab | 24a Trumpington Street Tel: +44 223 343000 | Cambridge CB2 1QA Fax: +44 223 313542 | ENGLAND From S.Lo@orl.co.uk Tue Jan 26 16:40:34 1999 From: S.Lo@orl.co.uk (Sai-Lai Lo) Date: 26 Jan 1999 16:40:34 +0000 Subject: [omniORB] spawn a server from a server part 2 In-Reply-To: c1040@azfms.com's message of "Tue, 26 Jan 1999 07:33:17 -0700" References: <9901261433.AA09584@fmsserv99.azfms.com> Message-ID: <3ou2xeng1p.fsf@neem.cam-orl.co.uk> >>>>> Rusty Carruth writes: >> >> Are there any mechanisms in omniORB to block all threads for this >> very little time, so I've time to close the fds? >> >> What is the general way to spawn a new omniORB server process from >> another >> server process ?????? > we use fork1, which only forks the current thread. If your OS has > that, then the only thing you have to worry about is the deadlock you > can get into if you are printing in a thread which is not copied, > and then you try to print in the forked thread - you cannot print because > that other (non-existant) thread has the print resources locked, and > since it does not exist, it will never get back around to release them > (it?) for you. So, if you do fork1 (under Solaris, anyway), don't follow > it with a printf unless you are certain that no other thread will ever > be printf'ing when the fork1 happens... > The above is for Solaris 2.5.1, anyway. YMMV. I think as Rusty points out, the way to spawn a new server process is quite OS dependent. In particular, does the OS recreate all the threads in the child? I'm not sure if all the different flavours of Unix behave in the same way and if it is possible to write generic code that works on all platforms. If you find a sure way that works on a specific platform, do share with us on this list. Sai-Lai -- Dr. Sai-Lai Lo | Research Scientist | E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab | 24a Trumpington Street Tel: +44 223 343000 | Cambridge CB2 1QA Fax: +44 223 313542 | ENGLAND From atai@ece.ucsd.edu Wed Jan 27 01:35:59 1999 From: atai@ece.ucsd.edu (Andy Tai) Date: Tue, 26 Jan 1999 17:35:59 -0800 (PST) Subject: [omniORB] is there a way to check if two obj references are colocated? Message-ID: <199901270135.RAA11895@vision.ucsd.edu> Hi, I wonder, given two object references (say a_ptr and b_ptr), is there any way to find out if they are colocated (in the same addressing space)? Also, given an object implementation which implements some interface A, and an object reference of interface B, is there a way to check (from inside the object implementation) if these two objects are colocated? I hope there is a CORBA-blessed way to do this... Thanks for any info. -- Li-Cheng Tai (Andy Tai) e-mail: atai@ece.ucsd.edu Visual Computing Lab telephone: +1 (619) 534-5935 Dept. of ECE, UCSD, Mail Code 0407 fax: +1 (619) 534-1004 La Jolla, CA 92093-0407, USA http://www-vision.ucsd.edu/~atai/ From grohmann@ike.uni-stuttgart.de Wed Jan 27 08:26:04 1999 From: grohmann@ike.uni-stuttgart.de (Grohmann, Axel) Date: Wed, 27 Jan 1999 09:26:04 +0100 Subject: [omniORB] is there a way to check if two obj references are colocated? References: <199901270135.RAA11895@vision.ucsd.edu> Message-ID: <36AECD9C.28A1D58@ike.uni-stuttgart.de> > Hi, I wonder, given two object references (say a_ptr and b_ptr), is > there any way to find out if they are colocated (in the same addressing > space)? Why do you want to know that?(It seems a bit like you are trying to find out something that is irrelevant in the CORBA thinking - it just does not matter where an object lives, as long as you can contact and use it.) Axel Grohmann Department of Knowledge Engineering and Numeric, IKE University of Stuttgart Pfaffenwaldring 31 D-70550 Stuttgart, Germany Phone: 0049 711 685-2130 Fax: 0049 711 685-2010 From Mark.Spiteri@cl.cam.ac.uk Wed Jan 27 11:09:13 1999 From: Mark.Spiteri@cl.cam.ac.uk (Mark David Spiteri) Date: Wed, 27 Jan 1999 11:09:13 +0000 Subject: [omniORB] OmniOrb 2.7 / Linux glibc / libstgc++ 2.9 In-Reply-To: Your message of "26 Jan 1999 13:18:02 GMT." <3oaez6w4tx.fsf@neem.cam-orl.co.uk> Message-ID: Thanks to all the people who advised me on setting this up. Doing as Sai Lai suggests truly seems the easiest way to achieve a working environment. I had tried getting the egcs1.1.1 rpm and its associated binutils(19) rpm, but that seemed to break all gcc/egcs. After toiling away to restore Redhat 5.2 to its original packages, we then got the source distribution of egcs1.1.1 from cygnus and made it up ourselves against the default 5.2 packages. Made and installed without problems and provides all the right bits, including a working libstdc++ 2.9. Now omniORB examples and code is compiling without problems. And those configure options as detailed below by Sai Lai are crucial. Regards Mark > Don't do that or you will have some unexpected crashes in future. > > omniORB 2.7.0 for linux glibc2 is compiled with egcs-1.1.1. libstdc++ 2.9 > comes with egcs-1.1.1. There is no safe alternative but to install > egcs-1.1.1. And use these configure options to build egcs-1.1.1: > > $ ./configure --enable-shared --enable-threads > > We are using binutils-2.9.1.0.14. Older versions have bugs that would > affect C++ programs. I think Redhat 5.2 comes with binutils-2.9.1.0.15 so > it should be alright. > > Until Redhat and other distributions incorporates egcs-1.1.1, there is no > alternative but to build the compiler yourself. > > Sai-Lai From J.Cowan@cs.ucl.ac.uk Wed Jan 27 12:40:11 1999 From: J.Cowan@cs.ucl.ac.uk (James Cowan) Date: Wed, 27 Jan 1999 12:40:11 -0000 Subject: [omniORB] Linux threads problem Message-ID: <01BE49F2.3CF03100@gateway> Hi I am having problems getting omniOrb working under Linux Programs core dump with segmentation violation errors in pthread_mutex_lock - see gdb output when running omniNames below. I guess that I have version mismatch. I have tried using both i586_linux_2.0_glibc and i586_linux_2.0 with no success. I am running Redhat 5 release 2.0.32, glibc development package glibc-devel-2.0.5c-10 and gcc version 2.7.2.3. Any help appreciated. James Cowan GDB is free software and you are welcome to distribute copies of it under certain conditions; type "show copying" to see the conditions. There is absolutely no warranty for GDB; type "show warranty" for details. GDB 4.16 (i386-redhat-linux), Copyright 1996 Free Software Foundation, Inc... (no debugging symbols found)... (gdb) run Starting program: /home/jcowan/omniORB_2.6.1/bin/i586_linux_2.0_glibc/omniNames (no debugging symbols found)...(no debugging symbols found)... Program received signal SIGSEGV, Segmentation fault. 0x401d342c in __pthread_mutex_lock () at mutex.c:112 (gdb) where #0 0x401d342c in __pthread_mutex_lock () at mutex.c:112 #1 0x401d49ac in __fresetlockfiles () at lockfile.c:87 #2 0x402ac7b3 in _IO_fread (buf=0xbffff5f4, size=44, count=1, fp=0x80665a8) at iofread.c:44 #3 0x402caace in __tzfile_compute (timer=1076886616, use_localtime=1076909916, leap_correct=0x4030439c, leap_hit=0xbffff6c4) at tzfile.c:283 #4 0x402c9a63 in tzset_internal () at tzset.c:197 #5 0x402ca7ec in __tz_convert () at tzset.c:561 #6 0x402c72b2 in localtime () at localtime.c:49 #7 0x402c7189 in ctime (t=0xbffff6c4) at ctime.c:33 #8 0x805b302 in timestamp::t () #9 0x805744c in log::log () #10 0x804d7e0 in main () (gdb) quit The program is running. Quit anyway (and kill it)? (y or n) Please answer y or n. From bjornw@fairplay.no Wed Jan 27 13:50:47 1999 From: bjornw@fairplay.no (bjornw@fairplay.no) Date: 27 Jan 1999 14:50:47 +0100 Subject: [omniORB] Linux threads problem In-Reply-To: James Cowan's message of "Wed, 27 Jan 1999 12:40:11 -0000" References: <01BE49F2.3CF03100@gateway> Message-ID: James Cowan writes: > Hi > > I am having problems getting omniOrb working under Linux > Programs core dump with segmentation violation errors in > pthread_mutex_lock - see gdb output when running omniNames below. > > I guess that I have version mismatch. I have tried using > both i586_linux_2.0_glibc and i586_linux_2.0 with no success. > > I am running Redhat 5 release 2.0.32, glibc development > package glibc-devel-2.0.5c-10 and gcc version 2.7.2.3. > > Any help appreciated. You need to upgrade all your components. I recommend installing RedHat 5.2 with kernel 2.0.36, to get the working thread-packages and binutils needed to run egcs-1.1.1 Also install egcs-1.1.1. Then you'll be able to compile and run omniorb happy hacking bjornw> From S.Lo@orl.co.uk Wed Jan 27 16:01:11 1999 From: S.Lo@orl.co.uk (Sai-Lai Lo) Date: 27 Jan 1999 16:01:11 +0000 Subject: [omniORB] Serialize a sequence of ANY In-Reply-To: Byrne_Matt's message of "Wed, 27 Jan 1999 09:32:00 -0600" References: Message-ID: <3oww28g0xk.fsf@neem.cam-orl.co.uk> >>>>> Byrne Matt writes: > How can I Serialize a sequence of ANY's in order to save them to a > file without using the MemBufferedStream. I am new to CORBA so excuse > me if this is not an appropriate question. Now I see where you are coming from! There is nothing in the CORBA core to allow you to do that. I suppose something like the externalization service can do it but you do not have the luxury to have one. A practical solution, which you are already using, is to serialise the values into a CDR stream (a byte stream that encode all data according to the rules that are part of GIOP) and then extract the value out again as if it is a byte stream. The MemBufferedStream class is indeed one such CDR stream. See if the following psuedo code works for you: SeqAny_t val; MemBufferedStream m; val >>= m; CORBA::ULong count = m.unRead(); while (count--) { CORBA::Octet v; v <<= m; StoreOctetToFileAsHex(v); } --------------- And the reverse: MemBufferedStream m; CORBA::Octet v; while (ReadOctetFromFile(v)) { v >>= m; } SeqAny_t val; val <<= m; If you have to do this, be careful to isolate this bit of code and carefully comment this to be omniORB2 specific. (In future versions, MemBufferedStream will be replaced with a more generic cdr stream object.) Regards, Sai-Lai -- Dr. Sai-Lai Lo | Research Scientist | E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab | 24a Trumpington Street Tel: +44 223 343000 | Cambridge CB2 1QA Fax: +44 223 313542 | ENGLAND From paf@inescn.pt Wed Jan 27 16:36:30 1999 From: paf@inescn.pt (Pedro Ferreira) Date: Wed, 27 Jan 1999 16:36:30 -0000 Subject: [omniORB] is there a way to check if two obj references are colocated? Message-ID: <003b01be4a13$31f95350$5a1875c2@inescn.pt> >> Hi, I wonder, given two object references (say a_ptr and b_ptr), is >> there any way to find out if they are colocated (in the same addressing >> space)? > >Why do you want to know that?(It seems a bit like you are trying to find out >something that is irrelevant in the CORBA thinking - it just does not matter where >an object lives, as long as you can contact and use it.) > >Axel Grohmann > Real world applications sometimes _do_ need to know it. Of course, you can always argue that, in a pure distributed system, it should be irrelevant. Imagine a scenario where you want to reansfer a large amount of data between to objects. Due to performance requirements, you can't afford using the ORB to do it. So you decide to create a TCP connection between the two objects and use it to transfer the data. Now, if if you knew the two objects were in the same address space, you could just pass a handle to a memory area and have a much better performance. What you should never do is to look inside the object reference as it is, by definition, opaque. You should always use other means (read, interface functions) to do it. For instance, get process ids and host names, and compare them. Just my two cents. Pedro _____________________________________________________ Pedro Alves Ferreira INESC - Porto Tel: 02 209 42 28 Pc da Republica, 93 R/C Fax: 02 208 41 72 4000 PORTO e-mail: paf@inescn.pt From renzo.tomaselli@tecnotp.it Wed Jan 27 18:12:27 1999 From: renzo.tomaselli@tecnotp.it (Renzo Tomaselli) Date: Wed, 27 Jan 1999 19:12:27 +0100 Subject: [omniORB] is there a way to check if two obj references are colocated? Message-ID: <008a01be4a20$9ca72080$11fc46c1@big> I had a similar problem for a distributed imaging application; however colocated objects do exchange data as memory area addresses, the ORB is n= ot involved. The vtable of C++ does the trick so performance is really at maximum. The great thing is that this is fully transparent to both client and server coding. Moving objects to different address spaces doesn't concern their coding, just performance (and off course retrieving the counterpart object, this is a naming issue). Btw, I'm interested to know why exchanging a large byte sequence through TCP/IP (sockets) should be faster than through ORB marshalling. Thanks, Renzo Tomaselli -------------------------------------------------------------------------= -- TecnoTP s.n.c. Special Information System Design Maso Pelauchi I38050 Ronchi Valsugana, Trento TN ITALY Tel. +39 0461 773164 Fax. +39 0461 771514 e-mail: renzo.tomaselli@tecnotp.it -------------------------------------------------------------------------= -- -----Original Message----- From: Pedro Ferreira To: Grohmann, Axel Cc: omniorb-list@orl.co.uk Date: mercoled=EC 27 gennaio 1999 18.01 Subject: Re: [omniORB] is there a way to check if two obj references are colocated? >>> Hi, I wonder, given two object references (say a_ptr and b_ptr), is >>> there any way to find out if they are colocated (in the same addressi= ng >>> space)? >> >>Why do you want to know that?(It seems a bit like you are trying to fin= d >out >>something that is irrelevant in the CORBA thinking - it just does not >matter where >>an object lives, as long as you can contact and use it.) >> >>Axel Grohmann >> > >Real world applications sometimes _do_ need to know it. >Of course, you can always argue that, in a pure distributed system, it >should be irrelevant. > >Imagine a scenario where you want to reansfer a large amount of data between >to objects. Due to performance requirements, you can't afford using the = ORB >to >do it. >So you decide to create a TCP connection between the two objects and use= it >to transfer the data. >Now, if if you knew the two objects were in the same address space, you >could >just pass a handle to a memory area and have a much better performance. > >What you should never do is to look inside the object reference as it is= , by >definition, opaque. You should always use other means (read, interface >functions) >to do it. >For instance, get process ids and host names, and compare them. > >Just my two cents. > >Pedro >_____________________________________________________ >Pedro Alves Ferreira >INESC - Porto Tel: 02 209 42 28 >Pc da Republica, 93 R/C Fax: 02 208 41 72 >4000 PORTO e-mail: paf@inescn.pt > > > From paf@inescn.pt Wed Jan 27 18:59:45 1999 From: paf@inescn.pt (Pedro Ferreira) Date: Wed, 27 Jan 1999 18:59:45 -0000 Subject: [omniORB] is there a way to check if two obj references are colocated? Message-ID: <00c201be4a27$348d0670$5a1875c2@inescn.pt> -----Original Message----- From: Renzo Tomaselli To: omniorb list Date: Quarta-feira, 27 de Janeiro de 1999 18:08 Subject: Re: [omniORB] is there a way to check if two obj references are colocated? >I had a similar problem for a distributed imaging application; however >colocated objects do exchange data as memory area addresses, the ORB is not >involved. The vtable of C++ does the trick so performance is really at >maximum. The great thing is that this is fully transparent to both client >and server coding. Moving objects to different address spaces doesn't >concern their coding, just performance (and off course retrieving the >counterpart object, this is a naming issue). Great! That's exactly what we do in our Digital TV Studio system. >Btw, I'm interested to know why exchanging a large byte sequence through >TCP/IP (sockets) should be faster than through ORB marshalling. Because using the ORB involves marshalling, unmarshalling, GIOP overhad, etc. However, most ORBs perform quite well when you use byte sequences. Take a look at OMG's "Control and Management of A/V Streams", somewhere at http://www.omg.org Doug Schmidt (http://www.cs.wustl.edu/~schmidt) also has several very interesting papers on that and other subjects, namely http://www.cs.wustl.edu/~schmidt/av.ps.gz Hope this helps, Pedro _____________________________________________________ Pedro Alves Ferreira INESC - Porto Tel: 02 209 42 28 Pc da Republica, 93 R/C Fax: 02 208 41 72 4000 PORTO e-mail: paf@inescn.pt Portugal From ehipp@coactive.com Wed Jan 27 21:37:06 1999 From: ehipp@coactive.com (Emily Hipp) Date: Wed, 27 Jan 1999 13:37:06 -0800 Subject: [omniORB] Dynanmic IP assignment with omni ORB? Message-ID: <21875FDEF3A7D211994600805FC74FEFFE65@AIRBAG> Hi all I have a ORB application that runs on an embedded target. The application has an inital object (similar to bootstrap) where the object reference gets generated by the client. The client, using the inital object, retrieves a list of all the internal object references from the application. Here is the tricky part: The target is contacted via PPP where the IP addresss of the target is dynamically assigned. The inital object reference can be calculated by the client (using the new IP address). The ORB seems to be able to handle this fine. However, the list of object references for the internal objects on the application need to be regenerated using the new IP address before sending them back to the client. Is there an easy way to do this? I tried to use dispose, then new on the internal objects (after changing the local IP address), but the IP address seems to be the same as before. Any help would be great! Emily From JUANMA@sag.es Thu Jan 28 18:20:53 1999 From: JUANMA@sag.es (Juan Manuel Rodriguez) Date: Thu, 28 Jan 1999 19:20:53 +0100 Subject: [omniORB] Problems in the comm between 2 CORBA modules Message-ID: Hello omniORBers. My problem is: I have 2 modules connected to a NameServer: a Sun (SunOS lambda 5.5.1 = Generic sun4m sparc SUNW,SPARCstation-5) and a PC.=20 Both modules are JAVA and one of it ("client") always runs in the PC and = connects to the other one to invoke his method.=20 Well, if I run the "server" module also from the PC all is OK (client gets = its reference and invokes his method), but if this "server" module is = running in the Sun, client gets its reference (server module registers = perfectly in the nameServer), but cannot execute the server function = because it says that is a non-valid reference.=20 I start Sun module with JRE 1.2 for Solaris (exactly jre12-solaris2-sparc.s= h file downloaded) and the PC module with JRE 1.2 for x86_win32. I see in the trace of the client module: Error: org.omg.CORBA.COMM_FAILURE: minor code: 2 completed: No Can anyone help me? What can be the cause? Thanks in advance Juanma. From dmorgen@alum.mit.edu Thu Jan 28 18:49:00 1999 From: dmorgen@alum.mit.edu (David Morgenlender) Date: Thu, 28 Jan 1999 18:49:00 GMT Subject: [omniORB] Sequence of Sequence causes client compiler errors!!! In-Reply-To: <36a16353.167867423@smtp.ne.mediaone.net> References: <366468EE.2615DB12@fairplay.no> <3or9uisp1n.fsf@neem.cam-orl.co.uk> <36a05c28.166031374@smtp.ne.mediaone.net> <36a16353.167867423@smtp.ne.mediaone.net> Message-ID: <36bbb0b7.97420506@smtp.ne.mediaone.net> I've defined a method with an output parameter which is a sequence of = sequences. Everything builds ok, until I try a call from a client, written in Visual= C++ 5.0. This gets a compiler error indicating the parameter has a = mismatched data type. I have similar code, which has a sequence of longs; this works = ok. Here are some excerpts from the code (simplified to only use the relevant calling parameter): .IDL ---- typedef sequence SingleTestResultsList; typedef sequence TestResultsList; void Test(out TestResultsList listTestResults); =09 .HH --- typedef _CORBA_Unbounded_Sequence_w_FixSizeElement=20 SingleTestResultsList; typedef _CORBA_Sequence_Var=20 SingleTestResultsList_var; typedef _CORBA_Unbounded_Sequence< _CORBA_Unbounded_Sequence_w_FixSizeElement >=20 TestResultsList; typedef _CORBA_Sequence_Var >=20 TestResultsList_var; virtual void _0RL__Test ( TestResultsList *& listTestResults ) =3D 0; void Test ( _CORBA_Sequence_OUT_arg< TestResultsList,TestResultsList_var > listTestResults ) { _0RL__Test ( listTestResults._data ); } class Tests : public virtual omniObject, public virtual CORBA::Object { public: typedef _CORBA_Unbounded_Sequence_w_FixSizeElement=20 SingleTestResultsList; typedef _CORBA_Sequence_Var=20 SingleTestResultsList_var; typedef _CORBA_Unbounded_Sequence< _CORBA_Unbounded_Sequence_w_FixSizeElement >=20 TestResultsList; typedef _CORBA_Sequence_Var >=20 TestResultsList_var; virtual void _0RL__Test ( TestResultsList *& listTestResults ) =3D 0; void Test ( = _CORBA_Sequence_OUT_arg =20 listTestResults ) { _0RL__Test ( listTestResults._data ); } Calling code in client ---------------------- Tests::TestResultsList seqResults; =09 INTERFACE_TESTS->Test(&seqResults); // also tried without the "&" =20 COMPILER ERROR -------------- =20 error C2664: 'Test' : cannot convert parameter 1 from=20 'class _CORBA_Unbounded_Sequence< class _CORBA_Unbounded_Sequence_w_FixSizeElement> *'=20 to 'class _CORBA_Sequence_OUT_arg>, class _CORBA_Sequence_Var>, class _CORBA_Unbounded_Sequence_w_FixSizeElement>>' Any idea what's going on??? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Dave Morgenlender e-mail: dmorgen@alum.mit.edu =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D From S.Lo@orl.co.uk Thu Jan 28 19:07:35 1999 From: S.Lo@orl.co.uk (Sai-Lai Lo) Date: 28 Jan 1999 19:07:35 +0000 Subject: [omniORB] Sequence of Sequence causes client compiler errors!!! In-Reply-To: dmorgen@alum.mit.edu's message of "Thu, 28 Jan 1999 18:49:00 GMT" References: <366468EE.2615DB12@fairplay.no> <3or9uisp1n.fsf@neem.cam-orl.co.uk> <36a05c28.166031374@smtp.ne.mediaone.net> <36a16353.167867423@smtp.ne.mediaone.net> <36bbb0b7.97420506@smtp.ne.mediaone.net> Message-ID: <3o90endxmw.fsf@neem.cam-orl.co.uk> >>>>> David Morgenlender writes: > .IDL > ---- > typedef sequence SingleTestResultsList; > typedef sequence TestResultsList; > void Test(out TestResultsList listTestResults); > Calling code in client > ---------------------- > Tests::TestResultsList seqResults; INTERFACE_TESTS-> Test(&seqResults); // also tried without the "&" > COMPILER ERROR > -------------- > error C2664: 'Test' : cannot convert parameter 1 from > 'class _CORBA_Unbounded_Sequence< > class _CORBA_Unbounded_Sequence_w_FixSizeElement> *' > to 'class _CORBA_Sequence_OUT_arg class _CORBA_Unbounded_Sequence_w_FixSizeElement>, > class _CORBA_Sequence_Var class _CORBA_Unbounded_Sequence_w_FixSizeElement>, > class _CORBA_Unbounded_Sequence_w_FixSizeElement>>' > Any idea what's going on??? This is a quick one. The signature of the argument expected is TestResultsList*&. It expects you to pass a TestResultsList* and on return a sequence is allocated on the heap by the callee and its pointer is written into your argument. Try this: Tests::TestResultsList* seqResults; INTERFACE_TESTS-> Test(seqResults); // Remember to free the sequence later. // Or define seqResults as Tests::TestResultsList_var. As to why the this is so, check the C++ mapping spec Table 24. Sai-Lai -- Dr. Sai-Lai Lo | Research Scientist | E-mail: S.Lo@orl.co.uk | Olivetti & Oracle Research Lab | 24a Trumpington Street Tel: +44 223 343000 | Cambridge CB2 1QA Fax: +44 223 313542 | ENGLAND From dmorgen@alum.mit.edu Thu Jan 28 20:19:31 1999 From: dmorgen@alum.mit.edu (David Morgenlender) Date: Thu, 28 Jan 1999 20:19:31 GMT Subject: [omniORB] Sequence of Sequence causes client compiler errors!!! In-Reply-To: <3o90endxmw.fsf@neem.cam-orl.co.uk> References: <366468EE.2615DB12@fairplay.no> <3or9uisp1n.fsf@neem.cam-orl.co.uk> <36a05c28.166031374@smtp.ne.mediaone.net> <36a16353.167867423@smtp.ne.mediaone.net> <36bbb0b7.97420506@smtp.ne.mediaone.net> <3o90endxmw.fsf@neem.cam-orl.co.uk> Message-ID: <36bec4c1.102551527@smtp.ne.mediaone.net> Sai-Lai, >This is a quick one. > >The signature of the argument expected is TestResultsList*&. It expects = you >to pass a TestResultsList* and on return a sequence is allocated on the >heap by the callee and its pointer is written into your argument. > >Try this: > >Tests::TestResultsList* seqResults; > >INTERFACE_TESTS-> Test(seqResults); > >// Remember to free the sequence later. >// Or define seqResults as Tests::TestResultsList_var. > >As to why the this is so, check the C++ mapping spec Table 24. Thanks. That was a VERY fast response! This solves the problem. But, I'm mystified, because I could've sworn I = had tried exactly that! =20 IAE, I still don't understand why this compiles: Tests::TestResultsList* seqResults; INTERFACE_TESTS-> Test(seqResults); and this does not: Tests::TestResultsList seqResults; INTERFACE_TESTS-> Test(&seqResults); Clearly, they are very different in terms of execution. But from the compilation point of view, in each case the argument is "Tests::TestResultsList*". What am I missing? BTW, I had already realized I needed to allocate the sequence on the heap= & I was going to make the change as soon as I had solved this problem ... too= bad I didn't try fixing that first! =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Dave Morgenlender e-mail: dmorgen@alum.mit.edu =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D From gdd0@gte.com Thu Jan 28 20:39:36 1999 From: gdd0@gte.com (Gary D. Duzan) Date: Thu, 28 Jan 1999 15:39:36 -0500 Subject: [omniORB] Sequence of Sequence causes client compiler errors!!! Message-ID: <199901282039.PAA25270@lion.gte.com> In Message <36bec4c1.102551527@smtp.ne.mediaone.net> , dmorgen@alum.mit.edu (David Morgenlender) wrote: =>IAE, I still don't understand why this compiles: => => Tests::TestResultsList* seqResults; => INTERFACE_TESTS-> Test(seqResults); => =>and this does not: => => Tests::TestResultsList seqResults; => INTERFACE_TESTS-> Test(&seqResults); Test is probably defined to take a "Tests::TestResultsList*&", or a reference to a pointer. The first one defines storage for a pointer variable, so making a reference to it is no problem. The second is a temporary pointer value which doesn't have a memory location, so can't have a reference to it without creating a temporary variable for it, which is not done automatically unless it is a reference to a const. The basic issue is that Test() wants to write to the pointer, but that doesn't make sense in the second case. Gary Duzan GTE Laboratories From dmorgen@alum.mit.edu Thu Jan 28 21:38:05 1999 From: dmorgen@alum.mit.edu (David Morgenlender) Date: Thu, 28 Jan 1999 21:38:05 GMT Subject: [omniORB] Sequence of Sequence causes client compiler errors!!! In-Reply-To: <199901282039.PAA25270@lion.gte.com> References: <199901282039.PAA25270@lion.gte.com> Message-ID: <36c1d805.107484484@smtp.ne.mediaone.net> Gary, >=3D>IAE, I still don't understand why this compiles: >=3D> >=3D> Tests::TestResultsList* seqResults; >=3D> INTERFACE_TESTS-> Test(seqResults); >=3D> >=3D>and this does not: >=3D> >=3D> Tests::TestResultsList seqResults; >=3D> INTERFACE_TESTS-> Test(&seqResults); > > Test is probably defined to take a "Tests::TestResultsList*&", or a >reference to a pointer. The first one defines storage for a pointer >variable, so making a reference to it is no problem. The second is a >temporary pointer value which doesn't have a memory location, so can't >have a reference to it without creating a temporary variable for it, >which is not done automatically unless it is a reference to a const. > The basic issue is that Test() wants to write to the pointer, but >that doesn't make sense in the second case. I hate it when the answer is so obvious in hindsight ! The compiler = error didn't mention reference, instead saying there's a mismatch between 2 = very long complex types; so I got hung up on figuring out the data types, thereby = missing the obvious. Thanks for pointing that out! =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D Dave Morgenlender e-mail: dmorgen@alum.mit.edu =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D From gutier@intergate.bc.ca Fri Jan 29 04:39:37 1999 From: gutier@intergate.bc.ca (Gerald Gutierrez) Date: Thu, 28 Jan 1999 20:39:37 -0800 Subject: [omniORB] wchar/wstring support Message-ID: <3.0.6.32.19990128203937.00798be0@mail.intergate.bc.ca> Hello all. I'm looking for wchar/wstring support in OmniORB. I realize that OmniORB is CORBA-2.0-based and thus doesn't have these. Are these features in OmniORB's near-term plans? From bvisscher@mindspring.com Fri Jan 29 05:43:42 1999 From: bvisscher@mindspring.com (Bruce Visscher) Date: Fri, 29 Jan 1999 00:43:42 -0500 Subject: [omniORB] Sequence of Sequence causes client compiler errors!!! References: <366468EE.2615DB12@fairplay.no> <3or9uisp1n.fsf@neem.cam-orl.co.uk> <36a05c28.166031374@smtp.ne.mediaone.net> <36a16353.167867423@smtp.ne.mediaone.net> <36bbb0b7.97420506@smtp.ne.mediaone.net> <3o90endxmw.fsf@neem.cam-orl.co.uk> <36bec4c1.102551527@smtp.ne.mediaone.net> Message-ID: <36B14A8D.D7DB1A94@mindspring.com> David Morgenlender wrote: > IAE, I still don't understand why this compiles: > > Tests::TestResultsList* seqResults; > INTERFACE_TESTS-> Test(seqResults); > > and this does not: > > Tests::TestResultsList seqResults; > INTERFACE_TESTS-> Test(&seqResults); > > Clearly, they are very different in terms of execution. But from the > compilation point of view, in each case the argument is > "Tests::TestResultsList*". What am I missing? The difference is that in the second case, you're binding a temporary to a non-const reference. C++ won't let you do that. In this case for good reason. You were trying to replace the address of a stack variable with a heap pointer. Not good at all. HTH, Bruce From hlehoux@adways.com Fri Jan 29 09:27:19 1999 From: hlehoux@adways.com (Herve Lehoux) Date: Fri, 29 Jan 1999 10:27:19 +0100 Subject: [omniORB] sequence<> size problem ?? Message-ID: <99012910365301.23209@maestro.adways.com> Hello, has anyone experienced problems with size of sequences with omniorb, or maybe i made a stupid programming error ? i use : idl :: typedef sequence rawdata; void generate( in double x0, in double x1, in double y0, in double y1, in unsigned short sx, in unsigned short sy, in unsigned short i, out rawdata result); client.cc :: rawdata *result= 0; p->generate(.../...,result); THE PROBLEM is i have a core dump when the real size of the output data is more than 1024*1024 ??? using the debugger i can see a CORBA::SystemException is thrown in the serverSK.cc skeleton by the _0RL__generate() method... the server is working ok, just client crashes. both work with smaller sizes i use omniORB 2.6.1 with DIGITAL C++ V6.0-010 on DIGITAL UNIX V4.0 thanks in advance for any help. From rwilson@advantix.com Fri Jan 29 14:44:17 1999 From: rwilson@advantix.com (Randy S Wilson) Date: Fri, 29 Jan 1999 09:44:17 -0500 Subject: [omniORB] 2.7.0, gcc 2.8.1, Solaris X86 Message-ID: <00a701be4b95$d9abd540$879e1ac7@rsw.advantix.com> This is a multi-part message in MIME format. ------=_NextPart_000_00A4_01BE4B6B.F053F310 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I'm considering a port of 2.7.0 to Solaris for X86, but was wondering if = anyone has already done this ? Does anyone have thoughts/comments/rants on Sun CC (4.2) vs gcc (2.8.1) = vs egcs (?) ? Is the thread issue on 2.8.1 gcc resolved (do the gcc managers even know = about it?) ? Does anyone have an interest in this port (if it works) ? This will probably be done in the next month. So if you have help or = suggestions please send them to me and let me know if you want to hear = back on how it goes. RSWilson ADVANTIX ------=_NextPart_000_00A4_01BE4B6B.F053F310 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I'm considering a port of 2.7.0 to = Solaris for=20 X86, but was wondering if anyone has already done this ?
Does anyone have = thoughts/comments/rants on Sun=20 CC (4.2) vs gcc (2.8.1) vs egcs (?) ?
Is the thread issue on 2.8.1 gcc = resolved (do=20 the gcc managers even know about it?) ?
Does anyone have an interest in this = port (if it=20 works) ?
 
This will probably be done in the next month.  = So if you=20 have help or suggestions please send them to me and let me know if you = want to=20 hear back on how it goes.
 
RSWilson
ADVANTIX
------=_NextPart_000_00A4_01BE4B6B.F053F310-- From lojewski@itwm.uni-kl.de Fri Jan 29 22:20:45 1999 From: lojewski@itwm.uni-kl.de (lojewski) Date: Fri, 29 Jan 1999 22:20:45 +0000 Subject: [omniORB] java applets Message-ID: <36B2343D.4B3E55AE@itwm.uni-kl.de> hallo ! i have a problem. i cannot contact the nameservice from an applet, when the applet is running on a different machine like the corba-nameservice. the same java application works fine in this enviroment. is it possible to low-down the secrurity-settings of the java2-appletviewer to do this ? how des it works ? thanks in advance cl.