[omniORB] Compiling with open source

I-Currey, Jason Jason.Currey@Australia.Boeing.com
Tue Nov 19 12:36:01 2002


Hi,

First time user of the orb, wanted to use it with either the cygwin compiler
or mingw compiler on a windows platform. I have looked around for a build
option that uses one of these compilers, cant find one. Just wondering if
anyone has done this port or knows of any problems that eliminates this as
an option(ie compiler issues) or could provide me with information that may
allow me to achieve this???

Cheers,

Jason

-----Original Message-----
From: omniorb-list-request@omniorb-support.com
[mailto:omniorb-list-request@omniorb-support.com]
Sent: Tuesday, 19 November 2002 10:43 AM
To: omniorb-list@omniorb-support.com
Subject: omniORB-list digest, Vol 1 #207 - 10 msgs


Send omniORB-list mailing list submissions to
	omniorb-list@omniorb-support.com

To subscribe or unsubscribe via the World Wide Web, visit
	http://www.omniorb-support.com/mailman/listinfo/omniorb-list
or, via email, send a message with subject or body 'help' to
	omniorb-list-request@omniorb-support.com

You can reach the person managing the list at
	omniorb-list-admin@omniorb-support.com

When replying, please edit your Subject line so it is more specific
than "Re: Contents of omniORB-list digest..."


Today's Topics:

   1. Re: OmniORB 4 on MacOS 9 (Duncan Grisby)
   2. Re: Thread Policy (Duncan Grisby)
   3. Re: java and omniNames (baileyk@schneider.com)
   4. Re: Is OmniNotify alive ? (Robert E. Gruber)
   5. Multithreading (Uli Syber)
   6. patch: support for compilation tuning using enviroment vars. (Bastiaan
Bakker)
   7. Re: Multithreading (yashik@veon.com)
   8. Using omniORB/omniORBpy in Apache Modules (Thorsten Goertz)
   9. Problem with oneway methods and omniidl 4.0.0 (Ilya Kreyer)
  10. RE: Multithreading (Ulf Stoermer)

--__--__--

Message: 1
To: Malge Nishant <MNishant@quark.co.in>
cc: omniorb-list@omniorb-support.com
Subject: Re: [omniORB] OmniORB 4 on MacOS 9 
From: Duncan Grisby <duncan@grisby.org>
Date: Mon, 18 Nov 2002 13:54:25 +0000

On Thursday 14 November, Malge Nishant wrote:

> 	Has any one tried build omniORB4 on MacOS 9? No problem with MAC OS
> X, I am able to build and use these libs.

I don't think anyone has attempted it. Steve Coy ported omniORB 2 to
Mac OS. You can see a mailing list posting about it here:

 
http://www.omniorb-support.com/pipermail/omniorb-list/1999-April/012443.html

Unfortunately, the web page in that message is no longer available, so
I have no idea what the status might be.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan@grisby.org     --
   -- http://www.grisby.org --

--__--__--

Message: 2
To: jorgefm@cirsa.com
cc: omniorb-list@omniorb-support.com
Subject: Re: [omniORB] Thread Policy 
From: Duncan Grisby <duncan@grisby.org>
Date: Mon, 18 Nov 2002 14:08:52 +0000

On Monday 18 November, jorgefm@cirsa.com wrote:

> I think that i have found a configuration that works for me with
> 'maxServerThreadPerConnection=1' (the default in omniORB 3.x, i think?)
> The 'call order' is achieve processing all the request from a client in
> the same thread. Before, if the server was busy, the ORB creates a thread
> per request and put them to sleep, but when the server becomes available
> again, all the threads are wake up and you can assure the order easily.

If the client is multi-threaded, it will open new network connections
to the server, so multiple threads will contact your servant
concurrently.  I don't know if that is an issue for you.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan@grisby.org     --
   -- http://www.grisby.org --

--__--__--

