Index

Configuration of JReport Enterprise Server

Introduction

Once JReport Enterprise Server is installed and you have prepared the reporting environment, you can start it. However, you may find that our default port number conflicts with an existing one in your computer. Or, sometimes you need to generate the log files for analyzing a problem, etc.. In these cases, you need to configure your server. Before or while running the server, you can configure your server according to your systems. Configuration work falls into two categories: local and remote. Each category has a set of tools and procedures appropriate to its tasks. Here the instructions are based on JReport Enterprise Server running a standalone server or a service. For the servlet mode, please refer to the integration chapter User's Guide | Integration with a Servlet Enabled Web Server.

Remote Configuration

Users can configure the server remotely from a client machine through a browser like IE. jet.server.servlets.RcServlet is embedded in the wrapping web server. It is loaded and started at the same time when wrapping web server is started.  An independent port is assigned to this servlet by the wrapping web server to listen to the remote configuring request, and the default port is 8889 (modify it from the Advanced tab/option).

Accessing the Service of the JReport Enterprise Server

  1. In the Command Prompt, key in the following command to get JReport Enterprise Server ready for service: (Suppose that your JReport Enterprise Server is installed under C:\JREntServer)

    C:\>cd JREntServer\bin
    C:\JREntServer\bin>JREntServer

  2. In the address bar, type http://localhost:8889 ("localhost" can be changed to your IP).

  3. Provide the user name and password to access the home page of JReport Enterprise Server.

  4. Click Configuration link on the top of the home page, you can see the Configuration page.

There are nine tabs on this page: Cluster, Service, Log, E-Mail, Cache, Performance, Advanced, LDAP and Fax.

Cluster

This tab is available only when Jreport Enterprise Server is installed with a license for cluster.


Admin Server
Specifies to indicate that this server will run as the admin server in the cluster.

Backup Server
Specifies to indicate that this server will run as the backup server in the cluster.

Slave Server
Specifies to indicate that this server will run as the slave server in the cluster.

Admin Server's HostName
Specifies the IP or hostname of the admin server.

Admin Server's RMI Port
Specifies the RMI port number of the admin server. 1129 is set by default.

Server's RMI Port
Specifies the RMI port number of the server. 1130 is set by default.

Service

Port
When you start the server, you need to specify it as the TCP port on which JReport server listens. The port could be an integer between 1 and 65535, but numbers less than 1024 are usually reserved by system, so numbers larger than 1024 are preferred. JReport Enterprise Server uses 8888 as default.

Max Number of Handlers
Specifies the maximum number of connection handlers.

A connection should be set up between a server-side and a client-side when a request from client-side reaches the server. The maximum number of requests which can be handled is depended on the maximum number of handlers. When there is a limitation on the maximum number of connection handlers, a request will be blocked if there are no more free connection handlers. In such a case, the request will either be handled after some connection handlers are set free, or be refused when timeout occurs. A connection handler will be set free after the response to the client's request that generates the connection is sent back to the client-side.

config2.gif (5314 bytes)

Max Number of Connections
Defines the maximum number for Http connections between a server-side and a client-side when a request from client-side reaches the server.

The maximum number of connections depends on the number of requests which can be handled. It should be larger than the maximum number of handlers. For example, the maximum number of handlers is 10, the maximum number of connections is 12, when the eleventh and twelfth requests come, they will be blocked till some handlers get free; when the thirteenth request comes, it will be refused to be handled.

Connection Timeout(s) in Milliseconds
Specifies the maximum milliseconds that a request from a client-side can be blocked before being refused by the server. As stated above, a request will be blocked if there are no more free connection handlers in the server, but it cannot be blocked forever. If there are still no connection handlers free after the maximum milliseconds, then the request will be refused back to the client.

Servlet Properties File Name
The core of JReport Enterprise Server is jet.server.servlets.JRServlet which implements the interface of javax.servlet.http.HttpServlet. You can install the jet.server.servlet.JRServlet to any Web server which supports servlets. This turns the Web server into a JReport Enterprise Server.

jet.server.servlets.JRServlet looks like the following:
servlet.jrserver.code=jet.server.servlets.JRServlet
servlet.jrserver.initArgs=\
temp_dir=temp,\
history_dir=history


The following initArgs must be specified:

temp_dir
The temporary path for JReport Enterprise Server. If it is a relative path, it should be relative to where JReport Enterprise Server is installed.

history_dir
The path that contains version files. If it is a relative path, it should be relative to where JReport Enterprise Server is installed.

Active Realm
Specifies the realm which takes effect when the server starts up.

