I am encountering a problem with Callbacks.
The server side implementation is in VB and the
client side Callback object is implemented in JDK1.3
The interface is like this.
interface Network {
void addListener(in Notifications listener)
throws(ObjectFailure);
}
interface Notifications {
void CreationEvent(in ObjectInfo objectInfo)
throws(ObjectFailure);
}
Notifications interface is implemented on the client
totally in JDK1.3
The client calls the method addListener passing the listener
object which I can see on the server side. But the server
can not identify the client Notification object whenever it has to
call CreationEvent method on it. It always throws some null pointer
exception.
The client implementation is something like this.
NMSEventHandler extends NotificationsImplBase autogenerated by idlj
NMSEventHandler nms_event_handler = new NMSEventHandler(network_id);
orb.connect(nms_event_handler);
// Bind the object reference in naming
byte[] event_handler_name = network_id.networkName[0].id.getBytes();
some_name = new NameComponent[] {new NameComponent(new String(event_handler_name), ""
};
name_context.rebind(some_name, nms_event_handler);
notifications = NotificationsHelper.narrow(nms_event_handler);
notifications.CreationEvent(objectInfo);
and on the server side when this call is made
public class NetworkImpl extends NetworkPOA
{
void addListener(Notifications listener)
{
...
..
listener.CreationEvent(alarmInfo);
Here I get java.lang.nullPointerException
}
I can see this object created by the client in the naming service.
The server side uses the Visibroker name service and osagent.
I hope events sent by Visibroker ORB can be received by other ORBs
like IONA orbix and SUNs.
The server side implementation is in VB and the
client side Callback object is implemented in JDK1.3
The interface is like this.
interface Network {
void addListener(in Notifications listener)
throws(ObjectFailure);
}
interface Notifications {
void CreationEvent(in ObjectInfo objectInfo)
throws(ObjectFailure);
}
Notifications interface is implemented on the client
totally in JDK1.3
The client calls the method addListener passing the listener
object which I can see on the server side. But the server
can not identify the client Notification object whenever it has to
call CreationEvent method on it. It always throws some null pointer
exception.
The client implementation is something like this.
NMSEventHandler extends NotificationsImplBase autogenerated by idlj
NMSEventHandler nms_event_handler = new NMSEventHandler(network_id);
orb.connect(nms_event_handler);
// Bind the object reference in naming
byte[] event_handler_name = network_id.networkName[0].id.getBytes();
some_name = new NameComponent[] {new NameComponent(new String(event_handler_name), ""
name_context.rebind(some_name, nms_event_handler);
notifications = NotificationsHelper.narrow(nms_event_handler);
notifications.CreationEvent(objectInfo);
and on the server side when this call is made
public class NetworkImpl extends NetworkPOA
{
void addListener(Notifications listener)
{
...
..
listener.CreationEvent(alarmInfo);
Here I get java.lang.nullPointerException
}
I can see this object created by the client in the naming service.
The server side uses the Visibroker name service and osagent.
I hope events sent by Visibroker ORB can be received by other ORBs
like IONA orbix and SUNs.