CORBA problems
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Derelict_pt
Posted On:   Monday, November 21, 2005 04:44 PM

Greetings, I hope I'm posting on the right section :) I'm new to ORBacus with Java and I'm having a problem when trying to use the Event Service. I have this pull client: (...) Any event=null; EventChannel eventChannel=null; ConsumerAdmin consumerAdmin=null; ProxyPullSupplier pullSupplier=null; try{ eventChannel = EventChannelHelper.narrow(obj); consumerAdmin = eventChannel.for_consumers(); pullSupplier = consumerAdmin.obtain_pull_supplier(); // I need to do this to bind proxy to the Event Stream, correct? // The problem is on the parameter it takes, a PullConsumer pullSupplier.connect_pull_consumer( new MOTDPullCo   More>>

Greetings,

I hope I'm posting on the right section :)
I'm new to ORBacus with Java and I'm having a problem when trying to use the Event Service.

I have this pull client:

			
(...)
Any event=null;
EventChannel eventChannel=null;
ConsumerAdmin consumerAdmin=null;
ProxyPullSupplier pullSupplier=null;
try{
eventChannel = EventChannelHelper.narrow(obj);
consumerAdmin = eventChannel.for_consumers();
pullSupplier = consumerAdmin.obtain_pull_supplier();

// I need to do this to bind proxy to the Event Stream, correct?
// The problem is on the parameter it takes, a PullConsumer
pullSupplier.connect_pull_consumer( new MOTDPullConsumer() );

event = pullSupplier.pull();
}(...)



So i'm actually having problems implementing the PullConsumer interface:

			
import org.omg.CORBA.*;
import org.omg.CosEventChannelAdmin.*;
import org.omg.CosEventComm.*
public class MOTDPullConsumer implements PullConsumer{

public void disconnect_pull_consumer(){
System.out.println("Pull consumer off!");
}
}




This causes a compilation error which I can't determine why, the interface only specifies the method implemented above:


MOTDPullConsumer is not abstract and does not override abstract method_create_request(org.omg.CORBA.Context,java.lang.String,
org.omg.CORBA.NVList,org.omg.CORBA.NamedValue,
org.omg.CORBA.ExceptionList,org.omg.CORBA.ContextList)
in org.omg.CORBA.Object


Anyone seen this happen before?    <<Less

Re: CORBA problems

Posted By:   Derelict_pt  
Posted On:   Thursday, November 24, 2005 07:57 AM

I solved it by passing null to connect_pull_consumer():


try{
eventChannel = EventChannelHelper.narrow(obj);
consumerAdmin = eventChannel.for_consumers();
pullSupplier = consumerAdmin.obtain_pull_supplier();

pullSupplier.connect_pull_consumer( null );

event = pullSupplier.pull();
}(...)





And did the same to connect_push_supplier() on the server side - it's all working OK now. Here are two fine links on this matter, if anyone ever needs it:

http://www.iona.com/support/docs/orbix2000/2.0/pguide_cpp/html/Events4.html#151985
http://www.iona.com/support/docs/manuals/orbix/33/html/orbixevents33_pguide/PullModel.html

Re: CORBA problems

Posted By:   Anonymous  
Posted On:   Tuesday, November 22, 2005 12:12 AM

Greetings, I hope I'm posting on the right section :) I'm new to ORBacus with Java and I'm having a problem when trying to use the Event Service.

This is more of an ORBacus implementation issue, have you tried their listserver?
About | Sitemap | Contact