Realm is an abstract security concept, which hosts the resources and authentication entities on JReport Enterprise Server. There can be more than one realm on the server and every realm is independent from others.

At runtime, only one realm can be active and only the users and resources in the active realm are accessible. A realm is identified by a unique name, which can contain any characters other than forward slash (/) and backward slash (\).

The authentication entities consist of user accounts, group accounts and role accounts.

Provide Service on
Since the machine that the server runs on could be multi-homed (for example, two interface cards are installed on the machine), to determine which host is used for client-sides becomes a problem. Fortunately, JReport Enterprise Server can be "multi-homed" too - it can listen to all the hosts in the machine on the same port. The hosts that this server listens to are active hosts.

Log

Some options for generating the log files are provided on this tab. The log files may help you to find the reasons of a problem.

Log Type

Level

Log to

E-mail

This tab is to configure for exporting report results to mail.


SMTP Sever
This is the numeric host or named host of the machine where the mail server locates. For example, 204.177.148.240.

SMTP Server Port
It is the port on which service of the mail server runs.

E-mail Box
The sender's e-mail address.

Default E-mail Format
It defines how a published report is sent off by e-mail. Select one format to have the report sent with through an e-mail.

Java Archive Compress
It specifies whether you want to compress the attached files.

Maximum Mail Size
It specifies the maximum size of the mail's PDF attachment. When -1 is specified, the size of it is unlimited. However, when the size of the PDF attachment exceeds the size you specified here, the attachment will be separated into several mails automatically.

Please note that the setting of the mail size has higher priority than the setting of the PDF attachment size (you can set a value for the property server.mail.send_size in %JREntServer_InstallRoot%\bin\server.properties to specify the mail size).

Cache

To improve the performance, JReport Enterprise Server enables the user to cache reports and catalogs in memory, so that it will not have to load them from disks when they are needed. Please note that when you run a report to DHTML format, the report and the catalog will not be cached.

Max Number of Catalogs to be Cached
It specifies the maximum number of catalogs that can be cached by the server. No more catalogs can be cached if the number of cached catalogs has reached the number.

Cache Loaded Catalogs
Normally, after a report has been generated, the catalog that is used to generate the report will be removed from the memory. However, if you specify this option, the catalog will be cached rather than removed.

Cached Catalogs
Lists the cached catalogs.

When you add catalogs, please go to %installroot%history\1 to find the catalogs you want.

Max Number of Reports to be Cached
It specifies the maximum number of reports that can be cached by the server. No more reports will be cached if the number of reports has reached the maximum number. Each cached report will use some heap memory. If the heap is used out, an OutOfMemoryException will be thrown out. To avoid the OutOfMemoryException exception, with jdk 1.1, use the java option -ms and -mx to manually set the heap space (for jdk 1.2, users should use -Xms and -Xmx). -ms/-Xms specifies the initial heap and -mx/-Xmx specifies the maximum heap. For example, -ms10m -mx50m means that the initial heap is 10M and the maximum heap is 50M. You can refer to the documents of the Java VM for more information.

Here are some examples, their accuracy depends on your OS and VM:

Cache Size Heap Size
10 reports 18M
30 reports 25M

The default cache size is 10 reports and the default maximum heap space is 16M. When users adjust the number, they should adjust the heap accordingly. The larger the heap space is, the better the performance is.

Cache Loaded Reports
Normally, after a report has been generated, it will be removed from the memory. However, if you specify this option, it will be cached rather than removed.

Cached Reports
Lists the cached reports.

When you add reports, please go to %installroot%history\1 to find the reports you want.

Performance

Catalogs to be Preloaded
This configuration specifies the list of catalogs that will be loaded when the server is started.

When you add catalogs, please go to %installroot%history\1 to find the catalogs you want.

Reports to be Preloaded
This configuration specifies the list of reports that will be loaded when the server is started.

When you add reports, please go to %installroot%history\1 to find the reports you want.

Java Classes to be Preloaded
In addition to catalogs and reports, preloading some useful Java classes will be helpful in performance too. Otherwise, the server will take some time to load Java classes they need when it generates reports. The following Java classes could be preloaded.

Advanced

No Security Checking
If it is checked, any remote requests will be responded to without security checking.

Enable JSP
Enable access to server root in jsp page. If you check this check box, the server root will be set into jsp page. If you uncheck this check box, the root will be set into servlet. For example: when accessing server 8888 port, the server will redirect access to jsp page if you have checked this check box, otherwise, the server will redirect access to servlet.

Enable "Publish to Versioning System" for On-demand View
If checked, the link "Publish to Versioning System" will be generated when you view a report. Clicking the link enables to save the report result as a version.

