Configure WebSphere Application Server manually
To configure WebSphere Application Server manually, configure variables, custom properties, and class loader policies.
- Find the SOAP port of the deployment manager (WAS ND 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 WAS ND, find the SOAP port of the deployment manager:
- Open the System Administration/dmgr.
- In Additional properties, open Ports.
- Note the value of SOAP_CONNECTOR_ADDRESS. Needed to set the value of the ibm.worklight.admin.jmx.dmgr.port environment entry for the administrative services.
- Review the environment IDs
- Specify an environment ID is optional. However, if we specify an ID, use the same value for each MobileFirst runtime environment managed by the same MobileFirst Server administration component. Moreover, this value must match the environment ID used when the MobileFirst Server administration component is installed. For more information about the ibm.worklight.admin.environmentid JNDI property, see Configure a MobileFirst project in production using JNDI environment entries.
- Log on to theWebSphere Application Server administration console for the MobileFirst Server.
The address is of the form http://server.com:9060/ibm/console, where server is the name of the server.
- Create the MF_HOME variable:
- Click Environment > WebSphere Variables.
- From the Scope list, select Worklight server.
- Click New. The Configuration pane is displayed.
- In the Name field, type MF_HOME.
- In the Value field, type /opt/IBM/Worklight.
- Optional: In the Description field, type a description of the variable.
- Click OK.
- Save the changes.
- Create the MobileFirst shared library definition:
- Click Environment > Shared libraries.
- 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, type ${MF_HOME}/WorklightServer/worklight-jee-library.jar.
- Create the MobileFirst JDBC data source and provider.
See the instructions for the appropriate DBMS in Create the databases manually.
- Add a specific web container custom property.
- Click Servers > Server Types > Application Servers, and select the server for MPF.
- Click Web Container Settings > Web container.
- Click Custom properties.
- Click New.
- Enter the property values listed in the following table.
Property 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.
In the following procedure, when the example uses worklight.war, use the name of the project. for example, myProject.war.
- Depending on the version of WebSphere Application Server, click one of the following options:
- Applications > New > New Enterprise Application
- Applications > New Application > New Enterprise Application
- Navigate to the MobileFirst Server installation directory MF_HOME/WorklightServer.
- Select worklight.war, and then click Next.
- On the "How do 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 context roots for web modules" page.
- In the Context Root field, type /worklight.
- Click Next.
- In Map environment Entries for Web Module, we can assign the JNDI variables according to the 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 WAS ND, 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
- Click Finish.
- Optional: As an alternative to step 6, we can map the shared libraries as follows:
- Click Applications > Application Types > WebSphere enterprise applications > worklight_war.
- 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 Applications > Application Types > WebSphere enterprise applications > worklight_war.
- Click Startup behavior.
- In Startup Order, enter 2.
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 Applications > WebSphere Enterprise Applications.
- 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 Servers > Server Types > Application Servers > Worklight
- 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.
Results
We can now view the runtime component from the MobileFirst Administration Console installed in Install administration services and the operations console. The default URL of the MobileFirst Administration Console is http://server:port/worklightconsole, where server is the host name of the server and port is the port number (default value 9080).
Parent topic: Deploy a project WAR file manually.