Elixir Repertoire server configuration files are located in the server configuration directory(./config). The files are
Server configuration
Server log control, log-config.xml: setup the log configuration of the server.
Report Engine configuration, EREngine-config.xml: determines the setup of the rendering parameters for the report engine and the PDF font mapping location.
Other config files are for internal use or debugging purposes.
In ERS2.xml, look out for the codes at the bottom of the document
which suggests about the using of JMS. Replace the name, TestQueue,
to the sending queue name created in Apache (e.g. SQueue).
Next, copy activemq-all-5.1.0.jar from JMS broker and place it in /RepertoireServer/ext then start the server. Start a browser and connect to Repertoire Server Web Interface (http://localhost:8080) and login.
With the JMS broker started, on another browser to go to the JMS broker web interface
(e.g. http://localhost:8161/admin) to send a trigger job message. The message Destination
is set to the sending queue (e.g. SQueue) and Reply To is set to the
receiving queue (e.g. RQueue). The message content format will be as follows :
<trigger>
<run-as-user auth="YWRtaW46c2E="/>
<job path="/testing/JMSbroker.job">
<parameters>
<parameter name="UserAge">26</parameter>
<parameter name="UserName">David Tan</parameter>
<parameter name="UserGender">M</parameter>
</parameters>
</job>
</trigger>
Click on the Send button to send the message. (In this example,
admin is used and is converted to Base64 format.)
On the JMS broker web interface, select RQueue and check for the received message. A message should be received after the job has been processed. The message content should be like the following:
<?xml version="1.0" encoding="UTF-8"?> <trigger-response> <result>OK</result> <details>Job '/testing/JMSbroker.job' completed successfully. </details> <job-log>INFO 2008-05-29 11:33:35,796 Job: Job Start INFO 2008-05-29 11:33:39,718 RenderReport: render "repository:/testing/report/Report.rml",elapsedTime: 3547 pageCount: 1 byteCount: 17921 mimeType: application/pdf statusCode: 1 INFO 2008-05-29 11:33:39,718 Job: Job End Successfully </job-log> </trigger-response>
Back to Repertoire Server web interface, under Logs, click on
server.log. The following extracted logs should be seen:
Thread-51,INFO , jms.JMSTriggerThread - executing Job /testing/JMSbroker.job Thread-51,INFO , Scheduler.Job - Job: Job Start Thread-51,INFO , target.FileTarget - Opened C:\RepertoireServer\bin\..\output \folder1\file.pdf for writing Thread-51,INFO , target.FileTarget - Closed C:\RepertoireServer\bin\..\output \folder1\file.pdf Thread-51,INFO , target.FileTarget - Closed C:\RepertoireServer\bin\..\output \folder1\file.pdf Thread-51,INFO , Scheduler.Job - RenderReport: render "repository:/testing/report/Report.rml",elapsedTime: 3547 pageCount: 1 byteCount: 17921 mimeType: application/pdf statusCode: 1 Thread-51,INFO , Scheduler.Job - Job: Job End Successfully Thread-51,INFO , jms.JMSTriggerThread - Job '/testing/JMSbroker.job' completed successfully.
Check for the generated pdf file in /RepertoireServer/output/folder1. The pdf file will contain the values of the parameters set when creating the JMS message.
In jetty.xml, this property sets the amount of time taken before a session timeout. It can be changed by editing the figure in the following code:
<session maxInactiveInterval="6000"/>
It is mesured in seconds and the default setting is 6000 seconds, which is equivalent to 100 minutes.
In jetty.xml, find the following code:
<anonymous enabled="false" user="public" pass="anonymous"/>
Change it from false to true to enable anonymous login.
Create the User ID through the server web interface as shown in Figure 4.1, “Create a Anonymous User ID”.
Name and Password must be in sync with the choice
of login parameters stated in jetty.xml.
Log off from the web interface and restart the server by shutting down the server and starting it again. Then, go to the Repertoire Server web interface once again. The user will be now able to enter to the page with no prompts for User ID and password unless the user visits the login page explicitly.
Before being able to see the JSP verification page when starting up the server,
there are a few steps to execute. Firstly, in jetty.xml, we will need to
change the following code to
true instead of false, which is the
default setting:
<jsp enabled="false"/>
Next, library files, namely core-3.1.1.jar, jsp-2.1.jar and jsp-api-2.1.jar from Jetty-6.1.0, must be added to /RepertoireServer/ext.
Now, start the server by executing startServer.bat. Open a
browser and enter http://localhost:8080/test/simple.jsp. The user
will be prompted to login. After a successful login, the user will be able to see
the JSP Verification page.
In jetty.xml, look out for the following code:
<mime-types> <mime-type ext="doc" type="application/msword"/> </mime-types>
User can add more extensions which are not recognized by the browser, following the same format as the one given. User can simply add the extension(s) before or after the line in jetty.xml.
Before the server is able to deploy a WAR file, the server has to be configured to support JSP. For information on how to do that, refer to the section called “JSP Support”.
Then, place the WAR in the C: directory. In jetty.xml, look out for the following line:
<war file="C:/hello.war" url="/hello"/>
Enable this line by having it outside of the comments. If the file is saved in C:/Documents and Settings/Admin/ElixirHome, user can define as:
<war file="${elixir.home}/hello.war" url="/hello"/>Save the file and start Repertoire Server. Open a web browser. Enter http://localhost:8080/hello/ in the URL. The web page will then load the JSP file.
The administrator can set log-config.xml found in the /RepertoireServer/log to display logs from one or more particular users. In order to do that, the administrator will need to add in the following set of codes into log-config.xml. The actions of the user(s) will all be captured in a log file named activity-user.log.
<appender name="Activity-User"
class="org.apache.log4j.RollingFileAppender">
<param name="File" value="../log/activity-user.log"/>
<param name="Append" value="false"/>
<param name="Encoding" value="UTF-8"/>
<param name="MaxBackupIndex" value="5"/>
<param name="MaxFileSize" value="500KB"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern"
value="%d{ISO8601},%-5p,%-10X{username}, %m%n"/>
</layout>
<filter class="com.elixirtech.arch.log.UserNameFilter">
<param name="UserName" value="userABC" />
<param name="AcceptOnMatch" value="true" />
</filter>
<filter class="org.apache.log4j.varia.DenyAllFilter"/>
</appender>
If the value set for UserName is userABC, the logs
will be only of userABC. If the administrator wants to capture more than one
particular user, the administrator will need to have additional filter tags
with UserName and AcceptOnMatch attributes.
If the administrator do not want any logs from specified user(s), the administrator will only need to edit the true value to false in AcceptOnMatch attribute and remove the following line from the config file :
<filter class="org.apache.log4j.varia.DenyAllFilter"/>
In order for any changes to take effect, Repertoire Server will need to be restarted.