Connection Keep-alive
This box is checked by default. When connections are established to JReport Enterprise Server at runtime, you can choose to keep the connections alive or close them. If uncheck this option, the connection will be disconnected once the HTTP request has been responded to. That is, IE or Netscape will not hold the opened connection.

Enable Multiple Login With Same User Name
Specifies whether multiple sessions, which are created by one user, can exist simultaneously. By default, this option is checked and one user can log on to JReport Enterprise Server repeatedly without terminating the former sessions created by the same user until the session number reaches the allowed number specified by the license. If this option is unchecked, only the newly created session is active and the all the other former sessions created by the same user will be terminated by the server automatically.

Enable Resource from Real Path
Specifies whether to enable getting resources from real path. By default, this option is not checked. If you need to get resources from the real path, make sure this option is checked.

User Session Timeout
Generally speaking, if several users access JReport server at the same time and among them, a client cannot send requests to JReport Enterprise Server for a period of time, then the server will log the client out after timeout. The default session timeout is 30 minutes.

View Report Timeout
Specifies the maximum time the server uses to run a report. If a report can not be completed within the time specified here, it will be put into the On-demands page and the server will go on running the report there. If you want to stop running the report, select the report by checking the corresponding check box and delete it from the On-demands table.

Administration Port
If JReport Enterprise Server is running as a standalone web server, the administrator can specify the port for client users to configure and administrate the server remotely. The port is actually where the servlet for remote administration (jet.server.servlets.RcServlet) listens. The default administration port is 8889.

Report Result Life
By default it is 86440 seconds (24 hours). The temp file will be deleted in 24 hours after it is generated. Here, you can define the length of the period as you like.

Engine Priority
Five choices are available here: Lowest Priority, Low Priority, Normal Priority, High Priority and Highest Priority. On the condition that multiple tasks are running on your machine, you can decide your engine's priority in the CPU usage by choosing one of them. For example, if you choose Low Priority, JReport Engine will share a comparatively small part of the CPU usage when it is running. Whereas if you choose the High Priority, JReport Engine will occupy more CPU usage. This choice provides you with more flexibility to adjust the engine's utilization of CPU according to your own requirements. Of course, the higher the priority, the faster the performance.

Engine Default Language
When you run a NLS (National Language Support) report, you will be able to choose in which language the report is displayed. Here, you can set the default language type.

LDAP

LDAP (Lightweight Directory Access Protocol) is a lightweight client-server protocol for accessing directory services. With LDAP support, JReport Enterprise Server enables you to import those users/groups on directory servers.

Server

You can set different settings to adapt a certain Directory Server. Now six directory servers are supported, such as Novell Directory Server, iPlanet Directory Server, Microsoft site Server, OpenLDAP Directory Server, Active Directory on Windows 2000 advanced Server, and Lotus Domino server. To load the settings of the specific server, click the Load Settings button.

Below are the descriptions of the options:

Option Description
Select LDAP Server Select a Directory server.
Enable LDAP Support If enabled, JReport Enterprise Server will get users from the Directory Server.
Enable Auto Importing LDAP User When the user on the LDAP Server has successfully connected to the JReport Enterprise Server, this user will be automatically imported to the local security system.
LDAP URL The URL of the LDAP server.
LDAP Server Port The port of LDAP server.
Root Entry The root of Directory Server. From this root, JReport Enterprise Server searches the objects in Directory Server.
Directory Manager DN The entry path of the Directory Manager, which has the priority to manage the users on the Directory Server.
Password The password of Directory Manager.
Encryption Type There are two types available. None means using plain port to connect to LDAP server; and SSL refers to connecting LDAP server by SSL.
Import LDAP Group(s) to Users can decide whether the LDAP groups will be imported into our security system as local roles or as local groups.
Section - User Schema
Distinguished Name The name of the organization unit inside that you want to perform a search for users.
Filter The filter criteria that you want to set when searching for users.
Section - Group Schema
Distinguished Name The name of the organization unit inside that you want to perform a search for groups.
Filter The filter criteria that you want to set when searching for groups.
Admin Group JReport Enterprise Sever will add the group specified here as a member to the Admin group.

Samples

Case 1: Configuration for adapting to Novell Directory Server

If you want to get all users and groups in the orgunit organizational unit, you should follow the steps below to configure your Server tab:

  1. Select Novell Directory Server from the Select LDAP Server drop-down list, and then click Load Settings. The settings of Novell Directory Server will be loaded.

  2. Check the Enable LDAP Support check box. Input the following information:

    LDAP URL: ldap://Ip address or hostname of your Novell Directory Server. (For example: ldap://192.168.126.54)
    LDAP Server Port: 389
    Root Entry: o=the name of the root (For example: o=myorg)
    Directory Manager DN: cn=user name of the directory manager,o=context (For example: cn=admin,o=context)
    Password: the password of the Directory Manager (For example: 1234)
    Encryption Type: None
    Import LDAP Group(s) to: Group


    User Schema:
    Distinguished Name: ou=the name of the organization unit that you want to perform a search for users (For example: ou=orgunit)
    Filter: (&(cn=the filter criteria that you want to set )(objectclass=person)) (For example: (&(cn=*)(objectclass=person)))

    Group Schema:
    Distinguished Name: ou=the name of the organization unit that you want to perform a search for groups (For example: ou=orgunit)
    Filter: (&(cn=the filter criteria that you want to set )(objectclass=groupofuniquenames)) (For example: (&(cn=*)(objectclass=groupofuniquenames)) )
    Admin Group: The name of the group that you want to add to the Admin group (For example: develop)

  3. You can test connection settings by clicking the button Test Connection, get the query result of users specified in the option "Filter" by clicking User Query, and get the query result of groups specified in the option "Filter" by clicking Group Query.

  4. Click Save to save all the settings.

Case 2: Configuration for adapting to Microsoft site Server

Follow the steps below to configure your Server tab. You can get all users in the members organizational unit and all groups in the groups organizational unit.

  1. Select Microsoft site Server from the Select LDAP Server drop-down list, and then click Load Settings. The settings of Microsoft site Server will be loaded.

  2. Make sure that the Enable LDAP Support check box is selected. Input the following information:

    LDAP URL: ldap://Ip address or hostname of your Microsoft site Server. (For example: ldap://192.168.126.54 )
    LDAP Server Port: 1003
    Root Entry: o=test
    Directory Manager DN: cn=administrator,ou=members,o=test
    Password: test
    Encryption Type: None
    Import LDAP Group(s) to: Group

  3. You can test connection settings by clicking the button Test Connection, get the query result of users specified in the option "Filter" by clicking User Query, and get the query result of groups specified in the option "Filter" by clicking Group Query.

  4. Click Save to save all the settings on this tab.

Case3: Configuration for adapting to iPlanet Directory Server

Follow the steps below to configure your Server tab. You can get all users in the people organizational unit and all groups in the groups organizational unit.

  1. Select iPlanet Directory Server from the Select LDAP Server drop-down list, and then click Load Settings. The settings of iPlanet Directory Server will be loaded.

  2. Make sure that the Enable LDAP Support check box is selected. Input the following information:

    LDAP URL: ldap://Ip address of your iPlanet Directory Server
    LDAP Server Port: 389
    Root Entry: dc=mailbj,dc=jinfonet,dc=com
    Directory Manager DN: cn=directory manager
    Password: jinfonet
    Encryption Type: None
    Import LDAP Group(s) to: Group

  3. You can test connection settings by clicking the button Test Connection, get the query result of users specified in the option "Filter" by clicking User Query, and get the query result of groups specified in the option "Filter" by clicking Group Query.

  4. Click Save to save all the settings on this tab.

Case 4: Configuration for adapting to Active Directory on Windows 2000 advanced Server

Follow the steps below to configure your Server tab. You can get all users and groups in the myorg organizational unit.

  1. Select Current Settings from the Select LDAP Server drop-down list, and then click Load Settings. The settings are cleared and you can input your information.

  2. Make sure that the Enable LDAP Support check box is selected. Input the following information:

    LDAP URL: ldap://Ip address of your Windows 2000 advanced Server
    LDAP Server Port: 389
    Root Entry: DC=testad,DC=local
    Directory Manager DN: CN=administrator,CN=Users,DC=testad,DC=local
    Password: 1234 
    Encryption Type: None
    Import LDAP Group(s) to: Group


    User Schema: 
    User Attribute Name: cn
    User Common Name: userPrincipalName
    User Password: userPassword
    Distinguished Name: ou=myorg
    Filter: (&(cn=*)(objectclass=person))

    Group Schema:
    Group Common Name: cn
    Group Member Type: member
    Distinguished Name: ou=myorg
    Filter: (&(cn=*)(objectclass=group))

  3. You can test connection settings by clicking the button Test Connection, get the query result of users specified in the option "Filter" by clicking User Query, and get the query result of groups specified in the option "Filter" by clicking Group Query.

  4. Click Save to save all the settings on this tab.

Case 5: Configuration for adapting to Lotus Domino server on NT

