mobile web applications(mwa)

41
Mobile Web Applications(MWA) By Gayathri.D (Revised by Sumeet kabra for MWA in R12)

Upload: sambasivarao-kethineni

Post on 27-Oct-2014

299 views

Category:

Documents


5 download

TRANSCRIPT

Page 1: Mobile Web Applications(MWA)

Mobile Web Applications(MWA) By Gayathri.D

(Revised by Sumeet kabra for MWA in R12)

Page 2: Mobile Web Applications(MWA)

MWA in 11i and R12

• Mobile Web Applications have changed a bit from 11i to R12 .

• The changes were made to R12 directory structure, for Security and for Autoconfig Engine

• For details about MWA in 11i proceed to next slide and about MWA in R12 jump to slide #34 ( type 34 and press Enter )

Page 3: Mobile Web Applications(MWA)

Agenda - MWA in 11i

• Set up overview• Configuration Options• - mwa.cfg file • - Key Mappings (device IP.ini and default_key.ini)• Starting/stopping Mobile Apps Server• Starting Server on Multiple Ports• Configuring RF Devices• Accessing a Mobile Application.

• Oracle Mobile Applications for Inventory Management:• Today’s demand for accurate, real-time information access, and inventory speed for several

industries is forcing mobile applications to Find solutions for industries such as warehousing, manufacturing,

• Distribution, retailing, logistics, and transportation.• MWA will use wireless devices that support Internet Standards, Web Browser, and Telnet

client.• Technologies involved are Java, XML, TCP/IP, and Oracle 8i.• Devices as hand held Radio Frequency (RF), Personal Digital Assistants (PAD’s), and Internet

Phones are examples of mobile devices.

Page 4: Mobile Web Applications(MWA)

• Agenda or this presentation:• Overview of Setup

– This will include a high-level description of all the components involved and how they interact.

• Configuration Options– Before starting the server, it’s important that you’ve got the server

configured properly. Properties such as log level, the location of your .dbc file (which holds information needed to log into your database), and the port number on which you want to start your server all need to be set before you start the server. You set these parameters in the mwa.cfg file.

– You might also want to map your devices’ keys to certain server-defined functions (like erase a line). Key mappings and other device-specific characteristics are set in .ini files.

• We’ll then run through how to start and shutdown the server.• You might want to start multiple servers for load balancing reasons.

We go through how start the server on multiple ports.• Next, we explain how to configure RF devices to point to and access

the Mobile Supply Chain Applications. • We conclude with the procedure to get to an actual mobile application. • At each step, we’ll also go over some troubleshooting tips to solve any

problems that might come up.

Page 5: Mobile Web Applications(MWA)

Oracle Mobile Applications Architecture

Diagram Overview

Typical three-tier Internet architecture.

In the back-end is your 11i Applications server with Oracle database.

In the middle tier is the Mobile Supply Chain Applications server. This is analogous to the Forms server and HTTP server, but is used to deploy applications to Telnet clients.

The client in this context will typically be a mobile RF device running a Telnet client. The RF device communicates with the MSCA server through an access point.

You need to do two things to start using Mobile Supply Chain Applications.

• Start the Mobile Supply Chain Applications Server (after configuring it).

• Configure your RF devices so that they are communicating with the server.

Page 6: Mobile Web Applications(MWA)

• Most of the server-related configuration parameters are located in the $MWA_TOP/admin/mwa.cfg file.

• The important properties in this file are:• Dbc File

– Used to connect to database. Stores username, passwd, database port, and other info used to login.

• Log Directory– Sets the location of your log directory. We default to $MWA_TOP/log, but you may want

to change this to point to your regular Applications log directory.• Telnet Port Number

– You can set the port number on which you want the Telnet server to run. Important: You should set the port to a number greater than 1024. Anything less will require you to be root. The configuration file defaults to port number 2323.

Page 7: Mobile Web Applications(MWA)

Settings for MWA server

Class Paths

/local/java/jdk1.4.2_04/jre/lib/rt.jar:/local/java/jdk1.4.2_04/lib/dt.jar /local/java/jdk1.4.2_04/lib/tools.jar: /lafrz/mfg_top/mfgdev/dmfdv11i/java/appsborg2.zip /lafrz/mfg_top/mfgdev/dmfdv11i/java