Message: 3
Subject: Re: [omniORB] java and omniNames
To: Heinrich =?iso-8859-1?Q?G=F6tzger?= <goetzger@gmx.net>
Cc: omniorb-list@omniorb-support.com, omniorb-list-admin@omniorb-support.com
From: baileyk@schneider.com
Date: Mon, 18 Nov 2002 08:23:30 -0600



I think the comment about jdk1.3 refers to the JavaIDL ORB.  The Visibroker
ORB would not necessarily be impacted by that at all.  I don't think the
JavaIDL ORB even supports the INS until j2sdk 1.4.



Kendall



 

                    Heinrich Gotzger

                    <goetzger@gmx.net>                 To:
omniorb-list@omniorb-support.com                              
                    Sent by:                           cc:

                    omniorb-list-admin@omniorb-s       Fax to:

                    upport.com                         Subject:     Re:
[omniORB] java and omniNames                         
 

 

                    11/17/2002 02:45 PM

                    Please respond to Heinrich

                    Gotzger

 

 





On Fri, 15 Nov 2002, Warren Brown wrote:

>It seems that jdk1.3 has a bug in it.
>>From the bug list
>"After digging deeper in the problem (thanks to the "genior" utility
provided
>with omniORB 3.0, I could generate many different kinds of IORs), I
discovered
>that the problem comes from the length of the Object Key ("NameService"),
>whenever the IOR contains an object key which size is not multiple of 4, I
get
>that exception."
>
>It seems that the solution to my problem is either to use jdk1.2.2 or
jdk1.4.

hmm, I'm using Java Visibroker 4.5.1 with JDK 1.3.1_06 under Linux being
served by a C++ Server with omniOrb 4.x using omniNames.

excerpt from my Java client:
[...]
    System.setProperty("ORBInitRef"
,"NameService=corbaname::SERVERHOST:2809");
    System.setProperty("org.omg.CORBA.ORBClass",
"com.inprise.vbroker.orb.ORB");
    System.setProperty("org.omg.CORBA.ORBSingletonClass",
"com.inprise.vbroker.orb.ORBSingleton");

    NamingContextExt nc;

    try {
      // Initialize the ORB.
      orb = ORB.init( (String[])null, System.getProperties() );

      // Obtain the root context.
      nc = NamingContextExtHelper.narrow(
        orb.resolve_initial_references("NameService"));
    } catch (Exception e) {
        e.printStackTrace();
    }
[...]

in ominORB.cfg:
InitRef = NameService=corbaname::SERVERHOST


regards

Heinrich

_______________________________________________
omniORB-list mailing list
omniORB-list@omniorb-support.com
http://www.omniorb-support.com/mailman/listinfo/omniorb-list





--__--__--

Message: 4
Date: Mon, 18 Nov 2002 09:32:56 -0500
From: "Robert E. Gruber" <gruber@research.att.com>
To: julien piaser <jpiaser@ifrance.com>
Cc: <omniorb-list@omniorb-support.com>
Subject: Re: [omniORB] Is OmniNotify alive ?


omniNotify is still alive, although as I posted in
an earlier message I have less time than before to
work on new features.  This may change at some point.
In the near term:

Version 2.0.ALPHA is available for use with omniORB 4.0,
and works fine according to feedback.
I'll be doing the actual 2.0 release soon.

There are a couple of bug fixes that will be coming
out soon and that will be included with the 2.0 release.

-- Bob Gruber
gruber@research.att.com

On Mon, 18 Nov 2002, julien piaser wrote:

> Hi all !
>
> I am planning to develop a corba application that will need a reliable
> notification service. As I usually use omniorb for all my
> developments, I was wondering whether OmniNotify was still alive...
> but couldn't find more information that the one on
> http://www.research.att.com/~ready/omniNotify/index.html. Is it still
> the main site ?
>
> Does anyone know if the version 2.0 is available with omniorb 4.0 ? Is
> the omninotify development stopped ? Should I rather use another
> notification service ?
>
> Thanks,
>
> Julien
>
>
> __________________________________________________
> Modem offert : 150,92 euros rembourses sur le Pack eXtense de Wanadoo !
> Haut debit a partir de 30 euros/mois : http://www.ifrance.com/_reloc/w
>
> _______________________________________________
> omniORB-list mailing list
> omniORB-list@omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list
>


