Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [higgins-dev] Multiple context types for a context Id and context factory ?

Heya,

Yes you are right, both Context IDs and Context Factories can be associated with more than one Context Type. The IdASRegistry will try to find a matching CP based on those types.

I don't think anyone is using more than one Context Type anywhere, but in theory it could make sense. A while ago the following scenario came up in an IRC discussion:

Let's say you have two different CPs for LDAP. A "main" one and a new, experimental one. Let's call them LDAP-CP and LDAP-CP-DEV. And let's say you have three LDAP contexts A, B and C. You want contexts A and B always to be opened by LDAP-CP. You want context C to be opened by LDAP-CP-DEV, but only if that experimental CP is really installed on a particular system (which might not be the case). So you configure your IdASRegistry like this:

LDAP-CP: $context+ldap
LDAP-CP-DEV: $context+ldap*dev

A: $context+ldap
B: $context+ldap
C: $context+ldap*dev, $context+ldap <--- two here

So context C will be opened with LDAP-CP-DEV, if it's available, otherwise with LDAP-CP.

The IdASRegistry has API methods that return all suitable CPs for a given Context ID.

It all makes a bit more sense if you consider URIs or XRIs as Context IDs instead of using settings in the configuration file. Then the Context Types correspond to the <Type> element(s) in an XRDS document. And since URIs and XRIs are globally resolvable, they may be used as Context IDs by different clients, which may have very different local CP lists.

Markus

On Thu, Jul 17, 2008 at 8:00 PM, Rajalakshmi S Iyer <iyer_rajalakshmi@xxxxxxxxxx> wrote:

Hello,

The 'IdentityAttributeService' section in the configuration file that
points to the IdAS registry typically contains the following sections:

<Setting Name="ContextFactoryInstancesList" Type="htf:list">
     <Setting Name="JNDIContextFactory" Type="htf:map">
           <Setting Name="Instance"
Type="xsd:string">JNDIContextFactory</Setting>
           <Setting Name="ContextTypes" Type="htf:list">
                 <Setting Name="JNDIContextType"
Type="xsd:string">$context+ldap</Setting>
           </Setting>
     </Setting>
</Setting>

<Setting Name="ContextIdsList" Type="htf:list">
     <Setting Name="urn:ldap@ltoyota" Type="htf:map">
           <Setting Name="ContextId"
Type="xsd:string">urn:ldap@ltoyota</Setting>
                 <Setting Name="ContextTypes" Type="htf:list">
                       <Setting Name="JNDIContextType"
Type="xsd:string">$context+ldap</Setting>
                 </Setting>
                 <Setting Name="Connection" Type="htf:map">
                       <Setting Name="Address"
Type="xsd:string">ldap://ltoyota:389</Setting>
                 </Setting>
           </Setting>
     </Setting>
</Setting>

The question here is why does 'ContextTypes' for a context factory or a
context id need to be a list? Does it mean that one context factory or id
could represent more than one context types. A supporting use case for the
decision to use a List here would be of help.

Thanks,
Best regards,
Rajalakshmi Iyer

_______________________________________________
higgins-dev mailing list
higgins-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/higgins-dev


Back to the top