Page 8: Mobile Web Applications(MWA)

MWA Server Setup

MWA Configuration File

Port Number Conventions

Environment Verification

Dispatcher Usage

Configuring MWA Dispatcher

Page 9: Mobile Web Applications(MWA)

MWA Configuration File

Configuration File is used to set server related properties:Setup mwa.cfg as follows:

1) Locate file in $MWA_TOP/Secure/hostname_<sid>2) Copy mwa_template.cfg to mwa.cfg3) Edit mwa.cfg and configure following parameters: a. Set mwa.DbcFolder = Full directory of .dbc file

ending with / b. Set mwa.DbcFile = dbc file name c. Set mwa.logdir = full directory of log file d. Set mwa.TelnetPortNumber = default port# e. Set mwa.DropConnectionTimeout = no. of minutes f. Set mwa.StaleSessionTimeout = no. of minutes g. Set mwa.LogLevel = error or trace

Page 10: Mobile Web Applications(MWA)

• You can map device keys to server-defined functions in .ini files. These are located in $MWA_TOP/admin.

• There is a default_key.ini file in there already, which can be used as a template for the specific devices you might be using.

• The server will use the default_key.ini file if it cannot find the appropriate .ini file for your device.

• The syntax is <Action>=<Key>=<Description>• So, for example, killing (or erasing) an entire line in a text field is set to Control+K.• You can change this to F9, for example, if Control Keys are not easily accessible on your

device.• In these .ini files, you can also specify the devices height and width so the server knows how

to format the output.• The idea is to create a new.ini file for each type of device you have. • For example, if your company is using Intermec Trakker 2415s, create an

intermec2415_key.ini file that is based off the default_key.ini file, but has height, width, and key settings for the Trakker 2415.

Page 11: Mobile Web Applications(MWA)

• You associate your device witha key mapping file you’ve created in the $MWA_TOP/admin/deviceIP.ini file.

• Two ways to do this. • First way...• If your devices are DHCP, put in a line like: Intermec

2415=intermec2415_key.ini• Options on the left of the equal sign will appear before users log in.• The user must select the option corresponding to the device he/she is using.• Second way...(preferred way)• If your devices are on Static Ips, you can specify which IP addresses should be

associated with which key mapping file.• For example, 130.35.112.*=intermec2415.ini• In this case, the options screen is not shown and the user doesn’t have to select

anything. The server automatically knows which key mapping file to use based on the device’s IP.

Page 12: Mobile Web Applications(MWA)

Port Number Conventions

Test Instance:Dispatcher port = 30500Telnet Server ports = 30502,30504,30506

Development Instance:Dispatcher port = 30700Telnet Server ports = 30702,30704,30706

Production Instance:Dispatcher port = 30000Telnet Server ports = 30002,30004,30006

Page 13: Mobile Web Applications(MWA)

Environment Verification

Verify that correct port numbers as per convention has been used

Verify the environment that is set correctly by sourcing the APPS_<sid>.env file

Verify $MWA_TOP is set correctly

Verify the DbcFolder and the DbcFile in the mwa.cfg file that is set to the location and filename of our Oracle Application .dbc file

Verify the log directory that exists

Page 14: Mobile Web Applications(MWA)

Dispatcher Usage

Two Consecutive ports are needed per one MWA Server. One port is for listening to RF device. The Other port is for listening to the MWA Server Manager.

Three consecutive ports are needed for running the dispatcher.

Mobile Users connect to Dispatcher port 30000. Dispatcher distributes mobile users among the three MWA servers.

Page 15: Mobile Web Applications(MWA)

Configuring MWA Dispatcher

Setup Dispatcher parameters in mwa.cfg:

1) Specify the port number and machine for running the dispatcher

mwa.Dispatcher = hostname:port#

2) Specify the dispatcher worker thread count. No. of connections per MWA Server.

mwa.DispatcherWorkerThreadCount = 15

3) Specify the dispatcher clients per worker. No. of MWA servers per Dispatcher.

mwa.DispatcherClientsPerWorker = 10

Page 16: Mobile Web Applications(MWA)

