Home » Modeling » EMF » [CDO] Negotiator with different credentials
|
Re: [CDO] Negotiator with different credentials [message #428991 is a reply to message #428982] |
Mon, 06 April 2009 14:50 |
|
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
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
| | | | | |
Re: [CDO] Negotiator with different credentials [message #429366 is a reply to message #429327] |
Tue, 21 April 2009 13:09 |
Egidijus Vaisnora 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 |
|
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 :)
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
| | |
Goto Forum:
Current Time: Fri Apr 26 14:06:52 GMT 2024
Powered by FUDForum. Page generated in 0.03407 seconds
|