Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ice-dev] Enabling ConnectCoreAction

Hello Scott,

Thanks a lot for the files and the description. I will go through them first and I should be able to extract the relevant snippets. I will revert with further questions as well.

Hope you had a good Thanksgiving.

Regards,
Ram

On Thu, Nov 24, 2016 at 12:54 AM Scott Lewis <slewis@xxxxxxxxxxxxx> wrote:
Hi Ram and Jay,

I noticed this too so I just created a RSCoreConnectAction class (based upon your CoreConnectAction class) that uses an EDEF template to connect to and import the ICore remote service.

To create the EDEF template, I added this code to the Core.class in the activator, *before* the ICore remote service is registered (line 257 and 258 on 2.2.1 branch):

        //Setup RSA debug output
        bundleContext.registerService(RemoteServiceAdminListener.class,new DebugRemoteServiceAdminListener(), null);

With this in place, when the ICore remote service is registered in the Core OSGi server the EDEF is output to System.out as below via the DebugRemoteServiceAdminListener. 

Once started on the host, I copied this EDEF and put it in a template file named /edef/rscore.xml inside the org.eclipse.ice.client bundle.   When the RSCoreConnectAction.run() method is invoked...see RSCoreConnectAction.run()...the /edef/rscore.xml is read, the user-provided hostname and port are substituted in the appropriate endpoint description property, and then the RemoteServiceAdmin.importService(endpointDescription) is called to connect to the ICore remote host, and create and register the ICore remote service proxy.  

When this happens (inside the RSA.importService call), the client has an ICore proxy in it's service registry and with DS it will then be automatically injected.  See the class RSCore.bindCore for an example of having the ICore remote service injected by DS.  

I'll be happy to put all this into a single patch, if that's how you would prefer.  Or if you would rather just take the appropriate snippets that would be fine.  Just let me know how you would like to handle.

Note that currently the Core class exports via the ECF generic provider (rather than r-osgi).   It's not a big deal to change both the remote service host and consumer to use either the r-osgi provider, or other providers (e.g. the Jersey Jax-RS provider).

Have a good Thanksgiving.

Scott

EDEF System.out on host when ICore is registered and exported as remote service:
<endpoint-descriptions xmlns="http://www.osgi.org/xmlns/rsa/v1.0.0">
    <endpoint-description>
        <property name="ecf.endpoint.id" value-type="String"
            value="ecftcp://localhost:57072/server" />
        <property name="ecf.endpoint.id.ns" value-type="String"
            value="org.eclipse.ecf.core.identity.StringID" />
        <property name="ecf.endpoint.ts" value-type="Long" value="1479948680285" />
        <property name="ecf.rsvc.id" value-type="Long" value="0" />
        <property name="endpoint.framework.uuid" value-type="String"
            value="e052c618-e0b1-0016-1552-845201c2682d" />
        <property name="endpoint.id" value-type="String"
            value="26d50b6b-bc66-4e04-91cf-dd656c8f7b56" />
        <property name="endpoint.service.id" value-type="Long" value="0" />
        <property name="objectClass" value-type="String">
            <array>
                <value>org.eclipse.ice.core.iCore.ICore</value>
            </array>
        </property>
        <property name="remote.configs.supported" value-type="String">
            <array>
                <value>ecf.generic.server</value>
            </array>
        </property>
        <property name="remote.intents.supported" value-type="String">
            <array>
                <value>passByValue</value>
                <value>exactlyOnce</value>
                <value>ordered</value>
            </array>
        </property>
        <property name="service.imported" value-type="String" value="true" />
        <property name="service.imported.configs" value-type="String">
            <array>
                <value>ecf.generic.server</value>
            </array>
        </property>
    </endpoint-description>
</endpoint-descriptions>


On 11/23/2016 8:05 AM, Ramachandran K. Narayanan wrote:
Hello Jay,

I was looking at enabling ConnectCoreAction locally, based on what we had discussed earlier. I enabled this in ClientActionBarAdvisor.makeActions. This is in turn used by ClientWorkbenchWindowAdvisor.

But this class doesn't seem to be used anywhere else. Any breakpoints within this class are also not hit when I use the product_linux.launch file. Looking in this class further, it almost seems like a separate UI that is launched. Any ideas on how I can take it further?

Thanks,
Ram


--
Ramachandran K. Narayanan
(Ram)
Software Engineer
RNET Technologies Inc.
240 W.Elmwood Drive, Suite 2010
Dayton, OH 45459-4248


_______________________________________________
ice-dev mailing list
ice-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ice-dev


_______________________________________________
ice-dev mailing list
ice-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ice-dev
--
Ramachandran K. Narayanan
(Ram)
Software Engineer
RNET Technologies Inc.
240 W.Elmwood Drive, Suite 2010
Dayton, OH 45459-4248

Back to the top