Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Negotiator with different credentials
[CDO] Negotiator with different credentials [message #428982] Mon, 06 April 2009 13:26 Go to next message
Egidijus Vaisnora is currently offline Egidijus VaisnoraFriend
Messages: 47
Registered: July 2009
Member
I am using PasswordCredentialsProvider to connect to CDO server, but I have noticed that user credentials, which I am passing
are set only first time when TCPClientSelector is created (injector set negotiator) and negotiation is triggered only for the
first success. How could I initiate negotiation for another user credentials? One of the way I see, is to create every time
IManagedContainer instance but feel that it is not good solution... Please advice
Re: [CDO] Negotiator with different credentials [message #428991 is a reply to message #428982] Mon, 06 April 2009 14:50 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Egidijus,

Comments below...


Egidijus Vaisnora schrieb:
>
> I am using PasswordCredentialsProvider to connect to CDO server, but I
> have noticed that user credentials, which I am passing are set only
> first time when TCPClientSelector
I suspect you mean a TCPClientConnector ;-)

> is created (injector set negotiator) and negotiation is triggered only
> for the first success.
Yes, currently security is bound to the physical connection.

> How could I initiate negotiation for another user credentials? One of
> the way I see, is to create every time IManagedContainer instance but
> feel that it is not good solution... Please advice
You don't need another managed container, but rather another connector
(possibly in the same container). If you don't need the original
negotiation result anymore you could even try to close the original
connector and re-open with different credentials.

I guess what you really would like to see is negotiation on a
per-CDOSession base. If you're using Net4j (i.e. a CDONet4jSession) to
connect to the CDO repository this would relate to a virtual IChannel.
Both mechanisms, CDOSession-based and IChannel-based negotiation, are
currently not supported out-of-the-box, but could be implemented and
contributed by you. For this purpose the common negotiation framework is
not depending on IConnector as a transport medium. Please let me know if
you need more hints on how to do so.

Cheers
/Eike

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


Re: [CDO] Negotiator with different credentials [message #429049 is a reply to message #428991] Tue, 07 April 2009 07:33 Go to previous messageGo to next message
Egidijus Vaisnora is currently offline Egidijus VaisnoraFriend
Messages: 47
Registered: July 2009
Member
Eike,

Yes, negotiation per session would be what I am looking for, but if you say it is possible to close connection and reopen it -
it should be enough for me at current time.
Perhaps, this issue could be placed in bugzilla as request for enhancement and maybe I (or you;) ) shall implement it for future?
Re: [CDO] Negotiator with different credentials [message #429054 is a reply to message #429049] Tue, 07 April 2009 09:01 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Egidijus Vaisnora schrieb:
> Eike,
>
> Yes, negotiation per session would be what I am looking for, but if
> you say it is possible to close connection and reopen it - it should
> be enough for me at current time.
If not, please file a bugzilla and use new connector instances in the
meantime.

> Perhaps, this issue could be placed in bugzilla as request for
> enhancement and maybe I (or you;) ) shall implement it for future?
An enhancement request would be good!
But you'd need to contribute (incl. tests) to see it happen any time
soon ;-)
We can support you with any sort of information you need...

Cheers
/Eike

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


