Skip to main content



      Home
Home » Modeling » EMF » CDO/net4j communication
CDO/net4j communication [message #1783469] Tue, 13 March 2018 09:24 Go to next message
Eclipse UserFriend
Hi,

I'm currently working with CDO service and trying to understand, how server/client communication exactly works.
To be precise, I'm interested in the Signal concept. With the chat example and the help page I got rough overview and on the help page I saw SignalActor/Reactor to sending/receiving Signals. But only SignalReactor is impleneted in chat example.

@Override
protected SignalReactor createSignalReactor(short signalID) {
 [...]
}


Actually (naive) I would also expect SignalActor (to send signals) but it is more complicated than one would have thought.
Is it intentional that you have no direct access to the SignalActor (like SignalReactor)?
Re: CDO/net4j communication [message #1783484 is a reply to message #1783469] Tue, 13 March 2018 10:27 Go to previous messageGo to next message
Eclipse UserFriend
You can send signals as follows:

new Request(protocol, signalID)
  {
    @Override
    protected void requesting(ExtendedDataOutputStream out) throws Exception
    {
       out.writeString(value)
    }
  }.sendAsync();


Or:

boolean result = new RequestWithConfirmation<Boolean>(protocol, signalID)
  {
    @Override
    protected void requesting(ExtendedDataOutputStream out) throws Exception
    {
      out.writeString(value)
    }

    @Override
    protected Boolean confirming(ExtendedDataInputStream in) throws Exception
    {
      return in.readBoolean();
    }
  }.send();

[Updated on: Tue, 13 March 2018 10:30] by Moderator

Re: CDO/net4j communication [message #1783586 is a reply to message #1783484] Wed, 14 March 2018 08:03 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for the incredibly quick response.
What is the best way to work with signals? I'm trying to edit/override ( for example add new column) my data set on the database but I get an RemoteException
org.eclipse.net4j.signal.RemoteException: java.io.IOException: String ID unknown: 8388608

Or maybe the signals are not the right place to start with it?
It seems that the error occurs before signal layer. Or could you give me a tip on which classes I should looking for?
Re: CDO/net4j communication [message #1783783 is a reply to message #1783586] Sat, 17 March 2018 03:09 Go to previous message
Eclipse UserFriend
That exception can be thrown by a StringCompressor instance. The CDO protocol uses a StringCompressor to compress package nsURI strings. Other protocols can use a StringCompressor for their needs, but don't need to. If you're using one in your protocol you must make sure to create a new StringCompressor(false) on the server and a new StringCompressor(true) on the client. You can set a breakpoint on the StringCompressor constructor to see why/where it's created.
Previous Topic:LazyFragmentInitializer in URI
Next Topic:EFactoryImpl.create query
Goto Forum:
  


Current Time: Wed Jul 23 11:04:40 EDT 2025

Powered by FUDForum. Page generated in 0.04784 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top