|
Article | Demo Application Readme | Client-Side Download | Server-Side Download Readme Contents
m-RMS stands for Mobile Resource Management System. It is an extention of the original application, RMS, written using the J2EE technology for desktop clients. Details on the design, architecture and implementation of RMS can be found at Resource Management System: a J2EE Sample Application This paper and demo application demonstrate how to build and extend conventional Java solutions running on desktops, to mobile devices such as PDA's and handhelds using the J2ME/MIDP and XML technology, at the same time re-using the existing backend J2EE framework and infrastructure. m-RMS can run on any MIDP device including Java Phones, PalmOS handhelds or RIM devices. m-RMS demonstrates the use of following technologies: J2EE, J2ME (CLDC + MIDP) and XMLtechnology, and WML/WAP m-RMS application consists of two parts:
The m-RMS wireless portal is a J2EE and XML implementation and consists of three tiers:
The web server constitutes the web tier in the four-tier architecture described in the Article. It hosts the following:
All sets of JSP pages/servlets use the same beans, EJBs and backend database. Requirements: m-RMS Wireless PortalTo install and run the m-RMS portal, you need the following:
The J2EE SDK Reference Implementation includes a J2EE application server, a web server, Cloudscape database, and various development and deployment tools. The instructions for installing and running m-RMS portal assume that you are using these J2EE SDK components. However you can configure m-RMS portal to run with another database, such as Oracle 8i, or another application server and its respective deployment tools, such as BEA WebLogic 5.1. Appropriate application server specific instructions will need to be followed. To install the m-RMS portal, perform the following steps: Step 1. Download m-RMS portal software, m-RMS-server.zip This software needs to be installed, configured and run for all the three client end configurations. Step 2. Unzip the m-RMS portal software .zipfile Unzip the file m-RMS-server.zip by issuing the following command:
The unzipped file contains the following directories:
It also includes:
Step 3. Compile and Package the EJBs, Servlets and JSP pages Run the
The script has a dummy setting for the environment variable J2EE_HOME and XML_HOME. You should set the value of J2EE_HOME to the J2EE SDK home and XML_HOME to the home of JAXP1.1 Reference Implementation. You can use the J2EE SDK deployment tool as an alternative: The J2EE SDK includes a deployment tool. You can use this tool instead of the build.sh script to compile and package the EJBs, servlets and JSP pages. Step 4. Set Up m-RMS wireless portal 1. Create and populate a Cloudscape database named CloudscapeDB. You can use the cloudscape.sh script in the sqlscripts.zip package to create and populate the database or you can use the database tools provided by Cloudscape. RMS requires various tables for storing pertinent information, such as proposals, projects, and resources. There are SQL scripts provided in the package sqlscripts.zip that create the tables in the Cloudscape database. The scripts are:
When you run the cloudscape.sh script, it runs the RMS.sql and RMSData.sql scripts. After the SQL scripts run, verify that no errors occur. Ignore errors about dropping nonexistent tables (to make the application work for different conditions, the scripts begin by dropping tables). All database access is performed through the Java Database Connectivity (JDBC) application programming interface (API). You need to modify the jdbc.datasources property in the default properties file of the J2EE SDK as follows to reflect the JNDI name of the Cloudscape database:
If you choose to use a database other than Cloudscape, you need to modify additional default.properties file specifications. For example, for an Oracle database, you need to change default.properties file specifications as follows:
Also, if you choose a database other than Cloudscape, you need JDBC driver classes for the database; you must include these classes in the classpath of the J2EE SDK server. In addition, you must modify the XML deployment descriptor parameters that refer to the logical and JNDI resource reference names of the database. For example, if you change the default.properties file as mentioned above for an Oracle database, you need to change the resource reference JNDI name to
2. Start Cloudscape by entering the command:
3. Start the J2EE SDK server by entering the command:
4. Use the deploy tool in the J2EE SDK to deploy the m-RMSApp.ear application. You can deploy the application by entering the command: Alternatively you can use the deploy tool GUI to deploy the application:
If you want to uninstall the application after you deploy it, enter the command:
For more details on the design, architecture and implementation of the m-RMS portal, refer to the original RMS article: Resource Management System: a J2EE Sample Application m-RMS client end application m-RMS can run in two configurations on the client end:
m-RMSMIDlet is an application which can be run on any MIDP device in standalone, wireless and wireline modes. In wireline and wireless modes, it communicates with the m-RMS wireless portal over HTTP using XML for exchanging information.
Note: Details are provided for compiling and packaging the m-RMS MIDlet using the J2ME wireless toolkit from Sun. Other available toolkits can be used for development. Step 1. Download m-RMS-client.zip, the m-RMS MIDlet Step 2. Unzip the m-RMS-client.zip file. Unzip m-RMS-client.zip by issuing the following command:
The zip file has a directory m_RMS which includes the following:
Step 3. In order to compile and build the source code, you will need to install the NanoXML parser which the application uses for parsing the XML data from the portal server. Place the NanoXML files in the directory Any other suitable development toolkit can also be used, appropriate instructions will need to be followed. Step 4.The following steps will need to be followed to configure and run the m_RMS MIDlet on any MIDP device. To launch the application in wireless or wireline mode, run m_RMS, and choose 'online mode' from the application's menu . It allows you to create, search, view, update, delete and download proposals and projects. You can also view the available/allocated resources for projects. When you run the application for the first time, you need to configure the wireless portal server URL, and port information. You can do this after launching the application in standalone mode first Figure 3. Then choose the "preferences" option from Menu Figure 4 and set the parameters appropriately Figure 5 You can now go back to Online mode by choosing the "Online Mode" option. While in online mode, it is possible to download information from the m-RMS portal server to the local device database. Then you can choose to work in "Standalone mode," modify the downloaded information, and later, using m_RMS application's Synchronize button, synchronize the data with the portal's database via wireline or wirelessly. Standalone Mode Launch m_RMS, and select Standalone mode from its menu. You can interact with the application in this mode. It allows you to create , search, view, update, delete proposals and projects. The information is stored in the local device database. The information can later be synchronized back to the server via wireline or wirelessly using the "Synchronize" button provided on the m-RMS application's menu. WML browser Client m-RMS can also be run on the client device by any WML browser. Requires a WML browser on the client device. A J2ME based WML browser or a native device browser (such as avantgo) can be used. The browser can be a HTTP or a WAP based browser. The m-RMS WML/JSP pages live on the m_RMS wireless portal server. These JSP's generate WML content which is transferred to the WML browser over HTTP/WAP. To run the application, launch the WML browser, load the page http://j2ee_server:8000/RMSRoot/m-RMSWml.jsp where j2ee_server is the m-RMS portal server URL. You cannot work in Standalone mode in this configuration. Requirements
Wireless mode. To work in wireless mode, the Palm needs to be configured for wireless access via a regular internet service provider. This may require the Palm to be configured for a wireless modem, for example, Ricochet or Omnisky etc. This configuration can be done by setting the Palm's network and connection menu. Wireline mode Connect the Palm to the cradle. Connect the cradle to the serial port of a PC on LAN. Be sure to have a PPP server installed on the PC. There is one available from Mochasoft. You can also make this connection by using RAS on Windows. This configuration enables the cradle to function like a modem and provides access from Palm to LAN over TCP/IP via the direct serial port. Download the MIDP4Palm, the MIDP implementation for PalmOS. It contains a MIDP.prc, MakeMIDApp.jar and a mksample.bat file besides other files and utilities. Create a file mkRMS.bat as follows:
where
Copy all files which include m_RMS.jar, m_RMS.jad, m_RMS.bmp, from
Similar instructions will need to be followed for building and installing device specific MIDlets on other devices. Connected Limited Device Configuration (CLDC) Mobile Information Device Profile (MIDP) Develop WAP applications using Java Servlets and Java Server Pages MIDP APIs for Wireless Applications. A Brief Tour for Software Developers (pdf, 171K, 14 pages) Applications for Mobile Information Devices. Helpful Hints for Application Developers and User Interface Designers using the Mobile Information Device Profile (PDF, 106K, 17 pages) | ||||||||||||||||
|
| ||||||||||||