--__--__--

Message: 5
From: "Uli Syber" <uli.syber@schraml.de>
To: omniorb-list@omniorb-support.com
Date: Mon, 18 Nov 2002 15:55:25 +0100
Subject: [omniORB] Multithreading

Hi,

System:
I use omniORB 4.0.0 on a win 32 architecture. My operation system is WIN
2000 and I use VC++ 6.0:

Problem:
I?d like to start an omniORB server in my program as a background thread
(worker thread). Therefore I have tried the following:



#include <windows.h>
#include <windowsx.h>
#include <stdio.h>
////////////////////////////////////////////////////////////////////////////
/////////////////////
class MyClass
{	
	private:			
		CORBA::ORB_var orb;
		static DWORD WINAPI ThreadFunc();
		void startThread();		
		
	public:
		void runORB();

};
////////////////////////////////////////////////////////////////////////////
/////////////////////
void MyClass::runORB()
{	
	try
	{		
		cerr << "Server is running!" << endl;
		orb->run();		
	}
	catch(...)
	{
		cerr << "Caught unknown exception." << endl;
	}	
}
DWORD WINAPI MyClass::ThreadFunc()
{	

	runORB();		//Proplem: Isn?t a static member because auf
orb->run();

	return((DWORD)0);

} 
void MyClass::startThread()
{		
			
	hThread[0] =
CreateThread(NULL,0,MyClass::ThreadFunc,NULL,0,&dwThreadID[0]);		
	WaitForMultipleObjects(	MAX_THREADS,hThread,TRUE,INFINITE);	
	
	printf("Thread is running!");


}

CreateThread(...) need a static function like
MyClass::ThreadFunc().Threrefore must runORB() in ThreadFunc() actually also
a static method.
But in runORB() I call orb->run() witch gets on the heap. I?ve tried to
include CORBA.h to get an instance of ORB_var but it doesn?t work.


Question:
How can I get orb->run() as a background work? 


greetings,
Uli





--__--__--

Message: 6
From: Bastiaan Bakker <Bastiaan.Bakker@lifeline.nl>
To: "'omniorb-list@omniorb-support.com'" <omniorb-list@omniorb-support.com>
Date: 18 Nov 2002 16:41:22 +0100
Subject: [omniORB] patch: support for compilation tuning using enviroment
vars.

Hi, 

Included is a patch against omniORB 4.0.0 which enables tuning of
compilation flags using enviroment variables like CXXFLAGS, etc., as
advertised by ./configure --help.

Duncan, this is a repost of my mail './configure ignores CXXFLAGS, etc.'
of november 5th. Since it wasn't labeled as a patch you may have missed
it. If you haven't missed it but simply don't like it or didn't have
time to look at it, can you acknowledge that? 

Thanks,

Bastiaan Bakker
LifeLine Networks bv

Index: mk/beforeauto.mk.in
===================================================================
RCS file: /opt/cvs/sourceroot/omniorb/omniORB4/mk/beforeauto.mk.in,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 beforeauto.mk.in
--- mk/beforeauto.mk.in 4 Nov 2002 16:32:23 -0000       1.1.1.1
+++ mk/beforeauto.mk.in 4 Nov 2002 23:33:16 -0000
@@ -85,11 +85,11 @@
                    -I$(TOP)/include -I$(BASE_OMNI_TREE)/include \
                    -D__OSVERSION__=@OSVERSION@

-CPPFLAGS = $(DIR_CPPFLAGS) $(IMPORT_CPPFLAGS)
+CPPFLAGS = @CPPFLAGS@ $(DIR_CPPFLAGS) $(IMPORT_CPPFLAGS)

-CFLAGS = $(CDEBUGFLAGS) $(COPTIONS) $(CPPFLAGS)
+CFLAGS = @CFLAGS@ $(CDEBUGFLAGS) $(COPTIONS) $(CPPFLAGS)

-CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(CPPFLAGS)
+CXXFLAGS = @CXXFLAGS@ $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(CPPFLAGS)



############################################################################
#
@@ -694,12 +694,12 @@
 #
 # Default compiler rules
 #
-CDEBUGFLAGS     = -O
+CDEBUGFLAGS     =
 CLINK           = $(CC)
-CLINKOPTIONS    = $(CDEBUGFLAGS) $(COPTIONS)
-CXXDEBUGFLAGS   = -O2
+CLINKOPTIONS    = $(CFLAGS) $(CDEBUGFLAGS) $(COPTIONS)
+CXXDEBUGFLAGS   =
 CXXLINK         = $(CXX)
-CXXLINKOPTIONS  = $(CXXDEBUGFLAGS) $(CXXOPTIONS)
+CXXLINKOPTIONS  = $(CXXFLAGS) $(CXXDEBUGFLAGS) $(CXXOPTIONS)



###########################################################################


   




--__--__--

Message: 7
Subject: Re: [omniORB] Multithreading
To: "Uli Syber" <uli.syber@schraml.de>
Cc: omniorb-list@omniorb-support.com
From: yashik@veon.com
Date: Mon, 18 Nov 2002 17:47:30 +0200


You can not access non static members/methods ('orb' in your case) from a
static method.
You should either make your 'orb' variable static or get an instance of the
Orb from the CORBA::ORB_init method

For example,
class MyClass
{
private:
     static CORBA::ORB_var orb;


     static void runORB() {
          try {
               cerr << "Server is running!" << endl;
               orb->run();
          }
          catch(...) {
               cerr << "Caught unknown exception." << endl;
          }
     }

public:
     static init(int argc,char* argv[]) {
          orb = CORBA::ORB_init(argc,argv,"omniORB3");
      }
     static void MyClass::startThread() {
     ...
     }
};

...
int main(int argc,char* argv[])
{
     MyClass.init(argc,argv);
     MyClass.startThread();
}


another way could be to change your runOrb:
void runORB() {
     try {
          cerr << "Server is running!" << endl;
          int argc = 0;
          CORBA::ORB_var orb = CORBA::ORB_init(argc,NULL,"omniORB3");
          orb->run();
     }
     catch(...) {
          cerr << "Caught unknown exception." << endl;
     }
}

In this case you should first call   CORBA::ORB_init in main with 'real'
parameters.

Also, you can pass the pointer to your instance as a parameter to the
thread function:

void MyClass::startThread() {
     hThread[0] = CreateThread(NULL,0,MyClass::ThreadFunc,(void*)this,0,
&dwThreadID[0]);
     ...
}

DWORD WINAPI MyClass::ThreadFunc(LPVOID p) // should be static
{
     MyClass* self = (MyClass*) p;
     self->runORB();
}

HTH,
Yakov

P.S.
     This is not a compiled solution




 

                    "Uli Syber"

                    <uli.syber@schraml.de>             To:
omniorb-list@omniorb-support.com                                  
                    Sent by:                           cc:

                    omniorb-list-admin@omniorb-s       Subject:
[omniORB] Multithreading                                     
                    upport.com

 

 

                    18/11/2002 16:55

 

 





Hi,

System:
I use omniORB 4.0.0 on a win 32 architecture. My operation system is WIN
2000 and I use VC++ 6.0:

Problem:
I?d like to start an omniORB server in my program as a background thread
(worker thread). Therefore I have tried the following:



#include <windows.h>
#include <windowsx.h>
#include <stdio.h>
////////////////////////////////////////////////////////////////////////////
/////////////////////

class MyClass
{
           private:
                     CORBA::ORB_var orb;
                     static DWORD WINAPI ThreadFunc();
                     void startThread();

           public:
                     void runORB();

};
////////////////////////////////////////////////////////////////////////////
/////////////////////