Re: [CDO] Negotiator with different credentials [message #429298 is a reply to message #429054] Fri, 17 April 2009 13:05 Go to previous messageGo to next message
Egidijus Vaisnora is currently offline Egidijus VaisnoraFriend
Messages: 47
Registered: July 2009
Member
Eike,

It seems that I need several negotiated connection from single client, hence I will stay with idea to recreate
"IManagedContainer" instance each time new user connect. Hope it won't be any pitfall :)
Re: [CDO] Negotiator with different credentials [message #429300 is a reply to message #429298] Fri, 17 April 2009 14:11 Go to previous messageGo to next message
Egidijus Vaisnora is currently offline Egidijus VaisnoraFriend
Messages: 47
Registered: July 2009
Member
Added enhancement for tracking:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=272703
Re: [CDO] Negotiator with different credentials [message #429327 is a reply to message #429298] Mon, 20 April 2009 05:44 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Egidijus,

You don't need another managed container, but rather another connector
(possibly in the same container).

Cheers
/Eike

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



Egidijus Vaisnora schrieb:
> Eike,
>
> It seems that I need several negotiated connection from single
> client, hence I will stay with idea to recreate "IManagedContainer"
> instance each time new user connect. Hope it won't be any pitfall :)


Re: [CDO] Negotiator with different credentials [message #429366 is a reply to message #429327] Tue, 21 April 2009 13:09 Go to previous messageGo to next message
Egidijus Vaisnora is currently offline Egidijus VaisnoraFriend
Messages: 47
Registered: July 2009
Member
> You don't need another managed container, but rather another connector
> (possibly in the same container).

Yes, but there are no way to create two connections having the same server and the same managed container, isn't it? There is
method for creation connector: TCPUtil.getConnector(IManagedContainer container, String hostAddress). Ok, I can use more deeper
method from managed container for setting and removing element (IConnector) after connection established, but actually, these
connections (two or more users) should exist at the same time... Is it ok to have one connector not in container (removed,
because new connection was created) and is it better approach, then creating containers for each connection?

Eike Stepper wrote:
> Egidijus,
>
> You don't need another managed container, but rather another connector
> (possibly in the same container).
>
> Cheers
> /Eike
>
> ----
> http://thegordian.blogspot.com
>
>
>
> Egidijus Vaisnora schrieb:
>> Eike,
>>
>> It seems that I need several negotiated connection from single
>> client, hence I will stay with idea to recreate "IManagedContainer"
>> instance each time new user connect. Hope it won't be any pitfall :)
Re: [CDO] Negotiator with different credentials [message #429501 is a reply to message #429366] Fri, 24 April 2009 09:06 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Egidijus,

Comments below...


Egidijus Vaisnora schrieb:
> > You don't need another managed container, but rather another connector
> > (possibly in the same container).
>
> Yes, but there are no way to create two connections having the same
> server and the same managed container, isn't it? There is method for
> creation connector: TCPUtil.getConnector(IManagedContainer container,
> String hostAddress). Ok, I can use more deeper method from managed
> container for setting and removing element (IConnector) after
> connection established, but actually, these connections (two or more
> users) should exist at the same time...
You only need to register your own IFactory with the container. For
example, give it the type "mytcp" or "authtcp". Then you can specify and
analyze your own description format. This way it's possible to have
multiple connectors to the same target host.

> Is it ok to have one connector not in container (removed, because new
> connection was created) and is it better approach, then creating
> containers for each connection?
IConnectors have no idea of the notion of an IManagedContainer. They
work independent of them. In your application you can combine
container-created connectors with connectors that are created in a
different way. For creating connectors differently you could even reuse
the same dependencies from the container.

Cheers
/Eike

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


>
> Eike Stepper wrote:
>> Egidijus,
>>
>> You don't need another managed container, but rather another connector
>> (possibly in the same container).
>>
>> Cheers
>> /Eike
>>
>> ----
>> http://thegordian.blogspot.com
>>
>>
>>
>> Egidijus Vaisnora schrieb:
>>> Eike,
>>>
>>> It seems that I need several negotiated connection from single
>>> client, hence I will stay with idea to recreate "IManagedContainer"
>>> instance each time new user connect. Hope it won't be any pitfall :)


Re: [CDO] Negotiator with different credentials [message #429610 is a reply to message #429501] Mon, 27 April 2009 14:35 Go to previous messageGo to next message
Egidijus Vaisnora is currently offline Egidijus VaisnoraFriend
Messages: 47
Registered: July 2009
Member
> You only need to register your own IFactory with the container. For
> example, give it the type "mytcp" or "authtcp". Then you can specify and
> analyze your own description format. This way it's possible to have
> multiple connectors to the same target host.

Ok, but TCPClientConnector class is from the internal package... I could create my factory,
but I intend to reuse TCPClientConnector.
Re: [CDO] Negotiator with different credentials [message #429619 is a reply to message #429610] Mon, 27 April 2009 18:51 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Egidijus Vaisnora schrieb:
> > You only need to register your own IFactory with the container. For
> > example, give it the type "mytcp" or "authtcp". Then you can specify
> and
> > analyze your own description format. This way it's possible to have
> > multiple connectors to the same target host.
>
> Ok, but TCPClientConnector class is from the internal package... I
> could create my factory,
> but I intend to reuse TCPClientConnector.
Yeah, that's really a bit unfortunate with all this internal stuff.
We'recurrently discussing to come up with a completely different approach:

268382: Provide new plugin structure with more fine grained components
https://bugs.eclipse.org/bugs/show_bug.cgi?id=268382

Cheers
/Eike

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


Previous Topic:Why emf.Resource doesn't extend IResource ?
Next Topic:[CDO] Change subscriptions on separate thread
Goto Forum:
  


Current Time: Fri Apr 26 14:06:52 GMT 2024

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

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

Back to the top