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 control type at deployment time

Virtual member manager is configured to use the dynamic model. We can create control types at deployment time.


About this task

You need to add new control types at deployment time. The schemas of new control types can only be added to custom extension XSD file (for example, wimextension.xsd). Perform the following:


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. 3. Open the virtual member manager configuration file (wimconfig.xml) and make sure the property “xsdFileName” is same as the file name you used in step 2.
    <config:dynamicModel xsdFileName="wimextension.xsd"/> 
  4. Edit the wimextension.xsd file and add the definitions of the new control 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).

    The following sample wimextension.xsd defines a new control called MyControl. It extends from Control and has a property called MyControlAttr.

    <?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"/>
    <xsd:complexType name="MyControl">
    <xsd:complexContent>
    <xsd:extension base="wim:Control">
    <xsd:attribute name="MyControlAttr" type="xsd:String"/>
    </xsd:extension>
    </xsd:complexContent>
    </xsd:complexType>
    
  5. Modify the code of the custom repository adapter to accept and understand this new control.

  6. Restart the virtual member manager service.

Parent topic: Dynamic model schema loading process



+

Search Tips   |   Advanced Search