samedi 16 novembre 2013

Accessing JD Edwards 9.1 TR9.1.3 from a mobile device using Windows CE OS




Here is the login page you obtain when logging into JDE 9.1 TR9.1.3 from a Windows CE OS:






This is because, in the registry of the mobile device, you can find the key below:

\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\User Agent





The login page presented to the user using mobile devices is stored in:


%MIDDLEWARE_HOME%\user_projects\domains\<domain_name>\servers\<managed_J2EE_name>\stage\<managed_server_name>\app\webclient.war\share\ppclogin.jsp


Two modifications can made to this .jsp file in order to make the use of this mobile device page easier:


First modification : Bypass the environment choice.



By default, a transition page offering the choice of environment, is presented to the user before typing the username and password, even if there is only one environment to choose from and if the default environment is setup in the jas.ini. 


In order to avoid this extra choice and use the default environment setup in the jas.ini, you need to make the following changes to the ppclogin.jsp:



Before:

String name = "";
String defaultEnvironment =
(String)request.getAttribute("defaultEnvironment");
String environment = defaultEnvironment == null ? "" : defaultEnvironment ;
String role = "";
if (userInfo != null)

{
                name = userInfo.getUserId();
                environment = userInfo.getEnvironment();
                role = userInfo.getRole();
}


After: 
String name = "";
String defaultEnvironment =
(String)request.getAttribute("defaultEnvironment");
String environment = defaultEnvironment == null ? "" : defaultEnvironment ; 
String defaultRole = (String)request.getAttribute("defaultRole");
String role = defaultRole == null ? "" : defaultRole ;
if (userInfo != null)
{
                name = userInfo.getUserId();
                environment = userInfo.getEnvironment();
                role = userInfo.getRole();
}





Second modification: Focus on the user on loading (in order to avoid clicking on the user box before typing it).


Make the following changes to the ppclogin.jsp:


<script language="JScript">
isFirstClick = true;
function submitIfFirstClick() {
  if (isFirstClick)
  {    
isFirstClick = false;
    return true;
  }
  else {return false;}
}

function focusOnUser()
  {
    document.F1.<%=LoginDisplayManager.USERID%>.focus();
  }

function doClear()
{
                document.F1.reset();
                document.F1.<%=LoginDisplayManager.USERID%>.value = "";
                document.F1.<%=LoginDisplayManager.PASSWORD%>.value = "";
                focusOnUser();
<% if (!environmentModeHidden){%>
                document.F1.<%=LoginDisplayManager.ENVIRONMENT%>.value = "";
                document.F1.<%=LoginDisplayManager.ROLE%>.value = "";
<%}%>

}
</script>
<title><%=resource.getString("JH_LOGINTITLE")%></title>
</HEAD>
<BODY bgcolor=white onload="focusOnUser()">

In order to manage menus that are presented to users when they are logged on, you need to modify the PervasiveAppQuickLinks.xml file that you can find in:


%MIDDLEWARE_HOME%\user_projects\domains\<domain_name>\servers\<managed_J2EE_name>\stage\<managed_server_name>\app\webclient.war\WEB-INF\classes:


<?xml version="1.0" encoding="UTF-8"?>
<quick-links> 
                <quick-link
            launchAction="launchForm"
                               appID="P564205"
            formID="W564205D"
            version="US56001"
                               description="Mobile Picking"/>
     </quick-links>




jeudi 14 novembre 2013

Create a WLS Instance as a Windows Service and customise the Memory Values (Heap Size).


Because I could not find a unique and simple doc on how to create a Windows service for the JDE managed servers... And modify the start/max Heap size of the JVM, which by default is set to 200m!

In order to create WLS as a Windows service and make it able to work with E1, follow these steps:

Create a text file:


%MIDDLEWARE_HOME%\user_projects\domains\servers\<managed_server_name>\security\boot.properties

Add the following lines

username=weblogic
password=<your_password>

Create a custom script as below:

install_PGF_PPD_J2EE01_Service.cmd

SETLOCAL
set DOMAIN_NAME=PGF_Apps
set USERDOMAIN_HOME=D:\PGF\Oracle\Middleware\user_projects\domains\PGF_Apps
set SERVER_NAME=PGF_PPD_J2EE01
set PRODUCTION_MODE=true
set ADMIN_URL=http://wwt9pgfapp01:9051
set WLS_USER=weblogic
set WLS_PW=*********
CLASSPATH=D:\PGF\Oracle\Middleware\wlserver_10.3\server\ext\jdbc\oracle\11g\ojdbc5.jar
call "D:\PGF\Oracle\Middleware\user_projects\domains\PGF_Apps\bin\setDomainEnv.cmd"
call "D:\PGF\Oracle\Middleware\wlserver_10.3\server\bin\installSvc.cmd"
ENDLOCAL

This command file will call two WLS master scripts:

  - setDomainEnv.cmd
  - installSvc.cmd

These files come with the default installation of Weblogic Server and they are located in these locations:

 - %MIDDLEWARE_HOME%\wlserver_10.3\server\bin\installSvc.cmd
 - %MIDDLEWARE_HOME%\wlserver_10.3\user_projects\domains\<DomainName>\bin\setDomainEnv.cmd

In installSvc.cmd, apply the following changes:
  • Customise the name of he service that will appear in the Windows Services Application:
-install -svcname:"Oracle %DOMAIN_NAME%_%SERVER_NAME%"

  • Increase the max heap size to 1GB. Note that for E1 applications, Oracle Support recommends min and max JVM heap size of 2G and that is set @ 200m by default !!!:
set MEM_ARGS=-Xms32m –Xmx1024m.
These values are then stored in (and can be modified in): HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\<Service_Name>\Parameters

Launch the script created above:

It will create the Windows Service as below. Is is recommended to start this service automatically with a Windows services user: