You can import the global policies into instances of the Multi-Channel Server (MCS)
database.
About this task
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 command.
Note: This
command is located in the
wp_root/wp.mobile/wp.mobile.mcs/repository/bin directory
on the
WebSphere Portal server.
Procedure
- Run the following command to ensure
that the WebSphere environment is set up correctly:
- 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))
CLASSPATH=db_root/db2instance/sqllib/java/db2jcc.jar:
db_root/db2instance/sqllib/java/db2jcc_license_cu.jar:$CLASSPATH
export CLASSPATH
(version
9.7)
CLASSPATH=db_root/db2instance/sqllib/java/db2jcc4.jar:
db_root/db2instance/sqllib/java/db2jcc_license_cu.jar:$CLASSPATH
export CLASSPATH
Note: If DB2® and WebSphere Portal are
not installed on the same machine, specify the path to where the files
are located on the WebSphere Portal server.
CLASSPATH=oracle_driver_path/ojdbc6.jar:$CLASSPATH
export CLASSPATH
MS SQLCLASSPATH=mssql_driver_path\sqljdbc4.jar:$CLASSPATH
export CLASSPATH
- 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
-host database-hostname
-port db-port-number
-source mcs-database-name
-user db-username
-password db-password
-allcomponents
-theme theme-names
-layout
-updateall
-enableundo
-project portlet-jdbc-project-name
-srcdir directory
where:- 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:
<project name="user-friendly-project-name">
<jdbc-policies name="JDBC-project-name"/>
<assets base-url="/assets_base_url/">
<audio-assets prefix-url="/audio/"/>
<image-assets prefix-url="/images/"/>
<script-assets prefix-url="/scripts/"/>
<text-assets prefix-url="/text/"/>
</assets>
</project>
where:- 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.
What to do next
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.