Follow the steps below and you can get all users and groups in the developer organization unit.

  1. Select Current Settings from the Select LDAP Server drop-down list, and then click Load Settings. The settings are cleared and you can input your information.

  2. Make sure that the Enable LDAP Support check box is selected. Input the following information:

    LDAP URL: ldap://Ip address of your Lotus Domino
    LDAP Server Port: 389
    Root Entry:
    Directory Manager DN:
    cn=admin,o=jtotal
    Password: 123456
    Encryption Type: None
    Import LDAP Group(s) to: Group


    User Schema:
    User Attribute Name: uid
    User Common Name: cn
    User Password: userPassword
    Distinguished Name: ou=developer, o=jtotal
    Filter: (&(cn=*)(objectclass=person))

    Group Schema:
    Group Common Name: cn
    Group Member Type: member
    Distinguished Name: 
    Filter: (&(cn=*)(objectclass=groupofnames))

  3. You can test connection settings by clicking the button Test Connection, get the query result of users specified in the option "Filter" by clicking User Query, get the query result of groups specified in the option "Filter" by clicking Group Query.

  4. Click Save to save all the settings on this tab.

Case 6: Configuration for adapting to OpenLDAP Directory Server

Follow the steps below and you can get all users and groups in the developer organization unit.

  1. Select Current Settings from the Select LDAP Server drop-down list, and then click Load Settings. The settings are cleared and you can input your information.
  2. Make sure that the Enable LDAP Support check box is selected. Input the following information:

    LDAP URL: ldap://Ip address of your OpenLDAP Directory Server (For example: ldap://192.168.128.163)
    LDAP Server Port: 389
    Root Entry: dc=openldap, dc=ldaptest
    Directory Manager DN: cn=Manager,dc=openldap,dc=ldaptest
    Password: 123456789
    Encryption Type: None
    Import LDAP Group(s) to: Group

    User Schema:
    User Attribute Name: uid
    User Common Name: cn
    User Password: userPassword
    Distinguished Name: ou=members
    Filter: (&(uid=*)(objectclass=person))

    Group Common Name: cn
    Group Member Type: uniqueMember
    Distinguished Name: ou=groups
    Filter: (&(cn=*)(objectclass=groupofuniquenames))
    Admin Group:
  3. You can test connection settings by clicking the button Test Connection, get the query result of users specified in the option "Filter" by clicking User Query, get the query result of groups specified in the option "Filter" by clicking Group Query.
  4. Click Save to save all the settings on this tab.

Import

After LDAP configuration, if you want to use LDAP users and groups in our system, you must import them manually. To import LDAP users to JReport Enterprise Server, you can use the Import settings under LDAP configuration. The organization structure of users/groups on LDAP Server will be maintained after importing.

Note: When importing LDAP users to our local, the LDAP user names must be valid.

Option Description
List Users List the LDAP users whose names are the same as the JReport users.
List Groups List the LDAP groups whose names are the same as the JReport groups.
Import Users LDAP users will be imported by clicking this button. If the radio button LDAP Server overwrite Local users is selected, all the LDAP users will be imported and the JReport Enterprise Server users who have the same names as the LDAP users will be overwritten. If the radio button Local overwrite LDAP server users is selected, all the LDAP users will be imported but the users who have the same names as the JReport Enterprise Server users will be overwritten.

Select the check boxes before the users you want and then click the Import button. The specified users will be imported from the LDAP server to JReport Enterprise Server. If you want to import all the users, click Select All and then click the Import button or click the Import All button directly. Click the Cancel button to cancel the operation. After importing the users, go to the Security page and click User. You can see the imported users are listed there.

Import Groups LDAP groups will be imported by clicking this button. If the radio button LDAP Server overwrite Local users is selected, all the LDAP groups will be imported and the JReport Enterprise Server groups who have the same names as the LDAP groups will be overwritten. If the radio button Local overwrite LDAP server users is selected, all the LDAP groups will be imported but the groups who have the same names as the JReport Enterprise Server groups will be overwritten.

Select the check boxes before the groups you want and then click the Import button. The specified groups will be imported from the LDAP server to JReport Enterprise Server. If you want to import all the groups, click Select All and then click the Import button or click the Import All button directly. Click the Cancel button to cancel the operation. After importing the groups, go to the Security page and click Role. You can see the imported users are listed there.

Notes:

  • There is an admin group named "Administrators" on the LDAP Server, if you perform an Import operation, all groups will be imported except the "Administrators" group.

  • There is a non-admin group on the LDAP Server has the same name as a non-admin group on JReport Enterprise Server, if you perform an Import operation, all users in the non-admin group on the LDAP Server will be merged into the non-admin group on JReport Enterprise Server.

  • If you have imported users/groups from the LDAP server to JReport Enterprise Server once and you want to import again, in order to prevent the information of the users/groups on JReport Enterprise Server from being overwritten by the newly imported users/groups, please selected the Local overwrite LDAP server users radio button first and then import the users/groups.