• Before starting the server, be sure the following is true:• You’ve installed Oracle Applications 11i. • You have logged onto your Applications machine as user

“oracle”.• The mwa.DbcFile parameter is set to the location of

your Applications’ .dbc file. This property is set in your $MWA_TOP/admin/mwa.cfg file. the .dbc file is used for storing all the information the server needs to log into your database (e.g., name of the server, database port, etc.)

Page 17: Mobile Web Applications(MWA)

MWA Server JVM Memory Allocation

Set MWA Server JVM Memory Size Unix - $MWA_TOP/bin/mwactl.sh NT - $MWA_TOP/bin/mwactl.cmd

Parameter VMCONFIG=”-mx256m –ms128m”

No. of users/Server Memory allocation 5 to 10 -mx128m –ms64m 10 to 15 -mx256m –ms128m

Page 18: Mobile Web Applications(MWA)

Initialization Parameter File : $MWA_TOP/secure/default_key.ini

Devices Specific InfoDATASTREAMINDICATOR=28DEFAULT_WIDTH=20DEFAULT_HEIGHT=16DEFAULT_TERM_TYPE=VT100CHARACTER_SET=UTF8PROMPT_RATIO=1:1

MWA Navigation KeysMWA_HELP=F1MWA_MENU=F2MWA_BACK=F3MWA_FORWARD=F4

MWA Function KeysMWA_CLEAR_FIELD=CONTROLKMWA_LOVSUBMIT=CONTROLLMWA_MAIN_MENU=CONTROLNMWA_MESSAGE_DETAIL=CONTROLB

MWA_FIELD_DETAIL=CONTROLAMWA_BUTTON_ACCLRTOR=ESCMWA_PAGE_UP=CONTROLDMWA_PAGE_DOWN=CONTROLCMWA_ABOUT_PAGE=CONTROLXMWA_FLEX_POPUP=CONTROLFMWA_FLUSH_INPUT=CONTROLEMWA_DROP_CONNECTION=CONTROLZ

INV Function KeysINV_GENERATE=CONTROLG

WMS Function KeysWMS_SKIP_TASK=CONTROLSWMS_INVOKE_DEVICE=CONTROLP

Page 19: Mobile Web Applications(MWA)

deviceIP.ini

• deviceIP.ini

[device]

DEFAULT=default_key.ini

SYMBOL=gui_key.ini

INTERMEC=intermec.ini

// Wildcard at the end of IP address is supported.

[map]

127.0.0.1=default_key.ini

Page 20: Mobile Web Applications(MWA)

Startup and shutdown Script used in On Demand

start_mwa.shexport MWA_TOP=/pimoti/applmgr/1159/mwa/11.5.0export PATH=$PATH:$MWA_TOP/binexport DISPLAY=auohsimot05:1.0nohup /pimoti/applmgr/1159/mwa/11.5.0/bin/mwactl.sh start 30002 &nohup /pimoti/applmgr/1159/mwa/11.5.0/bin/mwactl.sh start 30004 &nohup /pimoti/applmgr/1159/mwa/11.5.0/bin/mwactl.sh start 30006 &nohup /pimoti/applmgr/1159/mwa/11.5.0/bin/mwactl.sh start_dispatcher &

stop_mwa.sh

export PATH = $PATH:/pimoti/applmgr/1159/mwa/11.5.0/bin:/pimoti/applmgr/common/util/jre/1.1.8/bin

nohup /pimoti/applmgr/1159/mwa/11.5.0/bin/mwactl.sh -login mobileadm/mobileadm stop_force 30002 &

nohup /pimoti/applmgr/1159/mwa/11.5.0/bin/mwactl.sh -login mobileadm/mobileadm stop_force 30004 &

nohup /pimoti/applmgr/1159/mwa/11.5.0/bin/mwactl.sh -login mobileadm/mobileadm stop_force 30006 &

nohup /pimoti/applmgr/1159/mwa/11.5.0/bin/mwactl.sh stop_dispatcher &

Page 21: Mobile Web Applications(MWA)

Startup/Shutdown of MWA Servers and Dispatcher

To start the MWA Telnet Server:1. Source the APPS_<sid>.ENV2. cd $MWA_TOP/bin3. mwactl.sh start [port number]4. mwactl.sh start_dispatcher

