Redirecting to styles/mpserver_j2ee.xml...
If page does not load within 5 seconds, click here.
mPower Server: J2EE Platform
For applications:
ChannelIT
DocIT
LinkIT
ServIT
Describes platform configuration and software installation for the mPower server on J2EE.
This document assumes you have a working knowledge of J2EE. Contact your NetSol representative for more information.
Debug logging for the Web Service API is now available with J2EE.
If you are using DocIT (Web Document Generation) in conjunction with ChannelIT, install and configure the DocIT server first. You will need the host address and listening port of Tomcat on the DocIT server to correctly configure the web.xml file on the mPower server so that the two can communicate.
General Preparation
System Requirements
Review the mPower Server hardware and software requirements. You must install and configure all required software before installing the mPower program files.
LeasePak Server
The mPower server requires an installed and working LeasePak server. Refer to documentation in the LeasePak System Administration Guide for more information.
mPower Users
To use one of the mPower applications, you must first set up the appropriate user(s) on the LeasePak server. For more information, refer to the mPower Users section of the document LeasePak and mPower Users.
To finish setting up the LinkIT (Web Services API) user or ServIT (Web Customer Self Service) users, you will need to install the mPower software (as detailed below) before editing the css_db.xml or web.xml files.
mPowerd Daemon on the LeasePak Server
You can install the mPower server on its own machine or on the same machine as the LeasePak server. In either case, you must set up the mPowerd daemon on the LeasePak server. For more information about daemons and services, refer to the document LeasePak Server Configuration and Maintenance in the LeasePak System Administration Guide.
On the LeasePak server:
All OS Platforms: create entry in /etc/services
official_service_nameport_number/protocol_name [aliases] [#comment]
Create an entry in the /etc/services file using the following format:
official_service_name
Must be unique for the server. For example, mPowerd_v53a_5356.
port_number/protocol_name
The port number must be greater than 1023 and unique for the server. By default 5356. The protocol name is tcp.
Example:
mPowerd_v53a_5356 5356/tcp # mPower v53a mPowerd /opt/msi/v53a
Multiple concurrent versions: if you have more than one version of mPower installed on the same server, each installation requires its own entry in /etc/services with a unique service name and port number.
Create entry in inetd.conf or xinetd.d
HP and Sun: create an entry in the /etc/inetd.conf file.
The entry or file consists of one line. Delimit fields with a space or tab. If you need to continue the entry on a second line, end the first line with a backslash (\).
Example:
mPowerd_v53a_5356 stream tcp nowait root \
/opt/msi/v53a/live/bin/mPowerd mPowerd \
-d /opt/msi/v53a -l /opt/msi/v53a/log/mPowerd.log -f /opt/msi \
/v53a/etc/hostname_v53a_rt.lpkd
where hostname is the name of your LeasePak server machine.
Linux: create a file service_name in the /etc/xinetd.d directory
Create a file in /etc/xinetd.d where service_name is the official service name (official_service_name) from /etc/services. From the above example the name would be mPowerd_v53a_5356.
Example:
# mPowerd v53a daemon
service mPowerd_v53a_5356
{
disable = no
id = mPowerd_v53a_5356
socket_type = stream
user = root
server = /opt/msi/v53a/live/bin/mPowerd
wait = no
protocol = tcp
port = 5356
server_args = -d /opt/msi/v53a -l /opt/msi/v53a/log/mPowerd.log -f /opt/msi/v53a/etc/hostname_v53a_rt.lpkd
}
where hostname is the name of your LeasePak server machine.
J2EE Installation and Configuration
Download J2EE 1.4SDK from the Java 2 Platform, Enterprise Edition (J2EE) page (java.sun.com/j2ee/index.jsp, part of the Sun Developer Network) and follow Sun's instructions for installing the software.
Edit the server.policy file, by default located in /opt/SUNWappserver/domains/domain1/config directory.
Find the grant section--that is, the section that begins grant {, with no additional text or data between the word grant and the left brace.
// Basic set of required permissions granted to all remaining code
grant {
permission java.lang.RuntimePermission "loadLibrary.*";
permission java.lang.RuntimePermission "queuePrintJob";
permission java.net.SocketPermission "*", "connect";
permission java.io.FilePermission "<>", "read,write,delete";
// work-around for pointbase bug 4864405
permission java.io.FilePermission "${com.sun.aas.instanceRoot}${/}lib${/}databases${/}-", "delete";
permission java.io.FilePermission "${java.io.tmpdir}${/}-", "delete";
permission java.util.PropertyPermission "*", "read,write";
permission java.lang.RuntimePermission "getClassLoader";
permission java.lang.RuntimePermission "createClassLoader";
permission java.lang.RuntimePermission "modifyThreadGroup";
permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
permission java.util.logging.LoggingPermission "control", "";
};
The above example includes all the required permissions for mPower to run on J2EE. If needed, make these changes to your file:
For the file beginning permission java.io.FilePermission, change to
permission java.io.FilePermission "<>", "read,write,delete";
For the file beginning permission java.util.PropertyPermission, change to
permission java.util.PropertyPermission "*", "read,write";
Add the following two lines, anywhere before the end (};) of the section
permission java.lang.RuntimePermission "getClassLoader";
permission java.lang.RuntimePermission "createClassLoader";
After saving the edited file, restart the J2EE server to register the changes. To restart the server, use the following commands in sequence:
/opt/SUNWappserver/bin/asadmin stop-domain
/opt/SUNWappserver/bin/asadmin start-domain
mPower Installation
To install the mPower software:
If needed, restart the J2EE server to register changes to the server.policy file
mkdir -p /opt/msi/v53a/mpower-v53a
Copy the file mpower-v53a.war to any location on the server except/opt/msi/v53a/mpower-v53a
cd /opt/msi/v53a/mpower-v53a
$JAVA_HOME/bin/jar -xvf (path_to_war_file)/mpower-v53a.war
mPower Configuration
leasepak.xml
Edit the following parameters in leasepak.xml, located in the mpower/WEB-INF/envs directory:
leasepak_server
leasepak_environment
mPowerd_port
where leasepak_server is the IP address or name of your LeasePak server, leasepak_environment is the name of the LeasePak environment, and mPowerd_port is the TCP port number for the mPowerd daemon (not the leasepakd daemon).
web.xml
Edit the web.xml file, located in the mpower/WEB-INF directory.
First, find the following element group:
LPCODES_UPDATE_INTERVAL
value
java.lang.String
ChannelIT and ServIT users: set the value of LPCODES_UPDATE_INTERVAL to 5 (minutes) or more to specify the interval at which the program updates LeasePak codes (the LPCODES.TXT file). NetSol recommends a minimum of 60 minutes. If you add or change LeasePak codes frequently, you can set this number lower, but no lower than 5 (minutes).
LinkIT users: set value to 0 if you are not using ChannelIT or ServIT. By itself, LinkIT does not use this, and setting value to anything other than 0 can create performance issues.
Next, find the customization section of the file and edit as needed:
apiuid
api_username_value
java.lang.String
apipwd
api_password_value
java.lang.String
docgen_endpoint
http://host:port/dxGen-v53a/services/DocGenWsdl
java.lang.String
smtp_mail_host
mail_host.domain.suffix
java.lang.String
The API username is the account you have designated for use with the mPower server (ChannelIT, LinkIT, or ServIT) and the API password is the LeasePak client string password created for the account. For more information on LeasePak passwords, refer to the document LeasePak and mPower Users.
ServIT Configuration
If you are not using ServIT, skip to the next section, mPower Deployment.
css_db.xml
Edit the css_db.xml file, located in the mpower_dir/WEB-INF directory. For each ServIT user, create a element:
where user_name is the ServIT user's account name, password is the password (this is an arbitrary password, not a LeasePak client string, server, or DBMS account password, and client_number is the corresponding Lessee number (ral.les_s) of the user in LeasePak.
mPower Deployment
To deploy the mPower software:
cd /opt/SUNWappserver/bin
As root, run the command asadmin start-domain to make sure the domain is running
Then run the following command to deploy mPower:
asadmin deploydir --user admuser --password admpasswd --host host --port port --contxtroot mpower_rootpath_to_mpower_app
where admuser is the admin user account name, admpasswd is the admin user account password, host is the name of the mPower server host machine, port is the mPower port number, mpower_root is the mPower URL root directory following the domain (for example, in www.mccue.com/mpower, /mpower (including the beginning slash), is the root), path_to_mpower_app is the actual and full path to the mPower application files (for example, /opt/msi/v53a/mpower), and each option is preceded by a double hyphen (--).
If you are not using LinkIT (LeasePak Web Services API), stop here. This concludes the J2EE mPower setup. If you are using LinkIT, continue to the next section.
LinkIT Deployment
If you are using LinkIT, create a Bourne shell script similar to the following, using your directories, host name, and port number:
#! /bin/sh
# this is the web service you are going to deploy
DEPLOYFILE=$1
# the name of the contextroot specified above
SERVICE_NAME=mpower-v53a
# the directory you created
SERVICE_DIR=mpower-v53a
# the name of the host
HOST=http://mpower.mccue.com
# the port that the service is on default install is 8080
PORT=8080
#j2ee INSTALL_BASE
J2EE_BASE=/opt/SUNWappserver
# base path to java home, for j2ee it is in the j2ee directory
JAVA_HOME=$J2EE_BASE/jdk
# unless you created your own domain then this should be correct, otherwise change domain1 to the name of your new domain
# mpower base is the location of the actual service on the filesystem
MPOWER_BASE=$J2EE_BASE/domains/domain1/applications/backup/j2ee-modules/$SERVICE_DIR
# mpower libs is the location within mpower_base of the api required libraries
MPOWER_LIBS=$MPOWER_BASE/WEB-INF/lib
# this should not change
CLASSPATH=$JAVA_HOME/lib/tools.jar
for APIFILE in $MPOWER_LIBS/*.jar ; do
CLASSPATH=$CLASSPATH:$APIFILE
done
if [ ! -f "$J2EE_BASE/lib/wsdl4j.jar" ] ; then
echo "Copying wsdl4j to j2ee common lib!"
cp $MPOWER_LIBS/wsdl4j.jar $J2EE_BASE/lib/
fi
$JAVA_HOME/bin/java -classpath "$CLASSPATH" org.apache.axis.client.AdminClient -l$HOST:$PORT/$SERVICE_NAME/services/AdminService $DEPLOYFILE
Name the script mpower_ws.sh and save it to your mPower WEB-INF/config directory. Then cd to your WEB-INF/config directory and run the script for each service you wish to deploy:
mpower_ws.sh LPClient/deploy.wsdd
mpower_ws.sh LPApplication/deploy.wsdd
mpower_ws.sh LPAsset/deploy.wsdd
etc. You should only have to do this once, unless additional methods are added to a service. Contact your NetSol representative for more information.
LeasePakTM 5.3a mPower Documentation
© 2005 by NetSol Technologies Inc. All rights reserved.
The information contained in this document is the property of NetSol Technologies Inc. Use of the information contained herein is restricted. Conditions of use are subject to change without notice. NetSol Technologies Inc. assumes no liability for any inaccuracy that may appear in this document; the contents of this document do not constitute a promise or warranty. The software described in this document is furnished under license and may be used or copied only in accordance with the terms of said license. Unauthorized use, alteration, or reproduction of this document without the written consent of NetSol Technologies Inc. is prohibited.