Configuring Java Virtual Machine Back-end Connections for Agentry Applications

The first time you publish an application from Agentry Editor, the publication process creates initial back-end configuration information, which you must modify using Management Cockpit. Use the Java Virtual Machine option to connect from an Agentry application to custom code (for example, you could connect to SAP from Agentry via custom Java code). Before modifying the configuration information for a Java Virtual Machine database back-end connection, you need to research and gather information about the database. Certain tasks may or may not pertain to a particular implementation environment and you should perform a careful review of the application’s requirements and functionality before proceeding.

Prerequisites
  • Obtain and record the numeric identifier for the Java Virtual Machine system connection definition from the Agentry Editor.
  • Obtain and record the host system network name of the Java application server to which SAP Mobile Platform Server is to connect.
  • Obtain and record the application server name of the Java interface, where applicable.
  • Identify any .jar or .class files that contain business objects that the application being implemented may use, and make them accessible to SAP Mobile Platform Server. These files are normally provided with the back-end system with which the SAP Mobile Platform Server is synchronizing.
  • Determine whether users are authenticated using the JVM system connection. If they are, they cannot synchronize unless they have first been successfully authenticated. Proper user credentials must be established within the back-end system before users are allowed access. This may be done before or after configuring the back-end connection in Management Cockpit.
Task
  1. From Management Cockpit, select Applications > Back End.
  2. Under JAVA, edit JAVA-related settings. These configuration options are for a single Java Virtual Machine system connection, and control the connection behavior between the server and a Java interface. There may be multiple Java-n sections within the agentyr.ini file. One must exist for each Java Virtual Machine system connection definition within the application. The n portion of the section name must be replaced with the ID value generated by the Editor for the system connection definition.
    Definitions Values Descriptions
    Class Path Valid fully qualified paths. Contains multiple path values that specify the location of different Java resources. This can include .jar files used by the application. Each path must be fully qualified. Each entry must be separated by a semicolon. All paths for this setting are added to the system variable CLASSPATH of the server’s host system. Requires server restart.
    Constants File Valid file name or path and file name. Default: none. Name and location of the .ini file, relative to the server, that contains constants that can be accessed from the Java code via the SessionData.
    Delete Source (Deprecated) Boolean value of true or false. Default: false Controls whether the files stored in Source Directory are deleted after being successfully compiled by the JVM. This may be necessary in a development environment if the Java source files are modified outside of the Agentry Editor. In development mode, the Agentry Editor can push Java source files to the server for the server to compile. Requires server restart.
    Enable Authentication Boolean value of true or false” Default: true Whether users are authenticated against the back-end system for this system connection. At least one system connection within the application must perform user authentication.
    Enable Previous User Authentication Boolean value of true or false. Default: true Whether previous users are authenticated against the back-end system for this system connection. This authentication occurs when a user change occurs on the client.
    Name Text value. Any text value that identifies the system connection in log files and other areas. Set each connection name to a unique value. Requires server restart.
    Output Directory (Deprecated) Valid path value, relative to the server. The location where the compiled .class files produced by the JVM are to be stored for execution. The standard is to use the Java subfolder in the server’s installation folder; however, you can use another location. This path value you enter here must also be a part of the system’s CLASSPATH (either using a system variable, or by adding the value to the classPath configuration option). This only applies to applications running in development mode; in development mode the Agentry Editor can push Java source files to the server for the server to compile. Requires server restart.
    Perform Compile (Deprecated) Boolean value of true or false. Default: true Whether to compile the .java files into .class files for the Steplet, ComplexTable, and DataTable classes written for the application. A value of false may improve performance in a production environment; the most recently built .class files are reused each time such a class is called within the application. If set to true, each class of the above type is recompiled prior to execution for each user. This only applies to applications running in development mode; in development mode the Agentry Editor can push Java source files to the server for the server to compile. Requires server restart.
    Print Business Logic Stack Trace Boolean value of true or false. Default: false Setting this option to true results in messages generated by the AJ-API exception class JavaBusinessLogicError being printed to the events.log file produced by the server. Requires server restart.
    Print Stack Trace Boolean value of true or false. Default: false Setting this option to true results in messages generated by the exception stack trace being printed to the events.log file produced by the server. Requires server restart.
    Scripts Path Valid file name or path and file name. Default: none. Name and location of the scripts file, relative to the server. This is the directory in which Agentry Editor places Java source code, when the source code for a Java class is entered directly into the Editor to define a steplet or similar. Requires server restart.
    Server Class Valid Java Server Class extension. The application-specific extension of the AJ-API syclo.agentry.server class. This option is automatically set when this API class has been extended by a server class for the application. If no such class exists, the default syclo.agentry.server class is assumed and should not be set for this configuration option. Requires server restart.
    Source Directory (Deprecated) Valid path value, relative to the server. This directory can be used for all other source code on which the Scripts Path might depend. This is the location of the .java files for the Steplet, ComplexTable, and DataTable classes. Files are placed here before they are compiled by the JVM. This is not where the Java project files reside that are related to the application. The .java files are written to this location by the server at runtime. Their contents are based on the definitions in which they are contained. This only applies to applications running in development mode; in development mode the Agentry Editor can push Java source files to the server for the server to compile.
    Time Zone Name Valid time zone name. Default: null Identifies the time zone to which date and time values are converted when received from clients; or from which they are converted when sent to clients. This conversion is based on the application definitions. This setting is used only to specify a time zone other than the one for the back-end system.
  3. Restart SAP Mobile Platform Server if you changed any setting that requires it.