[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ecf-dev] Intermittent adapter problems
|
Hi Thomas,
Thanks for letting me/us know. I suspect that there is some potential
race in the initialization of the adapter manager...and your sync
eliminates it.
Scott
Thomas Hallgren wrote:
Hi Scott,
We added synchronization around the
getAdapter(IRetrieveFileTransferContainerAdapter.class) call.
Apparently that helps in our case and everything is stable now. I'm
not sure why but I though I'd tell you anyway.
Regards,
Thomas Hallgren
Scott Lewis wrote:
Hi Thomas,
Thomas Hallgren wrote:
<stuff deleted>
Intermittently, and so far seemingly without any pattern, when get a
null value at times when other code in this bundle call the
createRetrieveFileTransfer() method.
So far I've been unable to find the reason. Have you seen anything
like this before?
No, not really.
Do you have any ideas what could be causing this?
One thought is that perhaps it's the platform IAdapterManager service
not getting initialized for some reason. (i.e. environment, start
sequence, or ?) Because the BaseContainer returned from
createContainer() has this as it's impl of getAdapter:
public Object getAdapter(Class serviceType) {
if (serviceType == null)
return null;
if (serviceType.isInstance(this)) {
return this;
}
IAdapterManager adapterManager =
ECFPlugin.getDefault().getAdapterManager();
return (adapterManager == null) ? null :
adapterManager.loadAdapter(this, serviceType.getName());
}
For the file transfer provider an adapter manager is registered with
the platform via this markup:
<extension
point="org.eclipse.core.runtime.adapters">
<factory
adaptableType="org.eclipse.ecf.core.BaseContainer"
class="org.eclipse.ecf.provider.filetransfer.retrieve.MultiProtocolRetrieveAdapterFactory">
<adapter
type="org.eclipse.ecf.filetransfer.IRetrieveFileTransferContainerAdapter"/>
</factory>
</extension>
If, for whatever reason the adapterManager is not initialized then
the getAdapterManager would return null. Is there possibly some race
condition in the initialization of the platform adapter manager?
What version of Eclipse are you using? I think I recall something
about Eclipse 3.3 platform having a bug in adapter manager
initialization, but I can't recall/find the bug at the moment. (but
of course if this is Eclipse 3.4 then this is not what's going on).
Scott
Thanks,
Thomas Hallgren
_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ecf-dev
_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ecf-dev
_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ecf-dev