Importing global policiesAdded by IBM on October 1, 2012 | Version 1 (Original)
|You can import the global policies into instances of the Multi-Channel Server (MCS) database.
When you are ready to import the global policies into the MCS database, copy the policy files to your WebSphere
® Portal server and manually import them using the mcsImport
This command is located in the wp_root/wp.mobile/wp.mobile.mcs/repository/bin
directory on the WebSphere
- Run the following command to ensure that the WebSphere environment is set up correctly:
. [[Variable names used in the information center for user supplied informationmpa8|wp_profile_root]]/bin/setupCmdLine.sh
There is a space between the period (.
) and the rest of the command.
[[Variable names used in the information center for user supplied informationmpa8|wp_profile_root]]\bin\setupCmdLine
- Use the appropriate database-specific commands to add the JDBC driver to your current CLASSPATH environment variable, as illustrated in the following examples:
(version 9.1 (with fix pack 5) or 9.5 (with fix pack 3))
® and WebSphere
Portal are not installed on the same machine, specify the path to where the files are located on the WebSphere
- Change your working directory to wp_root/wp.mobile/wp.mobile.mcs/repository/bin.
- To import the updated policies, run the mcsImport command, as in the following example:
mcsImport -vendor database-vendor-type
- database-vendor-type is either db2-type4, oracle, mssql-ms (for Microsoft SQL 2000 or 2008), or mssql-jsql (for Microsoft SQL 2005 or 2008 with the NetDirect JDBC Driver).
- database-hostname is the hostname of the database server for the Multi-Channel Server database
- db-port-number is the port number used by the database driver to access the Multi-Channel Server database
- mcs-database-name is the name of the Multi-Channel Server database. If Oracle Database is being used, this parameter is the Oracle SID.
- db-username is either the user name of the DB2 instance user or the Multi-Channel Server Oracle database user name.
- db-password is the password of the database user.
- theme-names is the filename of one or more files in the following format: theme1.mthm.
- portlet-jdbc-project-name is the portlet application unique id (uid) value from the portlet-app element in the portlet portlet.xml file.
- directory is the path to the directory containing the portlet's policies. This path is wp_profile_root/installedApps/node_name/portlet_WAR_filename portlet_object_id.ear/portlet_WAR_filename.war/mcs-policies.
For a complete list of the command parameters, refer to the topic Importing and exporting repositories
in the Multi-Channel Server portion of this information center.
- Configure the MCS to recognize the global policy project.
To activate this setting, perform the following steps:
- Copy the mcs-config.xml file from the wp_profile_root/installedApps/profile_name/wps.ear/wps.war/WEB-INF directory to the wp_profile_root/PortalServer/wp.mobile/wp.mobile.mcs directory.
- Edit wp_profile_root/PortalServer/wp.mobile/wp.mobile.mcs/mcs-config.xml.
- Add a new project element within the projects element, as in the following example:
- user-friendly-project-name is the project name that portlet developers will use to reference the project policies.
- JDBC-project-name is the project name specified using the -project parameter of the mcsImport command.
- assets_base_url is the context root of your Portal server. By default, wps is used. (Use the same value that appears for other project elements in mcs-config.xml.)
- Save your changes.
After you import the updated global policies and configure the MCS to recognize the global policy project, you will need to run the MCS configuration update process as described in the topic Configuring Multi-Channel Server on WebSphere Portal
Parent topic: Importing policies to the Multi-Channel Server database
Configuring MCS on WebSphere Portal