void MyClass::runORB()
{
           try
           {
                     cerr << "Server is running!" << endl;
                     orb->run();
           }
           catch(...)
           {
                     cerr << "Caught unknown exception." << endl;
           }
}
DWORD WINAPI MyClass::ThreadFunc()
{

           runORB();                      //Proplem: Isn?t a static member
because auf orb->run();

           return((DWORD)0);

}
void MyClass::startThread()
{

           hThread[0] = CreateThread(NULL,0,MyClass::ThreadFunc,NULL,0,
&dwThreadID[0]);
           WaitForMultipleObjects(
MAX_THREADS,hThread,TRUE,INFINITE);

           printf("Thread is running!");


}

CreateThread(...) need a static function like MyClass::ThreadFunc
().Threrefore must runORB() in ThreadFunc() actually also a static method.
But in runORB() I call orb->run() witch gets on the heap. I?ve tried to
include CORBA.h to get an instance of ORB_var but it doesn?t work.


Question:
How can I get orb->run() as a background work?


greetings,
Uli




_______________________________________________
omniORB-list mailing list
omniORB-list@omniorb-support.com
http://www.omniorb-support.com/mailman/listinfo/omniorb-list






--__--__--

Message: 8
Date: Mon, 18 Nov 2002 17:17:03 +0100
From: Thorsten Goertz <thorsten@goertz.com>
To: omniorb-list@omniorb-support.com
Subject: [omniORB] Using omniORB/omniORBpy in Apache Modules

Hello,

I intend to use omniORB in a C++ Module for Apache 1.3.26.
In my first experiments, the module acts as a simple client
ala "Hello World". On Win32, everything works fine. On Linux
(SuSE 8.1) the module gets stuck in "ORB_init". I googled
the Net on this topic and it looks like I'm not the first
with this problem. Unfortunately nobody posted a really
useful answer... Any suggestions?

Regards
Thorsten

--__--__--

Message: 9
Date: Mon, 18 Nov 2002 17:48:22 -0500
From: Ilya Kreyer <ilya@axiomsl.com>
Organization: Axiom Software Laboratories
To: omniorb-list <omniorb-list@omniorb-support.com>
Subject: [omniORB] Problem with oneway methods and omniidl 4.0.0

Hello,
  Recently we stumbled upon a problem with omniidl version 4.0.0 with 
generating proxies for oneway methods. The bug is as follows. Suppose we 
have an idl like this (Foo.idl):
interface Foo
{
     void bar();
     oneway void bar2();
};
  When compiled with omniidl with option -bcxx file FooSK.cc is being 
generated. Here's a couple of lines from there :
--------------------------------------------------------------------------
void _objref_Foo::bar()
{
   _0RL_cd_cf6ba5b8301d1c4e_00000000 
_call_desc(_0RL_lcfn_cf6ba5b8301d1c4e_30000000, "bar", 4);
   _invoke(_call_desc);
}
void _objref_Foo::bar2()
{
   _0RL_cd_cf6ba5b8301d1c4e_00000000 
_call_desc(_0RL_lcfn_cf6ba5b8301d1c4e_30000000, "bar2", 5);
   _invoke(_call_desc);
}
class _0RL_cd_cf6ba5b8301d1c4e_00000000
   : public omniCallDescriptor
{
public:
   inline _0RL_cd_cf6ba5b8301d1c4e_00000000(LocalCallFn lcfn,const char* 
op,size_t oplen,_CORBA_Boolean upcall=0):
      omniCallDescriptor(lcfn, op, oplen, 0, 0, 0, upcall) {}
};
--------------------------------------------------------------------------
  As you can see, both proxy methods use the same invocation class. 
Fourth parameter in call to constructor of omniCallDescriptor (being 
passed 0 in this case) stands for a flag indicating 'onewayness' of a 
method. Therefore, in this case both methods would be treated as not 
being oneway, disregarding oneway declaration for method bar2.
  If we make method bar oneway and method bar2 not oneway as follows:
interface Foo
{
     oneway void bar();
     void bar2();
};
  then the same code would be generated , except 4th parameter in call to
omniCallDescriptor would change to 1 and both methods would behave as 
oneway.
  Even more interestingly, the same would happen even if both methods 
