* Re: OODCE
1996-09-12 4:00 OODCE Andreas Larsson
@ 1996-09-13 4:00 ` Andreas Larsson
0 siblings, 0 replies; 2+ messages in thread
From: Andreas Larsson @ 1996-09-13 4:00 UTC (permalink / raw)
Cc: andreas.larsson, melman
Andreas Larsson wrote:
>
> Has anyone out there any experience in the OODCE product
> from HP? I have just started with some very simple experiments
> and my opinion so far is that it's _vey_ unstable.
> Comments anyone?
>
> /Andreas
> _______________________________________________________________
>
> Andreas Larsson E-mail: andreas.larsson@enator.se
> Enator Telub AB Fax: +46 8 82 19 67
> Box 1381 Voice: +46 8 705 51 38
> S-171 27 SOLNA
> Sweden
> _______________________________________________________________
First of all, I appologise for the far too general description of
my problem. In fact, I'm not even sure whether the problem is due to
OODCE or the actual setup of my system. Anyway, since I hope for
some help on the matter I'll try to give a more specific explanation.
I have made a very simple test program on a HP 9000/735 running
HP-UX 10.01, HP DCE/9000 1.4. In addition, the PHSS_7191 patch has
been installed. The test program consists of the usual client and
server parts. The client enters a finite loop of repeated calls to a
couple of methods included in the interface exported by the server.
Registration and lookup of the interface is done via CDS. At execution
everything works fine at first but after a random period of time
(30 - 7000 iterations of the loop) it ends up in a variety of states
such as core dump, communications failure, and sometimes even an
infinite loop.
The idl file looks as follows:
[uuid(50d0bc2a-0afd-11d0-bc58-080009629231), version(1.0)]
interface Database
{
void initScenario([in] handle_t h);
void readCard([in] handle_t h);
}
The implementation of the manager class' methods:
#include <iostream.h>
#include "DatabaseS.H"
void Database_1_0_Mgr::initScenario()
{
cout << "--> Database_1_0_Mgr::initScenario()" << endl;
cout << "<-- Database_1_0_Mgr::initScenario()" << endl;
}
void Database_1_0_Mgr::readCard()
{
cout << "--> Database_1_0_Mgr::readCard()" << endl;
cout << "<-- Database_1_0_Mgr::readCard()" << endl;
}
The server process:
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <iostream.h>
#include <dce/dce_error.h>
#include <oodce/Pthread.H>
#include <oodce/Server.H>
#include <oodce/Exceptions.H>
#include <oodce/Tracer.H>
#include "DatabaseS.H"
DCETracer traceobj("TR_DATABASE", NULL, NULL, NULL);
void main()
{
try {
Database_1_0_Mgr db;
DCEPthread* exitThd = new DCEPthread(DCEServer::ServerCleanup,
(void *)(0));
char trace_name_buf[40];
char cds_name_entry[40];
sprintf(trace_name_buf, "%s-%d", "Database", getpid());
sprintf(cds_name_entry, "/.:/eva/%s/Database",
getenv("LOGNAME"));
traceobj.SetPrefix(trace_name_buf);
theServer->RegisterObject(db, true);
theServer->SetName(cds_name_entry);
theServer->Listen();
}
catch (DCEErr& exc) {
traceobj << "Caught DCE Exception\n" << (const char*)exc;
exit(1);
}
exit(0);
}
Finally, the client process:
#include <iostream.h>
#include <stdlib.h>
#include <oodce/Exceptions.H>
#include "DatabaseC.H"
main(int argc, char* argv[])
{
try {
char cds_name_entry[40];
sprintf(cds_name_entry, "/.:/eva/%s/Database",
getenv("LOGNAME"));
Database_1_0 db((unsigned char*)cds_name_entry);
for (int i = 0; i < 10000; i++) {
db.initScenario();
db.readCard();
}
}
catch (DCEErr& exc) {
printf("DCE Exception: %s\n", (const char*)exc);
exit(1);
}
exit(0);
}
Is there something that I've missed? I can't even use a debugger
on this one since my version of OODCE refuses to be compiled with
the -g option.
Regards,
Andreas
_______________________________________________________________
Andreas Larsson E-mail: andreas.larsson@enator.se
Enator Telub AB Fax: +46 8 82 19 67
Box 1381 Voice: +46 8 705 51 38
S-171 27 SOLNA
Sweden
_______________________________________________________________
^ permalink raw reply [flat|nested] 2+ messages in thread