To configure WebSphere® Application Server manually,
you must configure variables, custom properties, and class loader
policies.
Before you begin
See Planning deployment of administration components and runtimes for
the supported deployment topologies.
If you
use Cloudant® via https
as a database, and WebSphere Application Server full
profile as an application server, declare the Cloudant signer certificate, as described
in Configuring WebSphere Application Server for
use with Cloudant.
- Find the SOAP port of the deployment manager (WebSphere Application Server Network Deployment only)
- These instructions assume that a stand-alone profile exists with
an application server named "Worklight" and that the server is using
the default ports.
For
WebSphere Application Server Network Deployment,
find the SOAP port of the deployment manager:
- Open the System Administration/Deployment manager.
- In Additional properties, open Ports.
- Note the value of SOAP_CONNECTOR_ADDRESS.
This value is needed to set the value of the ibm.worklight.admin.jmx.dmgr.port environment
entry for the MobileFirst Administration
Services.
- Review the environment IDs
- Specifying an environment ID is optional. However, if you specify
an ID, use the same value for each MobileFirst runtime
environment that is managed by the same MobileFirst Server administration
component. Moreover, this value must match the environment ID that
is used when the MobileFirst Server administration
component is installed. For more information about the ibm.worklight.admin.environmentid JNDI
property, see JNDI environment entries for MobileFirst projects in production.
Note: If you use
WebSphere Application Server V7.0,
you must add the configuration property
"com.ibm.ws.webcontainer.invokerequestlistenerforfilter
= true". For more information about how to add this property,
see
Configuring WebSphere Application Server V7.0.
Procedure
- Determine a suitable file name for the MobileFirst shared
library in the WebSphere Application Server installation
directory.
- For a standalone server, you can use a file name such as WAS_INSTALL_DIR/optionalLibraries/IBM/project-name/worklight-jee-library.jar.
- For deployment to a WebSphere Application Server Network
Deployment cell, use WAS_INSTALL_DIR/profiles/profile-name/config/cells/cell-name/project-name/worklight-jee-library.jar.
- For deployment to a WebSphere Application Server Network
Deployment cluster, use WAS_INSTALL_DIR/profiles/profile-name/config/cells/cell-name/clusters/cluster-name/project-name/worklight-jee-library.jar.
- For deployment to a WebSphere Application Server Network
Deployment node, use WAS_INSTALL_DIR/profiles/profile-name/config/cells/cell-name/nodes/node-name/project-name/worklight-jee-library.jar.
- For deployment to a WebSphere Application Server Network
Deployment server, use WAS_INSTALL_DIR/profiles/profile-name/config/cells/cell-name/nodes/node-name/servers/server-name/project-name/worklight-jee-library.jar.
If the directory does not exist, you must create it.
- Copy the file product_install_dir/WorklightServer/worklight-jee-library.jar to
the location that you determined in step 1.
- Log on to theWebSphere Application Server administration
console for your MobileFirst Server.
The address is of the form http://server.com:9060/ibm/console,
where server is the name of the server.
- Create the MobileFirst shared
library definition:
- Click .
- From the Scope list, select Worklight
server.
- Click New. The
Configuration pane is displayed.
- In the Name field, type WL_PLATFORM_LIB.
- Optional: In the Description field,
type a description of the library.
- In the Classpath field, enter
the file name that you determined in step 1, replacing WAS_INSTALL_DIR/profiles/profile-name with
the WebSphere Application Server variable
reference ${USER_INSTALL_ROOT}.
- In Class Loading, select the
check box Use an isolated class loader for this shared
library.
- Create the MobileFirst JDBC
data source and provider.
Note: You do not need to perform
this step if you use Cloudant as
a database.
See the instructions for the
appropriate DBMS in Creating and configuring the databases manually.
- Add a specific web container custom property.
- Click , and select the server for IBM MobileFirst Platform Foundation.
- Click .
- Click Custom properties.
- Click New.
- Enter the property values listed in the following table.
Table 1. Values for the web container custom propertyProperty |
Value |
Name |
com.ibm.ws.webcontainer.invokeFlushAfterService |
Value |
false |
Description |
See http://www.ibm.com/support/docview.wss?uid=swg1PM50111 |
- Click OK.
- Click Save.
- Install a MobileFirst project
WAR file.
Note: In the following procedure, when the
example uses worklight.war, use the name of your MobileFirst project,
for example, myProject.war.
- Depending on your version of WebSphere Application Server,
click one of the following options:
- Navigate to the MobileFirst Server installation
directory product_install_dir/WorklightServer.
- Select worklight.war, and then
click Next.
- On the "How do you want to install the application?" page,
select Detailed, and then click Next.
- On the Application Security Warnings page,
click Continue.
- Click Continue repeatedly until
you reach Step 4 of the wizard: Map Shared Libraries.
- Select Select for worklight_war and
click Reference shared libraries.
- From the Available list, select WL_PLATFORM_LIB and
click >.
- Click OK.
- Click Next until you reach the "Map
resource references to resources" page.
- If you use a relational database, enter the JNDI name
you created in step 5 for the jdbc/WorklightDS data
source.
- You must also enter a default data source in the following
cases:
- You do not use the reports database, whose resource reference
is jdbc/WorklightReportsDS. The reports database
is not used by default. For more information, see (deprecated) Reports database.
- You do not need any relational database because you use Cloudant. The data source is
not used in this case.
To enter a default data source, enter DefaultDatasource in
the Target Resource JNDI Name field. If the DefaultDatasource does
not exist in your application server, a message displays Application
Resource Warning when you quit the page. Ignore the warning
and click Continue.
- Click Next until you reach the "Map
context roots for web modules" page.
- In the Context Root field, type /worklight.
- Click Next.
- In Map environment Entries for Web Module,
you can assign the JNDI variables according to your configuration.
- Set the variable ibm.worklight.topology.platform to WAS
- Set the variable ibm.worklight.admin.jmx.connector to SOAP
- If the environment ID is set for the Administration Services,
set the variable ibm.worklight.admin.environmentid to
the same value.
- On a stand-alone WebSphere Application Server,
set the value of ibm.worklight.topology.clustermode to Standalone
- On WebSphere Application Server Network Deployment,
set the variables as follows:
- ibm.worklight.topology.clustermode: Cluster
- ibm.worklight.admin.jmx.dmgr.host:
the host name of the deployment manager
- ibm.worklight.admin.jmx.dmgr.port:
the SOAP port of the deployment manager
- If you want to use Cloudant as
the database for the MobileFirst runtime,
set the variables as follows:
- mfp.db.cloudant.url: the URL to connect to Cloudant
- mfp.db.cloudant.username: the Cloudant account user name
- mfp.db.cloudant.password: the Cloudant account password
Notes: - If this user is not allowed to create a database, you must create
a database manually with the names that are documented in Creating the Cloudant database.
- Each project that uses Cloudant as
a database must have its own database. By default, the database includes
the project name. But if several teams use the same Cloudant database with projects that have
same names, add the JNDI property mfp.db.cloudant.dbNamePrefix to
distinguish the projects.
Important: The Cloudant database name must start with a
lowercase letter, and can contain only lowercase characters (a-z),
digits (0-9), and any of the following characters:
_,
$,
-.
The
value that you specify for the variable mfp.db.cloudant.dbNamePrefix must
comply with this rule.
- If you installed MobileFirst Operational
Analytics,
and you want it to collect data from the MobileFirst runtime,
set the variables as follows:
- wl.analytics.url is the URL to connect to a server
where MobileFirst Operational
Analytics Services
is installed.
- wl.analytics.console.url is the URL to connect
to a server where MobileFirst Operational
Analytics Console
is installed.
- wl.analytics.username is the user name used for
a basic authentication to access the URL that you entered in wl.analytics.url.
- wl.analytics.password is the password for the
user that you entered in wl.analytics.username.
Note: The user name and password that you provide in wl.analytics.username and wl.analytics.password must
match the credentials of the user that you defined in the server where MobileFirst Operational
Analytics is
installed.
- Click Finish.
- Optional: As an alternative to step 6, you can map the shared libraries
as follows:
- Click .
- In the References section, click Shared library
references.
- Select Select for worklight_war and
click Reference shared libraries.
- From the Available list, select WL_PLATFORM_LIB and
click >.
- Click OK twice to return to the worklight_war configuration
page.
- Click the Save link.
- Define the startup behavior.
- Click .
- Click Startup behavior.
- In Startup Order, enter 2.
Note: The MobileFirst Administration
service must already be available when the MobileFirst runtime
starts.
- Configure the class loader policies and then start the
application:
- Click the Manage Applications link,
or click .
- From the list of applications, click worklight_war.
- In the Detail Properties section, click
the Class loading and update detection link.
- In the Class loader order pane, click Classes
loaded with local class loader first (parent last).
- Click OK.
- In the Modules section, click Manage Modules.
- From the list of modules, click the MobileFirst module.
- In the Class loader order pane, click Classes
loaded with local class loader first (parent last).
- Click OK twice.
- Click Save.
- Select Select for worklight_war and
click Start.
- Review the server class loader policy: Click
- If the class loader policy is set to Multiple,
do nothing.
- If the class loader policy is set to Single and
the class loading mode is set to parent-last,
do nothing.
- If the class loader policy is set to Single and
the class loading mode is set to parent-first,
change the class loader policy to Multiple,
and set the class loader order of all applications other than MobileFirst applications
to parent-first.
- For WebSphere Application Server Network
Deployment, click , select the nodes, and
click Full Synchronize.
Results
You can now view the runtime component from the MobileFirst Administration
Console that is installed in Installing the MobileFirst Server administration. The default
URL of the MobileFirst Administration
Console is http://<server>:<port>/worklightconsole,
where server is the host name
of your server and port is the
port number (default value 9080).