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 wimextension.xsd file

Virtual member manager is configured to use the 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. The schemas of the new entity types and property types can only be a custom extension XSD file (for example, wimextension.xsd). In the following example to create a new entity type ContactPerson and add a new property type cellPhone to this entity type.


Procedure

  1. Stop the virtual member manager service.

  2. Open the wimextension.xsd file under the VMM_HOME\model directory. If this file does not exist, create a new one with the same or a different 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. Open the virtual member manager configuration file (wimconfig.xml) and ensure that the property, xsdFileName, is same as the file name you used in step 2.
    <config:dynamicModel xsdFileName="wimextension.xsd"/> 
  4. Edit the wimextension.xsd and add the definitions of the new entity types and property types. Ensure that the XSD file is well-formed. Use a different namespace URI than the virtual member manager namespace URI: (//www.ibm.com/websphere/wim).
    <?xml version="1.0" encoding="UTF-8"?>
    <xsd:schema targetNamespace="//www.ibm.com/websphere/wim/ext"
                      xmlns:xsd="//publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/  ://www.w3.org/2001/XMLSchema"
                      xmlns:ecore="//publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/  ://www.eclipse.org/emf/2002/Ecore"
                      xmlns:wimext="//www.ibm.com/websphere/wim/ext"
                      ecore:package="com.ibm.websphere.wim.model.ext"
                      xmlns:wim="//www.ibm.com/websphere/wim">
    <xsd:import schemaLocation="wimdatagraph.xsd"
                namespace="//www.ibm.com/websphere/wim"/>
    <!-- Custom properties -->
    <xsd:element name="cellPhone" type="xsd:string"/>
    <!-- Custom entities -->
    <xsd:complexType name="ContactPerson">
    <xsd:complexContent>
    <xsd:extension base="wim:PersonAccount">
    <xsd:sequence>
    <xsd:element maxOccurs="1" minOccurs="0" ref="wimext:cellPhone"/>
    </xsd:sequence>
    </xsd:extension>
    </xsd:complexContent>
    </xsd:complexType>
    </xsd:schema> 
  5. 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="wimext:ContactPerson">
    
    <config:rdnProperties>uid
    </config:rdnProperties>
    </config:supportedEntityTypes>
    
    <config:repositories xsi:type="config:LdapRepositoryType" ...>
    
    <config:EntityTypesNotAllowDelete>wimext:ContactPerson
    </config:EntityTypesNotAllowDelete>
    
    <config:ldapEntityTypes name="wimext:ContactPerson">
     
    <config:rdnAttributes name="uid"/>  
    <config:objectClasses>eContactPerson
    </config:objectClasses>  
    <config:objectClassesForCreate>eContactPerson
    </config:objectClassesForCreate>  
    <config:objectClassesForCreate>inetOrgPerson
    </config:objectClassesForCreate>
    </config:ldapEntityTypes>
    </config:repositories> 
  6. 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.

  7. Restart the virtual member manager service.

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



+

Search Tips   |   Advanced Search