Import All All LDAP users and LDAP groups will be imported by clicking this button.

Synchronize

To ensure that you have the most current security information, you can have JReport Enterprise Server synchronize the security information on your local server with that on the LDAP server.

To synchronize local security information, click Synchronize Now.

The synchronization process compares the security information on both local server and the LDAP server first, and, if necessary, update the information on the local server so that both sides are consistent. However, for security reasons, this process doesn't automatically import the newly-added users or groups of the LDAP server.

When the synchronization process is completed, some information will be listed to inform you of what has been done by the synchronization process, such as modified users, removed users, modified roles, removed roles, modified groups or roles, removed groups or roles. (Whether to synchronize groups or roles depends on the setting of the Import LDAP Group(s) to option when configuring LDAP server.)

You can also schedule a synchronizaition task to run at a specific time, to set up a schedule, click Edit. Information about the last run synchronization task can be viewed by clicking detail, and is kept when the server is stopped. So when you restart the server, you can also click on this link to view the task information.

To enable/disable the scheduled synchronization task, click Enable/Disable.

Note: The synchronization process will modify the local security information. For example, if you have an imported LDAP user re-assigned to another imported LDAP group or role, the assignment will be changed according to that on the LDAP server when the synchronization is finished.

RoleMaps

When an LDAP user account is automatically imported (checking the option Enable Auto Importing LDAP User, see the Server tab), JReport Enterprise Server can automatically assign it to the specific roles according to the role map you pre-defined.

A role map consists of two parts: Search Filter String and Corresponding Role Name. When an imported LDAP user account matches the filter condition (specified by Search Filter String), it will automatically be added to a specific role (specified by Corresponding Role Name).

To create a role map,

  1. click Create New Role Map,
  2. Compose the search filter criteria, specify the corresponding role to which you want to assign the matching users, and then click Submit.

You can create more than one role map by repeating these steps. Use multiple role map to assign the same group of matching users to more than one role.

LDAP Support Notifications

SSL Support in LDAP

Our LDAP system supports SSL when connecting to LDAP server to get security information. We have implemented a method in our security system to solve the wrong connection port type problem.

Solving the wrong connection port type problem

If you use an SSL socket to connect to a server on a port that is not using SSL, or if you use a plain socket to connect to a server's SSL socket, your program will hang. This is a characteristic of the SSL protocol.

Use main thread to create a son thread to connect LDAP server, and the main thread can wait this thread some time-- the socket timeout time (This time can be set by users). If the son thread creates LDAP connection successfully, it will notify main thread, and the program will continue to run. But if the son thread hangs for using wrong port type, the main thread will only need wait until the socket timeout time is up and can continue to run.

There is an important parameter in this method: the socket timeout time. Since the connection time varies with users' net environment, it will be better for users to set it in LDAPProperties.xml: modify the element env-socketTime's value before server is started. Its default value is 10, which means the socket timeout time is 10 seconds. Users can modify the value according to their net environment.

About SSL certificate store in our server

Because the JNDI uses the default SSL provider, the certificates will be checked by JSSE's default TrustManager: X509TrustManager. If the TrustManager does not trust and accept them, our server will store the SSL certificates into another key store file. This file is placed in %SERVER_HOME%/properties/LDAPKeyStore.keystore, and the password to access the file is "jinfonet". Users can also use -D parameters to specify another file and password. For instance: if you want to add the certificates into: C:\certs\certs.keystore, and password is "test", add parameters to our server's startup file like below:
"-Djavax.net.ssl.trustStore= C:\certs\certs.keystore"
"-Djavax.net.ssl.trustStorePassword=test"

Note:

The LDAP service provider uses JSSE for its SSL support. The JSSE is available as part of the Java 2 SDK, v1.4. As for earlier versions of the Java platform you can turn to http://java.sun.com/products/jsse for information. To use the JSSE on a platform earlier than the Java 2 SDK, v1.4, first install the JSSE, and then configure a JSSE provider either by updating the JAVA_HOME/lib/security/java.security file with the provider or by adding the provider programmatically. Here JAVA_HOME refers to the directory where the Java Runtime (JRE) software is installed. Detailed step is described in the JSSE Reference Guide.

Limitations

On the LDAP page, sessions are used to remember password and the status of the remember password checkbox, so when the session exceeds the time limit, there will be some limits:

Fax

