Virtual member manager is configured to use the dynamic
model. You 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
- Stop the virtual member manager service.
- 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.
Note: 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.
- Open the virtual member manager configuration file (wimconfig.xml)
and make sure the property xsdFileName is the same as the file name
you used in step 2.
<config:dynamicModel xsdFileName="wimextension.xsd"/>
- 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: (http://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="http://www.ibm.com/websphere/wim/ext"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
xmlns:wimext="http://www.ibm.com/websphere/wim/ext"
ecore:package="com.ibm.websphere.wim.model.ext"
xmlns:wim="http://www.ibm.com/websphere/wim">
<xsd:import schemaLocation="wimdatagraph.xsd"
namespace="http://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>
- Modify the code of the custom repository adapter to accept
and understand this new control.
- Restart the virtual member manager service.