Express (Distributed operating systems), v8.0 > Secure applications and their environment > Authenticate users > Select a registry or repository > Manage realms in a federated repository > Virtual member manager > Develop with virtual member manager > Extend virtual member manager functionality in the application > Dynamic model schema loading process > Dynamic model: adding new entities and properties at deployment time


Dynamic model: adding new entities and properties at deployment time using the wimxmlextension.xml file

Virtual member manager is configured to use dynamic model. We can create new entity types and their associated new property types at deployment time.


About this task

You need to add new entity types and their associated new property types. In this examples you are going to create a new entity type, ContactPerson, and add a new property type, cellPhone, to this entity type. You are going to define the schemas of the new entity types and property types in the wimxmlextension.xml file.


Procedure

  1. Stop the virtual member manager service.

  2. Open the wimxmlextension.xml file under the VMM_HOME\model directory. If this file does not exist, create a new one with the same name.

    VMM_HOME is the directory where the virtual member manager files are located. This location is set to either the system property wim.home or user.install.root/config/cells/local.cell/wim.

  3. Edit the wimxmlextension.xml file and add the definitions of the new entity types and property types. Make sure the XML is well-formed and confirm to schema defined in wimschema.xsd.

    For example, the following sample defines a new entity type ContactPerson and a new property type called cellPhone and adds this property type to the new entity type ContactPerson:

    <?xml version="1.0" encoding="UTF-8"?>
    <sdo:datagraph xmlns:sdo="commonj.sdo"
        xmlns:wim="//www.ibm.com/websphere/wim">
    <wim:schema>
    <wim:entitySchema nsPrefix="yourext"
                          nsURI="//publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/  ://www.yourco.com/wim/yourext"
            entityName="ContactPerson" parentEntityName="PersonAccount"/>
    <wim:propertySchema nsURI="//publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/  ://www.yourco.com/yourext"
                            dataType="STRING"
                            multiValued="true"
                            propertyName="cellPhone">
    <wim:applicableEntityTypeNames>ContactPerson
    </wim:applicableEntityTypeNames>
    <wim:metaData name="repositoryPropertyName"
                       value="cellularTelephoneNumber"/>
    </wim:propertySchema>
    </wim:schema>
    </sdo:datagraph> 

    For more information about using the propertySchema and extensionPropertySchema data objects, see the section, Extend property schema in the topic, Program prerequisites. Also read about Configure a property extension repository in a federated repository in the WebSphere Application Server information center.

  4. Manually add the new entity types to the virtual member manager configuration file (wimconfig.xml).
    <config:supportedEntityTypes defaultParent="cn=users,dc=yourco,dc=com"
        name="yourext:ContactPerson">
    
    <config:rdnProperties>uid
    </config:rdnProperties>
    </config:supportedEntityTypes>
    
    <config:repositories xsi:type="config:LdapRepositoryType" ...>
    
    <config:EntityTypesNotAllowDelete>yourext:ContactPerson
    </config:EntityTypesNotAllowDelete>
    
    <config:ldapEntityTypes name="yourext:ContactPerson">
     
    <config:rdnAttributes name="uid"/>  
    <config:objectClasses>eContactPerson
    </config:objectClasses>  
    <config:objectClassesForCreate>eContactPerson
    </config:objectClassesForCreate>  
    <config:objectClassesForCreate>inetOrgPerson
    </config:objectClassesForCreate>
    </config:ldapEntityTypes>
    </config:repositories> 
  5. Manually add the new property types to each repository adapter.

    LDAP adapter

    Add the mapping of the new property types to LDAP attributes to the wimconfig.xml configuration file.

    DB adapter

    Add the definition of the new property types to the property XML file of DB Adapter (wimDBProperties.xml) and run DB property loader.

  6. Restart the virtual member manager service.

Parent topic: Dynamic model: adding new entities and properties at deployment time



+

Search Tips   |   Advanced Search