Since JReport Designer version 7.0, you can export report result to fax. If you want this feature enabled, you need to configure your running environment first.

Download Java Communications API (Version 2.0) from the web sites http://www.jinfonet.com/download/third_party_tool/JavaCommAPIV2_Win32.zip (for Windows) and http://www.jinfonet.com/download/third_party_tool/JavaCommAPIV2_Solaris.zip (for Solaris), and put the files in the specified locations:

Dialing
Specifies the dialing mode for the fax modem. Options are as follows: Pulse or Tone.

Modem Class
Specifies the class of the modem. Options are as follows: Class 1, Class 2 or Class 2.0. All are fax protocols. Most modems only support Class 1, so be sure that higher protocols are supported by the modem if Class 2 or Class 2.0 is selected.

Flow Control
Specifies the flow control mode between DTE (Data Terminal Equipment) and DCE (Data Circuit-terminating Equipment). Options are as follows:

RtsCts - Flow control of the hardware.
Xon/Xoff - Flow control of the software.
none - No flow control specified.

Specifying flow control can help the compressing data function of the modem work better.

Using the RtsCts mode is recommended.

Init String
Initializes the modem. String should be obtained from the modem manual.

Flow Control Command
Specifies the flow control command according to the modem being used. If it is not contained in the drop-down list, leave this field empty and enter the command as part of the initial string.

Command should be obtained from modem manual.

Time Out
Specifies the maximum amount of time (in second) the fax should wait for a response from the destination.

Port
Specifies the port number. Port should be obtained from the modem manual.

Max Retries
When the line is busy, the report result cannot be faxed, so you can specify the maximum number of times the modem re-try faxing the report result.

Local Configuration

Configuration of JReport Enterprise Server can also be done locally. To configure JReport Enterprise Server locally, your JReport Enterprise Server must run as an independent web server on your machine. Assume that your JReport Enterprise Server is installed under C:\JREntServer. In the Command Prompt, type the following commands:

C:\>cd JREntServer\bin
C:\JREntServer\bin>JREntServer -a

Then you will get the Administration dialog:

Click the Configuration tab on the dialog, and provide the user name and password. Then you can get the same configuration options as the remote configuration. Please configure the server as introduced above.

If you have started the server but without the graphic interface, you can load graphic interface by running the following commands in the Command Prompt.

C:\>cd JREntServer\bin
C:\JREntServer\bin>CmdSender -w:admin admin

If you have installed JReport Enterprise Server as an NT Service, and it is installed with -interactive option, open your NTService.ini file, and find if the -a option is specified for the property StartArg for the JReport Enterprise Server. If it is not, append the -a option, and start this service. The administration dialog will then pop up.

Options that can be directly changed on the Command Prompt window

Configuration with the server.properties File

No matter in which way you configure the server, locally or remotely, your settings will be saved in the %JREntServerInstallRoot%\bin\server.properties file. Every time you start the server, the settings in this properties file will be applied to the server.

Therefore, you will have another approach in configuring the server -- modifying the server.properties file. After you install JReport Enterprise Server, there will be a file named server.properties under %JREntServerInstallRoot%\bin. If you don't want to bother yourself doing the configuration work in the local or remote configuration GUI, you can do so by changing the property of the relevant option in server.properties. What's more, server.properties also includes several options that are not set in the Configuration GUI like the following, and you need to edit them in the property file.

Properties not included in configuration GUI:

Configuration with the ConnectionPoolConfig.properties File

If you have used a SQL or other similar tool to connect to a database and act on the data, you probably know that getting the connection and logging in is the part that takes the most time. JReport Enterprise Server can easily spend several seconds every time it needs to establish a connection. In releases prior to Build 550 ( version4.1.0 ) every database session requires a new connection and login even if the previous connection and login used the same table and user account. To improve the performance, JReport Enterprise Server Build 550 supports you to cache the connections instead.

Cached connections are kept in the connection pool and can be used and reused as needed by JReport Enterprise Server. When JReport Enterprise Server tries to get a connection from the pool if no connections are available, the pool will be extended if the number of connections is less than the maximum. Yet once a free connection becomes available, the connection will be released to ensure the minimum number of the connections is active. Connection pool can also suspend communication with the database server through any connection in the pool. When a disabled pool is enabled, the state of each connection is the same as when the pool was disabled; clients can continue their database operations right where they left off. Then JReport Enterprise Server will be freed from creating the connection to the database which leads to save much time.

The proper connection pool should be uncommented and configured to the database you selected at install time. You may configure the ConnectionPoolConfig.properties to match the connection pool with your environment. Open the ConnectionPoolConfig.properties under the directory %JREntServer_installroot%\bin, you will see the lines as below:A

