Home Help Center

indirect reference to use Plugin

GreenhippoGreenhippo Member AlexOrganization: University of AucklandProject: Intelligent Middleware ✭✭
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

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    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.
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    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.
  • GreenhippoGreenhippo Member AlexOrganization: University of AucklandProject: Intelligent Middleware ✭✭
    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
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    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.
  • GreenhippoGreenhippo Member AlexOrganization: University of AucklandProject: Intelligent Middleware ✭✭
    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
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Yes, it should work if you implement your transport plugin in Java and load it with the GUI.

    Cheers,
    Benoit.
  • GreenhippoGreenhippo Member AlexOrganization: University of AucklandProject: Intelligent Middleware ✭✭
    This may sound like a dumb question, but how do you tell the gui to load it :confused:
  • bernardbernard Jupiter, FLAdministrators, ZeroC Staff Bernard NormierOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    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
Sign In or Register to comment.