Archived

This forum has been archived. Please start a new discussion on GitHub.

indirect reference to use Plugin

Hi,

I am currently playing around with with ice's plugins for creating different protocols. As a starter ive made the plugin simply use tcpEndpointFactory (which i had to copy the source code) and changed the protocol() method to return "myProtocol". And in my icegrid descriptor i set endpoints="myProtocol"

The problem im having is that my adapter keeps publishing his endpoints as tcp rather than myProtocol and everything that gets its reference from the registry doesnt use myProtocol.

Is there something else i need to set to get this to work properly?

Comments

  • benoit
    benoit Rennes, France
    Hi,

    Changing the endpoints attribue of the <adapter> element and updating your application should be enough. Did you first try your plugin in with an IceGrid deployment?

    Cheers,
    Benoit.
  • benoit
    benoit Rennes, France
    benoit wrote: »
    Did you first try your plugin in with an IceGrid deployment?

    Sorry, I meant WITHOUT an IceGrid deployment, not with ;) (you could for instance try it with our hello world demo from the demo/Ice/hello directory).

    Cheers,
    Benoit.
  • Ive just tried it on the hello world demo and the println's i put in the transceivers read and write are spamming appropriately.

    However when i use it with the icegrid it only seems to use it on the server end, i dont get any println spam on the client end. It appears the client are still using tcp while the server is using myProtocol, but as they are identical at the moment there are no issues

    The client is getting the endpoints from dynamically created replica groups and from the looks of the icegridGUI the server is publishing its endpoints as tcp, how do i make it publish them as myProtocol
  • benoit
    benoit Rennes, France
    Changing the endpoints attribute in the XML descriptor or in the GUI should be enough (unless you also set the PublishedEndpoints property, in which case you would also have to change this property).

    Did you set a unique type value for your new endpoint? I would expect the behavior you're describing if the type() method of your endpoint returns the same value as our TCP endpoint.

    Cheers,
    Benoit.
  • Thanks, Changing the type value seemed to get it working :D

    I had tried that previously but it sets the endpoint fields in the icegridGUI as blank so didnt actually go through with trying to connect to it. Is there anyway to make it show something in the endpoint feilds?, would be nice for debugging purposes
  • benoit
    benoit Rennes, France
    Yes, it should work if you implement your transport plugin in Java and load it with the GUI.

    Cheers,
    Benoit.
  • This may sound like a dumb question, but how do you tell the gui to load it :confused:
  • bernard
    bernard Jupiter, FL
    The GUI is just a regular Ice/Java application: you can pass it command-line arguments or an Ice config file.

    You could use:
    java -ea -cp:/usr/lib/Ice-3.1.1/IceGridGUI.jar:/home/Greenhippo/MyTransportPlugin.jar IceGridGUI.Main --Ice.Config=config

    Cheers,
    Bernard