one interface, many client, many servant object...?

one interface, many client, many servant object...?

Post by àì1ü? » Wed, 30 Jul 2003 13:19:28



Hello,

It's is the my second project using CORBA with C++.
The first was simple toy project...

But this time is a little big project..

The situation is...

'Log' interface...  and there are many clients accessing Log interface and
using
their own log record with Log interface operation.

 But, when executing server program(activate only one Log interface and
register it in the nameserver)
, then many client program share the interface.

The first client access Log change the inner value of Log, the second client
is influenced using the Log interface by the first client's access to Log
interface.

 I want many different clients be able to access their own Log interface.

Is there any clear, simple way to achieve it? What should I do to do it...

 
 
 

one interface, many client, many servant object...?

Post by Michi Hennin » Wed, 30 Jul 2003 15:10:00



>  I want many different clients be able to access their own Log interface.

> Is there any clear, simple way to achieve it? What should I do to do it...

Instantiate a differenet log servant for each client and give each
client a different object reference. Have a look at Steve's and my book
for lots more info on how to program with CORBA -- I suspect you will
find it useful.

http://www.awprofessional.com/catalog/product.asp?product_id={E405000A-5F7E-420D-84AE-9BCDCD27FEDB}

Cheers,

Michi.

--
Michi Henning                Ph: +61 4 1118-2700
ZeroC, Inc.                  http://www.zeroc.com

 
 
 

one interface, many client, many servant object...?

Post by ??? » Wed, 30 Jul 2003 15:44:42


I'm already have your book... But I have finished reading only the cahpter
6, 7.

Good to see you, Michi Hening
It's honor to receiving reply from the author of the famous CORBA book..
\(^ ^)/

I'm already have it, and reading it.  I suppose the chapter 10. The Portable
Object Adapter is concerned with
the subject.  right?

OK, I'll find the answer in the book.
Thanks.



>  I want many different clients be able to access their own Log interface.

> Is there any clear, simple way to achieve it? What should I do to do it...

Instantiate a differenet log servant for each client and give each
client a different object reference. Have a look at Steve's and my book
for lots more info on how to program with CORBA -- I suspect you will
find it useful.

http://www.awprofessional.com/catalog/product.asp?product_id={E405000A-5F7E-420D-84AE-9BCDCD27FEDB}

Cheers,

Michi.

--
Michi Henning                Ph: +61 4 1118-2700
ZeroC, Inc.                  http://www.zeroc.com

 
 
 

1. Accessing actual servant object from corba interface object

I hope I am using the correct terminology, as I've only been using CORBA and
C++ for a couple of months.

I am creating a CORBA wrapper interface to an existing product API, and I am
not allowed to really change the existing API. Each class in the existing
API is wrapped by it's own new CORBA interface class. In the actual
implementation (servant?) classes I obviously need to implement all of the
methods define in the IDL file. In addition to the IDL methods, I am also
creating some other methods for accessing the delegation classes of the
wrapped API.

My problem is, how can I make use of those accessor methods is my server
implementation, when I am actually passed a pointer to a CORBA interface
object.

E.g.

Class CorbaXXX wraps (delegates to) class ExistingXXX
Class CorbaYYY wraps (delegates to) class ExistingYYY

// C++
class ExistingXXX {
  add(ExistingYYY obj);

// IDL
interface CorbaXXX {
  void add(CorbaYYY obj);

// C++
ExistingYYY* CorbaYYYImpl::getExistingY(){
  return existingY; // existingY is a pointer to an ExistingYYY object
ExistingXXX* CorbaXXXImpl::getExistingX(){
  return existingX; // existingX is a pointer to an ExistingXXX object
void CorbaXXXImpl::add(CorbaYYY_ptr obj) {
  ExistingYYY actual = [what do I do here?]
  getExistingX()->add(actual);

I tried to keep the example short and concise to focus on my problem area.
I'm not sure how to obtain the ExistingYYY object that should (in my
understanding of the way this works) be associated with the CorbaYYY_ptr
object that is passed into the add method of the CorbaXXXImpl class.

Does my explanation make sense, and is what I am trying to do the correct
way of approaching the problem?

Thank you for any feedback,

Russell Dodd

2. ANNOUNCE: Browser based vt100 terminal emulator

3. One servant provides two interfaces

4. Exchange SP3 Upgrade Prob

5. one servant + multiple client

6. purifyeps stalled on win2000

7. Persistent Object Id's after registering objects using Servant Manager

8. mx800 and mx100 epson printers

9. Can client discover objects with specific interface:

10. multiple interfaces, one object

11. One object publishing several interfaces?

12. Advice required for Java RMI client-server interface and server business object design (long post)

13. server and client in one / sharing types between interfaces