To Shutdown the Telnet Server:1. cd $MWA_TOP/bin2. mwactl.sh –login xxx/yyy stop port# where xxx is the application user id with system administrator responsibility and

yyy is the application user password.3. mwactl.sh stop_dispatcher

• Follow the steps outlined to start the MSCA server.• Note that you can specify a port number when starting up the server. Specifying a port here will override the port specified in your mwa.cfg file.• Immediately after starting the server, check to see if it worked. Telnet to the Server with a PC’s Telnet client. telnet <host> <port>• There should also be a new java process running on your machine.• For Background running:• nohup mwactl.sh start 2323 &• Nohup = the process will continue to run even after user has terminated unix session.• & = will launch the process in background mode

Page 22: Mobile Web Applications(MWA)

Here are some things to watch out for if the server didn’t start up successfully.

• Log file will look like <port>.<system>.<log>• The APPLSYS.env may have been changed to user’s

environment file. (Example: visus02.env)

Page 23: Mobile Web Applications(MWA)

Starting the server on multiple ports

• For load balancing reasons, you may want to start up multiple servers.• Remember to start each server on a different port.• Also, remember that the Server uses port n+1 when communicating with Server Manager. • So, if you start on port 2323, then port 2324 is also taken, and port 2324 will not be able

to be used.• A dispatcher can be used to route requests to one of the servers. • In the mwa.cfg file, modify the parameter “mwa.Dispatcher=hostname:port”. • Set the hostname to the machine on which you want the dispatcher to reside. Set the port here as

well.• mwactl.sh start_dispatcher to start• mwactl.sh stop_dispatcher to stop• Notes: • If you use the Dispatcher, we do not support the ability to reconnect from a dropped session and still

get back to the same screen.• You must start the dispatcher from the same MWA_TOP you use to start the Telnet server.

Page 24: Mobile Web Applications(MWA)

MWA Server specific XML File Tags

<oa_mwa_server> <hostname oa_var="s_mwahost">auohsimot05</hostname> <domain oa_var="s_mwadomain">oracleoutsourcing.com</domain> <mwaLogLevel oa_var="s_mwaLogLevel">error</mwaLogLevel> <mwaLogRotate oa_var="s_mwaLogRotate">Yes</mwaLogRotate> <mwaLogFileSize oa_var="s_mwaLogFileSize">10000000</mwaLogFileSize> <mwaDropConnectionTimeout

oa_var="s_mwaDropConnectionTimeout">5</mwaDropConnectionTimeout> <mwaStaleSessionTimeout oa_var="s_mwaStaleSessionTimeout">60</mwaStaleSessionTimeout> <mwaDispatcherThreadCount

oa_var="s_mwaDispatcherThreadCount">15</mwaDispatcherThreadCount> <mwaDispatcherClientsPerWorker

oa_var="s_mwaDispatcherClientsPerWorker">10</mwaDispatcherClientsPerWorker> <mwaJVMb oa_var="s_mwaJVMb">FALSE</mwaJVMb> <mwaPortNo oa_var="s_mwaPortNo" oa_type="PORT">10009</mwaPortNo> <mwaDispatcherPort oa_var="s_mwaDispatcherPort" oa_type="PORT">10012</mwaDispatcherPort> <mwaActivateLOVByEnter oa_var="s_mwaActivateLOVByEnter">FALSE</mwaActivateLOVByEnter> <mwaSubmenuChangeOrgResp

oa_var="s_mwaSubmenuChangeOrgResp">FALSE</mwaSubmenuChangeOrgResp></oa_mwa_server>

Page 25: Mobile Web Applications(MWA)

Concurrent Program defn. Sometimes, Customers specifically ask for definingconcurrent programs for startup/shudown of MWAservers from front end in Oracle APPS 11i as in SR #

4418647.993

Steps for defining Concurrent program:

1) Copy start_mwa.sh and stop_mwa.sh to $XBOL_TOP/bin as start_mwa and stop_mwa

2) Login from front end, and define Concurrent program executables as HOST type

3) Define the concurrent program named as startup_mwa and stop_mwa

4) Test the same, if you have CRT from the customer for bouncing MWA

