Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » CDO/net4j communication
CDO/net4j communication [message #1783469] Tue, 13 March 2018 13:24 Go to next message
Reiner Wahnsinn is currently offline Reiner WahnsinnFriend
Messages: 2
Registered: March 2018
Junior Member
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 14:27 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6394
Registered: July 2009
Senior Member
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 14:30]

Report message to a moderator

Re: CDO/net4j communication [message #1783586 is a reply to message #1783484] Wed, 14 March 2018 12:03 Go to previous messageGo to next message
Reiner Wahnsinn is currently offline Reiner WahnsinnFriend
Messages: 2
Registered: March 2018
Junior Member
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 07:09 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6394
Registered: July 2009
Senior Member
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: Thu Sep 20 19:08:41 GMT 2018

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

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

Back to the top