ContentsDocumentation index |
IntroductionThe SWAD-E portal is a prototype implementation of a semantic web portal which supports one demonstration portal service - the Semantic Web Environmental Directory. The design is intended to be quite flexible and easy to customize. This document offers some information on installation and administration issues. Installation The portal is implemented as a Java web application which requires a Java
servlet container environment that supports the Java Servlet API 2.2.
The prototype runs under tomcat 4.* and 5.* and would probably run in
other containers such as Jetty. This document will assume you have a working
tomcat 5.0.25 installation. If you have an older installation then you
may need to update the version of xerces in the tomcat Before installing the portal application you should create a security rolename
which will control access to the portal administration pages. The simplest
way to do this is to add the following lines to tomcat's
<role rolename="portalAdmin"/>
<user username="user" password="password" roles="portalAdmin"/>
Tomcat has to be restarted to see any changes to this file.
The portal application caches substantial indexes and parts of the RDF in memory for performance reasons (the size of these caches can be configured in the code). This means it may be important to run the servlet container with a large heapsize. For example, in the development system, which also runs other webapps, we run tomcat with JDK parameter -Xmx200M.
Once you have a working tomcat (or similar) you then
need to create or obtain the war file defining the portal application. For the
demonstration portal a prebuilt war file is available for download. Alternatively
the sources include an ant build file
which can build a new war from
the sources (target The portal can run from memory just loading data from files or can run from a database. The demonstration configuration uses a mysql database but any database supported by Jena can be used. However, the prebuilt distributed war file is configured to just use files and memory to simplify initial installation. So with the distributed war file there is no more installation required and the portal should now be working. If you want to change the portal to run from a database you first need a working database installation and then need to create an empty database which will hold the data. In mysql this could be done with the sql commands:
create database swed;
grant all on swed.* TO user@localhost IDENTIFIED BY 'password'
grant all on swed.* TO user@'%' IDENTIFIED BY 'password'
The database name, user and password you choose will have to be edited into
the portal configuration file (portal/WEB-INF/config/sources.n3).
It is useful if your database configuration can keep idle database connections
open. If the database closes the open connection while the portal thinks it is using it
then the portal will attempt to reconnect and continue operation. However, this
recovery code is still under development and it is preferable if the
database doesn't timeout.For mysql the easiest way to ensure
this is to add the following line to the
set-variable = wait_timeout=7884000
You will also need to install a suitable JDBC driver for your database
into the lib directory of the web application. We do not include these drivers
in the distribution due to licensing restrictions. See the
Jena db documentation
for more information on appopriate database versions and drivers to use.
The demonstration system was implemented using MySql 4.0.18 and the
Connector/J
database driver.
Before the portal can use the database it needs to have data put into it. In the
portal configuration file you can specify a number of data file sources. The ant
target AdministrationAside from the harvester controls (see below) there is fairly little administration that is required for the portal. If the portal crashes for some reason (bug, database disconnect, out of memory) then tomcat should automatically restart the application. If that doesn't seem to be working then use the tomcat manager web page and "reload" the portal application. Note that the first time the portal is used after a reload or restart the data files will need to be loaded in which takes on the order of 10 seconds on a modern PC. If you change the portal configuration (sources.n3) or the associated data
it is possible to reload the data without restarting the application.
Go to the portal administration page (linked off the home page, you will
need the username and password you defined for the One maintenance action that might be required is to rebuild the Lucene free text index. When the description of portal objects is changed (through the harvester uploading changed RDF source files) the new object values are added to the text index but older index keys are not removed. Rebuilding the text index will fix this, just select Rebuild text index on the portal administration page. For the SWED data this takes around 1 minute on a modern PC. topLoggingNormal server access logs should be set up in your tomcat (or other) configuration in the normal way.
In addition the portal application itself logs actions such as
the operation of the harvester scans and loading of data files. This logging
uses the Jakara log4j package.
The configuration file which defines how log4j operates is in the webapp at path
HarvesterThe harvester is that part of the portal application which periodically scans a list of known RDF sources and uploads any changed data. To control the operation of the harvester go to the administration page (as above) and select Harvester controls.
|
![]() |
(c) Copyright 2004, Hewlett-Packard Development Company, LP, all rights reserved. |