Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Callback problems on client side

0 views
Skip to first unread message

Gareth Carroll

unread,
Jul 11, 2000, 3:00:00 AM7/11/00
to
Hi,

I am implementing something in CORBA (using VisiBroker) that needs to use
callback objects, but I cannot determine the correct way to pass the object
reference across to the server.

My IDL does not generate any *ImplBase classes using the VisiBroker idl2java
compiler, and most of the examples I see dotted around seem to use those
classes. They also seem to rely on the BOA, which I definately don't want as my
objects have to be portable. Applications written by other people will need to
be able to references my objects.

So does anyone know:

a) Why idl2java doesn't generate any *ImplBase classes?
b) Do I need them anyway?!
c) How I would pass the obect reference (and what would I declare it to be) for
a callback object?

At the moment, my callback object, AppCallImpl, extends one of the generated
classes, _AppCallStub. If I instantiate this object on the client side and
pass it in as a parameter to a method call on an object obtained from the
server, I get this error:

org.omg.CORBA.BAD_OPERATION: The delegate has not been set! minor code: 0
completed: No
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(RuntimeException.java:47)
at org.omg.CORBA.SystemException.<init>(SystemException.java:49)
at org.omg.CORBA.BAD_OPERATION.<init>(BAD_OPERATION.java:70)
at org.omg.CORBA.BAD_OPERATION.<init>(BAD_OPERATION.java:46)
at org.omg.CORBA.portable.ObjectImpl._get_delegate(Compiled Code)
at com.inprise.vbroker.orb.ORB.getDelegate(ORB.java:1121)
at
com.inprise.vbroker.orb.CDROutputStream.write_Object(CDROutputStream.java:3540)
at gccs.ImAppCallHelper.write(ImAppCallHelper.java:126)
at gccs._ImCallControlManagerStub.createCall(Compiled Code)
at client.main(client.java:80)

I don't understand why it needs delegates as its on the client side!

If I change the appCallImpl so that it extends appCallPOA, and pass in
appCallImpl._this(), then I get this error:

org.omg.CORBA.OBJ_ADAPTER: The Servant's Delegate has not been set minor code:
0 completed: No
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.<init>(Compiled Code)
at java.lang.Exception.<init>(Compiled Code)
at java.lang.RuntimeException.<init>(RuntimeException.java:47)
at org.omg.CORBA.SystemException.<init>(SystemException.java:49)
at org.omg.CORBA.OBJ_ADAPTER.<init>(OBJ_ADAPTER.java:70)
at org.omg.CORBA.OBJ_ADAPTER.<init>(OBJ_ADAPTER.java:49)
at org.omg.PortableServer.Servant._get_delegate(Servant.java:13)
at org.omg.PortableServer.Servant._this_object(Servant.java:23)
at gccs.ImAppCallPOA._this(ImAppCallPOA.java:20)
at client.main(client.java:80)


Again it talks about delegates! Does anyone have any ideas about this?


Thanks for any help you can give,

Gareth

Iwan Vosloo

unread,
Jul 12, 2000, 3:00:00 AM7/12/00
to
Gareth,

from an idl interface X, only the following classes are generated when using the
POA:

X
XPOA
XPOATie
XHelper
XHolder
XOperations

I suppose the examples you refer to are still implemented using BOA?

- Iwan Vosloo

Gareth Carroll

unread,
Jul 12, 2000, 3:00:00 AM7/12/00
to
Iwan

> from an idl interface X, only the following classes are generated when using the
> POA:
>
> X
> XPOA
> XPOATie
> XHelper
> XHolder
> XOperations
>
> I suppose the examples you refer to are still implemented using BOA?

That's possibly the case. But I get an error even when I declare the object I
am passing to the server to be of type IpAppCallPOA (which was generated by
idl2java)! As I am new not only to VisiBroker, but also to CORBA, I am not sure
what is the best way around this.

Thanks,

Gareth

Iwan Vosloo

unread,
Jul 13, 2000, 3:00:00 AM7/13/00
to
Gareth Carroll wrote:

Well,

think of your client as being a server. Then you write a servant class extending
IpAppCallPOA and create an instance of it... which you first have to activate on the
correct POA. Then you can use various operations on the POA to map, say, the servant
to an object reference which would be of type IpAppCall. This is the reference you
want to send to the server.

- Iwan Vosloo


0 new messages