Datashare not available with ecf.generic.server [message #505296] |
Tue, 29 December 2009 06:28  |
Eclipse User |
|
|
|
Originally posted by: eclipse-ng.tobiasm.de
Hi,
i'm playing around with ECF Datashare to use it in one of our projects.
Based on the sample code i tried this:
IContainerManager containerManager = getContainerManagerService();
//containerType is "ecf.generic.server"
container = containerManager.getContainerFactory().
createContainer(containerType);
channelContainer = (IChannelContainerAdapter)
container.getAdapter(IChannelContainerAdapter.class);
if (channelContainer == null) {
logger.log(Level.SEVERE, "Datashare not supported!");
System.exit(0);
} else {
logChannel = channelContainer.createChannel(getId(LOG_CHANNEL),
logChannelListener, null);
}
Here channelContainer is always null, "Validate Plug-ins" at the
Run-Dialog says everything is ok. I tried -consoleLog and did not see
any errors like missing imported packages and such.
When i change containerType to "ecf.generic.client" it works!?
Any suggestions how i can get it to work with ecf.generic.server?
Thanks
Tobias
|
|
|
Re: Datashare not available with ecf.generic.server [message #505377 is a reply to message #505296] |
Wed, 30 December 2009 01:21  |
Eclipse User |
|
|
|
Tobias Mayer wrote:
> Hi,
>
> i'm playing around with ECF Datashare to use it in one of our projects.
> Based on the sample code i tried this:
>
> IContainerManager containerManager = getContainerManagerService();
>
> //containerType is "ecf.generic.server"
> container = containerManager.getContainerFactory().
> createContainer(containerType);
>
> channelContainer = (IChannelContainerAdapter)
> container.getAdapter(IChannelContainerAdapter.class);
> if (channelContainer == null) {
> logger.log(Level.SEVERE, "Datashare not supported!");
> System.exit(0);
> } else {
> logChannel = channelContainer.createChannel(getId(LOG_CHANNEL),
> logChannelListener, null);
> }
>
>
> Here channelContainer is always null, "Validate Plug-ins" at the
> Run-Dialog says everything is ok. I tried -consoleLog and did not see
> any errors like missing imported packages and such.
> When i change containerType to "ecf.generic.client" it works!?
>
> Any suggestions how i can get it to work with ecf.generic.server?
In the bundle org.eclipse.ecf.provider.datashare is the markup for
adding the datashare container adapter to the generic client. The
markup for adding the generic server has only recently been added (i.e.
on 10/16/09), which is *after* the ECF 3.1 release (this was an
oversight...the ecf.generic.server should also have been added to the
plugin.xml in org.eclipse.ecf.provider.datashare but was accidently
omitted untile 10/16/09). But is is present now, so you can either use
the newer version of the bundle *or* you can create your own bundle with
the following markup in its plugin.xml:
<extension
point="org.eclipse.core.runtime.adapters">
<factory
adaptableType="org.eclipse.ecf.provider.generic.TCPServerSOContainer "
class=" org.eclipse.ecf.provider.datashare.DatashareContainerAdapter Factory ">
<adapter
type="org.eclipse.ecf.datashare.IChannelContainerAdapter"/ >
</factory>
</extension>
If you would like more info on this, or more direction about this
addition, please bring the issue up on the ecf dev mailing list:
ecf-dev at eclipse.org. See
https://dev.eclipse.org/mailman/listinfo/ecf-dev to join the mailing list.
Thanks,
Scott
|
|
|
Re: Datashare not available with ecf.generic.server [message #624989 is a reply to message #505296] |
Wed, 30 December 2009 01:21  |
Eclipse User |
|
|
|
Tobias Mayer wrote:
> Hi,
>
> i'm playing around with ECF Datashare to use it in one of our projects.
> Based on the sample code i tried this:
>
> IContainerManager containerManager = getContainerManagerService();
>
> //containerType is "ecf.generic.server"
> container = containerManager.getContainerFactory().
> createContainer(containerType);
>
> channelContainer = (IChannelContainerAdapter)
> container.getAdapter(IChannelContainerAdapter.class);
> if (channelContainer == null) {
> logger.log(Level.SEVERE, "Datashare not supported!");
> System.exit(0);
> } else {
> logChannel = channelContainer.createChannel(getId(LOG_CHANNEL),
> logChannelListener, null);
> }
>
>
> Here channelContainer is always null, "Validate Plug-ins" at the
> Run-Dialog says everything is ok. I tried -consoleLog and did not see
> any errors like missing imported packages and such.
> When i change containerType to "ecf.generic.client" it works!?
>
> Any suggestions how i can get it to work with ecf.generic.server?
In the bundle org.eclipse.ecf.provider.datashare is the markup for
adding the datashare container adapter to the generic client. The
markup for adding the generic server has only recently been added (i.e.
on 10/16/09), which is *after* the ECF 3.1 release (this was an
oversight...the ecf.generic.server should also have been added to the
plugin.xml in org.eclipse.ecf.provider.datashare but was accidently
omitted untile 10/16/09). But is is present now, so you can either use
the newer version of the bundle *or* you can create your own bundle with
the following markup in its plugin.xml:
<extension
point="org.eclipse.core.runtime.adapters">
<factory
adaptableType="org.eclipse.ecf.provider.generic.TCPServerSOContainer "
class=" org.eclipse.ecf.provider.datashare.DatashareContainerAdapter Factory ">
<adapter
type="org.eclipse.ecf.datashare.IChannelContainerAdapter"/ >
</factory>
</extension>
If you would like more info on this, or more direction about this
addition, please bring the issue up on the ecf dev mailing list:
ecf-dev at eclipse.org. See
https://dev.eclipse.org/mailman/listinfo/ecf-dev to join the mailing list.
Thanks,
Scott
|
|
|
Powered by
FUDForum. Page generated in 0.03336 seconds