# jdbcpool configure information
URL1=jdbc:odbc:Jinfonet
Expire_URL1=0
IdleExpire_URL1=1
MaxCount_URL1=0
MaxShare_URL1=0
Attempt_URL1=0
Interval_URL1=0

URL
the JDBC URL which can establish a connection to your database.

Expire_URL
You can define how long the active connection will be expired. The value for this property by default is "0" which means that the active connection will not be expired.

IdleExpire_URL
You can define how long the free connection can idle before being closed. The connection will not be released until the defined time is out. The value for this property by default is "1" which means the connection will be released after 1 second. If the value is "0", the connection will be closed right after it starts idling.

MaxCount_URL
The maximum number of the connections based on the URL can be extended in the pool. Once the number of the connections reaches the maximum, the new connection will be block until a free connection becomes available. The value for this property by default is "0" which means there is no limit for the number of the connections. Generally speaking, the smaller the number of the connections is, the better the performance of JReport Enterprise Server is.

MaxShare_URL
The maximum number of the requests in one connection can be executed simultaneously. In JReport Enterprise Server, the requests are equal to the statements. Yet in JReport Designer, the requests will include getting meta data, creating statements and so on. Once the number of the requests reaches the maximum, a new connection will be created to connect to the database. The value for this property by default is "0" which means all the requests in the same connection will be executed. As the property MaxCount_URL*, the smaller the number of the requests is, the better the performance of JReport Enterprise Server is. Since the property MaxShare_URL* and MaxCount_URL* are incompatible, you should make a balance between these two properties to achieve the best performance of JReport Enterprise Server.

Attempt_URL1=1
This property has the close relation to the property MaxCount_URL*. Once the number of the connections reaches the maximum, the new connection will be block until a free connection becomes available. Yet it is impossible for the users to judge how soon there will be a free connection available, therefore to call the engine to establish the new connection at the first time. To make the maximum use of the available connections in the pool, we offer the property Attempt_URL* for you to set how many times the engine can try to establish the new connection. The default value for this property is "1" which means the engine will try only one time to create the new connection.

Interval_URL1=0
The interval of the engine to attempt to create the new connection if the previous try is failed. The default value for this property is "0" which means the engine will start the next attempt at once. Please pay attention that the unit of the property value is millisecond.

Note: You are forced to give the value to the property URL to establish the connection to the database. For the other six properties which are actually the configuration to the URL , you are not necessary to set the property values which means you use the value by default.

Tuning Performance of JReport Enterprise Server

Many variables affect the performance of JReport Enterprise Server. For example, the hardware and software environment on which JReport Enterprise Server runs. You may or may not have any influence in this regard, but you are able to undertake performance tuning to make JReport Enterprise Server efficient, reliable, and fast.

Cache

The process of viewing reports is the combination of loading the reports from the disk and generating report files. It is obvious that skipping either of two will shorten the elapsed time. JReport Enterprise Server enables the user to cache reports and catalogs in memory, so that it won't have to load them from disks. Therefore the performance will be improved.

Adjust Maximum Number of Handlers

JReport Enterprise Server can respond to requests from the client-side simultaneously. The number of the executed requests is in inverse proportion to the speed of the response. The more requests that are executed, the slower the speed is. To speed up the running, you can set user handlers to be a comparatively small number.

Adjust Engine Priority

The performance of JReport Enterprise Server is influenced by the usage of CPU that JReport engine can occupy. A larger share of the CPU usage will speed up the performance. JReport Enterprise Server provides you with an option entitled Engine Priority to adjust the engine's utilization of CPU to accommodate your own situation. To tune JReport Enterprise Server to the best performance, you can modify this option to enable the engine to share a larger part of the CPU usage when it is running.

Using Queue

JReport Enterprise Server supports Queue control which allows users to customize the number of concurrent reports. Please note that the number of concurrent reports can not exceed the license's permission. You can increase or decrease the queue size by setting the property value of performance.max.reports in server.properties. Considering your computer's usage, you can set this to a proper value to lead to marked improvement in performance. For example, if you have a 6-report license and you don't use the queue control, the running speed may be slowed down. To get a better performance, you can set performance.max.reports = 4 to have only four reports run at the same time, and other two reports wait in the queue till one of the four reports is finished.

Though the default value is 0, it does not mean that no reports are queued. If you do not change the value, then it depends on the license you have purchased. For example, with unlimited-report license, there can be numerous reports running at the same time. If you have 4-report license, it will be up to 4 concurrent active running reports, and other reports wait in the queue.

Index