would be in different interfaces like this :
interface Foo
{
     oneway void bar();
};
interface Foo1
{
     void bar2();
};
  Both methods would still be oneway.
  The only way to avoid this behavior is to change a signature of bar2 
or bar in example above , by either adding parameters, or declaring bar2 
as throwing exception or forcing bar2 to return some value. In this case 
  different proxy classes would be generated for both methods and they 
would have correct oneway parameters.
  To sum it all up, for all methods returning void, throwing no 
exceptions with the same arguments only one proxy class is being 
generated by omniidl and oneway attribute of that class would be the 
same as the oneway attribute of the first occurrence of such method in 
.idl file.
  Can anybody else confirm this behavior , I don't know if maybe this 
has been fixed already. Please let me know of all your thoughts/opinions 
on the subject.
         Thanks,
             Ilya Kreyer, Axiom Software Laboratories


--__--__--

Message: 10
From: "Ulf Stoermer" <ulf@emi.yamaha.co.jp>
To: <omniorb-list@omniorb-support.com>
Subject: RE: [omniORB] Multithreading
Date: Tue, 19 Nov 2002 09:46:20 +0900

Hi Uli,

you actually don't need the call to orb->run().
OmniORB is multithreaded anyway and starts it's own
threads to manage requests. Even though orb->run()
is used in all the omni examples it basically just
emulates an idle loop.
So all you need to do is init the ORB and activate
the POA (maybe in your InitInstance function) and
then just run the Windows messages loop.

Cheers

Ulf

> -----Original Message-----
> From: omniorb-list-admin@omniorb-support.com
> [mailto:omniorb-list-admin@omniorb-support.com]On Behalf Of Uli Syber
> Sent: Monday, 18 November 2002 11:55 PM
> To: omniorb-list@omniorb-support.com
> Subject: [omniORB] Multithreading
>
>
> Hi,
>
> System:
> I use omniORB 4.0.0 on a win 32 architecture. My operation system
> is WIN 2000 and I use VC++ 6.0:
>
> Problem:
> I?d like to start an omniORB server in my program as a background
> thread (worker thread). Therefore I have tried the following:
>
>
>
> #include <windows.h>
> #include <windowsx.h>
> #include <stdio.h>
> //////////////////////////////////////////////////////////////////
> ///////////////////////////////
> class MyClass
> {
> 	private:
> 		CORBA::ORB_var orb;
> 		static DWORD WINAPI ThreadFunc();
> 		void startThread();
>
> 	public:
> 		void runORB();
>
> };
> //////////////////////////////////////////////////////////////////
> ///////////////////////////////
> void MyClass::runORB()
> {
> 	try
> 	{
> 		cerr << "Server is running!" << endl;
> 		orb->run();
> 	}
> 	catch(...)
> 	{
> 		cerr << "Caught unknown exception." << endl;
> 	}
> }
> DWORD WINAPI MyClass::ThreadFunc()
> {
>
> 	runORB();		//Proplem: Isn?t a static member
> because auf orb->run();
>
> 	return((DWORD)0);
>
> }
> void MyClass::startThread()
> {
>
> 	hThread[0] =
> CreateThread(NULL,0,MyClass::ThreadFunc,NULL,0,&dwThreadID[0]);
> 	WaitForMultipleObjects(	MAX_THREADS,hThread,TRUE,INFINITE);
>
> 	printf("Thread is running!");
>
>
> }
>
> CreateThread(...) need a static function like
> MyClass::ThreadFunc().Threrefore must runORB() in ThreadFunc()
> actually also a static method.
> But in runORB() I call orb->run() witch gets on the heap. I?ve
> tried to include CORBA.h to get an instance of ORB_var but it
> doesn?t work.
>
>
> Question:
> How can I get orb->run() as a background work?
>
>
> greetings,
> Uli
>
>
>
>
> _______________________________________________
> omniORB-list mailing list
> omniORB-list@omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list
>



--__--__--

_______________________________________________
omniORB-list mailing list
omniORB-list@omniorb-support.com
http://www.omniorb-support.com/mailman/listinfo/omniorb-list


End of omniORB-list Digest