Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Does Connector using an user Id have an issue ?
[CDO] Does Connector using an user Id have an issue ? [message #429432] Thu, 23 April 2009 11:09 Go to next message
Stephane  fournier is currently offline Stephane fournierFriend
Messages: 340
Registered: July 2009
Senior Member
Hi,

I would like to identify each connection between CDO clients and a CDO
server.
I've found out the IUserAware interface that is implemented by Connector,
Session... Great !

Here is the code I use to create the IConnector :
IConnector connector = (IConnector)
IPluginContainer.INSTANCE.getElement("org.eclipse.net4j.connectors ",
"tcp", "stephane@localhost:2036");

On client side, the returned connector has its userId member field set to
'stephane', nice !

On server side, the related connector has its userId member field set to
null. :( I was expecting the 'stephane' value.

I'm studying that to be able to retrieve who locks an object for instance.
From a IView, it's easy to retrieve the userId through
IView.getSession().getUserID(). The implementation relies on the fact that
the connector has its userId set to forward this value to the channel at
its creation time.

Do I miss something ? Or is it a bug ?
Let me know if I should file a bugzilla.

Stephane.
Re: [CDO] Does Connector using an user Id have an issue ? [message #429520 is a reply to message #429432] Fri, 24 April 2009 09:53 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Stéphane,

Currently an INegotiator is needed to transport the userID (possibly
together with other credentials information) to the server. If there is
none for a connector, then the userID is ignored.

We should address this issue by either:

1) Throw an exception if a userID is set locally, but no negotiator

2) Make the connector transport the userID himself if no negotiator is
configured. Maybe we should also remember some flag that these userIDs
are somewhat "weaker" than those of negotiated credentials...

Please feel free to file a Bugzilla for your preference.

Cheers
/Eike

----
http://thegordian.blogspot.com



Cheers
/Eike

----
http://thegordian.blogspot.com



Stéphane Fournier schrieb:
> Hi,
>
> I would like to identify each connection between CDO clients and a CDO
> server.
> I've found out the IUserAware interface that is implemented by
> Connector, Session... Great !
>
> Here is the code I use to create the IConnector :
> IConnector connector = (IConnector)
> IPluginContainer.INSTANCE.getElement("org.eclipse.net4j.connectors ",
> "tcp", "stephane@localhost:2036");
>
> On client side, the returned connector has its userId member field set
> to 'stephane', nice !
>
> On server side, the related connector has its userId member field set
> to null. :( I was expecting the 'stephane' value.
>
> I'm studying that to be able to retrieve who locks an object for
> instance. From a IView, it's easy to retrieve the userId through
> IView.getSession().getUserID(). The implementation relies on the fact
> that the connector has its userId set to forward this value to the
> channel at its creation time.
>
> Do I miss something ? Or is it a bug ?
> Let me know if I should file a bugzilla.
>
> Stephane.
>
>
>
>
>
>
>
>


Re: [CDO] Does Connector using an user Id have an issue ? [message #429527 is a reply to message #429520] Fri, 24 April 2009 10:06 Go to previous message
Stephane  fournier is currently offline Stephane fournierFriend
Messages: 340
Registered: July 2009
Senior Member
Hi Eike,

In the meantime, I've found the INegociator API but I'm facing a NPE
problem in using it (see post
http://www.eclipse.org/newsportal/article.php?id=41212&g roup=eclipse.tools.emf#41212).

Option 1) suits the need.
I've filed a bugzilla https://bugs.eclipse.org/bugs/show_bug.cgi?id=273568

Stephane.

Eike Stepper wrote:

> Stéphane,

> Currently an INegotiator is needed to transport the userID (possibly
> together with other credentials information) to the server. If there is
> none for a connector, then the userID is ignored.

> We should address this issue by either:

> 1) Throw an exception if a userID is set locally, but no negotiator

> 2) Make the connector transport the userID himself if no negotiator is
> configured. Maybe we should also remember some flag that these userIDs
> are somewhat "weaker" than those of negotiated credentials...

> Please feel free to file a Bugzilla for your preference.

> Cheers
> /Eike

> ----
> http://thegordian.blogspot.com



> Cheers
> /Eike

> ----
> http://thegordian.blogspot.com



> Stéphane Fournier schrieb:
>> Hi,
>>
>> I would like to identify each connection between CDO clients and a CDO
>> server.
>> I've found out the IUserAware interface that is implemented by
>> Connector, Session... Great !
>>
>> Here is the code I use to create the IConnector :
>> IConnector connector = (IConnector)
>> IPluginContainer.INSTANCE.getElement("org.eclipse.net4j.connectors ",
>> "tcp", "stephane@localhost:2036");
>>
>> On client side, the returned connector has its userId member field set
>> to 'stephane', nice !
>>
>> On server side, the related connector has its userId member field set
>> to null. :( I was expecting the 'stephane' value.
>>
>> I'm studying that to be able to retrieve who locks an object for
>> instance. From a IView, it's easy to retrieve the userId through
>> IView.getSession().getUserID(). The implementation relies on the fact
>> that the connector has its userId set to forward this value to the
>> channel at its creation time.
>>
>> Do I miss something ? Or is it a bug ?
>> Let me know if I should file a bugzilla.
>>
>> Stephane.
>>
>>
>>
>>
>>
>>
>>
>>
Previous Topic:[CDO/TENEO] Problems running up server.
Next Topic:Merge Multiple Models
Goto Forum:
  


Current Time: Fri Apr 26 08:33:47 GMT 2024

Powered by FUDForum. Page generated in 0.04078 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top