5) Update the Customer with successful results

Page 26: Mobile Web Applications(MWA)
Page 27: Mobile Web Applications(MWA)
Page 28: Mobile Web Applications(MWA)
Page 29: Mobile Web Applications(MWA)
Page 30: Mobile Web Applications(MWA)

• To get to a mobile application• 1. Login• 2. Select Responsibility.• 3. Select Menu Item

Page 31: Mobile Web Applications(MWA)
Page 32: Mobile Web Applications(MWA)

Common IssuesDispatcher and MWA ports getting reset after refresh or running autoconfig. In Order to avoid autoconfig resetting the ports, we need to have standard ports

on context file. Parameters listed above. Some times process doesn’t get cleared after the stop command issued. Wait for

some time and always, please check netstat –i |grep <port #>. If you see port is still listening. Use lsof –i |grep <port #>. Identify the process and kill them. When all ports are cleared start the services. 

Post start service can done from desktop dos prompt or start -> run withtelnet <host.domain name> <port #> . Repeate this for all ports including

dispatcher to make sure you get login prompt.

Q. The Server doesn’t start successfully?Q. The Server doesn’t allow me to connect if X users have already connected?Q. There is a long response time between the server and the client?Q. The Server drops my connection to the server if I have been idle for more

than a couple of minutes?Q. Setting up of a cronjob for automatic bounce of MWA Servers ( SR # 4098760.999 )

Page 33: Mobile Web Applications(MWA)

PORTS:

Page 34: Mobile Web Applications(MWA)

Agenda - MWA in R12

• New Environment Variables in R12

• Changed Directory Structure in R12

• Change for Security

• Change for Autoconfig Engine

Page 35: Mobile Web Applications(MWA)

The following is the new environment variable introduced in R12.

o $INST_TOP

The following are the new directories that the MWA server uses:

o $INST_TOP/admin/scripts

o $INST_TOP/admin/install

New Environment Variables in R12

Page 36: Mobile Web Applications(MWA)

• In R12, MWA server startup files are available under $INST_TOP/admin/scripts and MWA server configuration files in $INST_TOP/admin/install

Note : Though the directories under $MWA_TOP continue to exist, the MWA server no longeruses those files.

Changed Directory Structure in R12

Page 37: Mobile Web Applications(MWA)

Start/Stop MWA in R12

• In On Demand instances we have wrapper script available to start MWA in $SCRIPT_TOP

• Start -> mwactlwrpr.sh start apps/apps

• Stop -> mwactlwrpr.sh stop apps/apps

• Note : Instead of apps/apps Application user name and password which own the MWA can also be used

Page 38: Mobile Web Applications(MWA)

Change for Security

• In R12, all the scripts that previously accepted the input parameters in the command line now accept these parameters in the following way:

• Secure format (for UNIX shell scripts):• o <script_name> <command> <Enter key>• o <username> <Enter key>• o <password> <Enter key>

Page 39: Mobile Web Applications(MWA)

Change for Autoconfig Engine

• The Autoconfig Engine scripts stopall (adstpall.sh) and startall (adstrtal.sh) manage MWA services when the following configuration parameters are set to enabled in the environment context file

(<APPL_TOP>/admin/<CONTEXT_NAME>.xml):• o s_other_service_group_status• o s_mwastatus

Page 40: Mobile Web Applications(MWA)

MWA - References

For MWA Configuration details, please see following metalink notes:

. Mobile Applications Technology Stack: 163931.1. MWA Dispatcher port number usage: 170939.1

. MWA Dispatcher Usage and Example: 198543.1Important MWA Dispatcher Fix:

MWA Dispatcher linking MWADIS executable Bug 2284935

Note.269991.1http://webiv.us.oracle.com/cgi-bin/cr/getfile.cgi?p_attid=72450.1:285051

MWA Site http://www-apps.us.oracle.com/mwa/

AdvancedBarCodeshttp://logistics.us.oracle.com/collat/repository/docs/AdvancedBarCodes.pdf

MWA Java Docs :http://www-apps.us.oracle.com:1100/mwa/javadocs/MWA1084/

Page 41: Mobile Web Applications(MWA)

THANK YOU.