perfsonar-dev - [pS-dev] [GEANT/SA2/ps-java-services] r5913 - in trunk/perfsonar-java-xml-ls: . db db/eXist db/eXist/classes db/eXist/data log4j/development log4j/production log4j/test packaging packaging/debian src/main/java/org/perfsonar/service/lookupservice/components src/main/java/org/perfsonar/service/lookupservice/servlets src/main/resources/perfsonar/conf src/main/webapp/WEB-INF src/main/webapp/temp src/test/java/org/perfsonar/tests/components src/test/java/org/perfsonar/tests/suite src/test/java/org/perfsonar/tests/utilities src/test/resources/perfsonar/conf
Subject: perfsonar development work
List archive
[pS-dev] [GEANT/SA2/ps-java-services] r5913 - in trunk/perfsonar-java-xml-ls: . db db/eXist db/eXist/classes db/eXist/data log4j/development log4j/production log4j/test packaging packaging/debian src/main/java/org/perfsonar/service/lookupservice/components src/main/java/org/perfsonar/service/lookupservice/servlets src/main/resources/perfsonar/conf src/main/webapp/WEB-INF src/main/webapp/temp src/test/java/org/perfsonar/tests/components src/test/java/org/perfsonar/tests/suite src/test/java/org/perfsonar/tests/utilities src/test/resources/perfsonar/conf
Chronological Thread
- From:
- To:
- Subject: [pS-dev] [GEANT/SA2/ps-java-services] r5913 - in trunk/perfsonar-java-xml-ls: . db db/eXist db/eXist/classes db/eXist/data log4j/development log4j/production log4j/test packaging packaging/debian src/main/java/org/perfsonar/service/lookupservice/components src/main/java/org/perfsonar/service/lookupservice/servlets src/main/resources/perfsonar/conf src/main/webapp/WEB-INF src/main/webapp/temp src/test/java/org/perfsonar/tests/components src/test/java/org/perfsonar/tests/suite src/test/java/org/perfsonar/tests/utilities src/test/resources/perfsonar/conf
- Date: Tue, 3 Apr 2012 18:48:30 +0100 (BST)
Author: dante.delvaux
Date: 2012-04-03 18:48:30 +0100 (Tue, 03 Apr 2012)
New Revision: 5913
Added:
trunk/perfsonar-java-xml-ls/db/eXist/
trunk/perfsonar-java-xml-ls/db/eXist/classes/
trunk/perfsonar-java-xml-ls/db/eXist/classes/conf.xml
trunk/perfsonar-java-xml-ls/db/eXist/data/
trunk/perfsonar-java-xml-ls/db/eXist/data/README
trunk/perfsonar-java-xml-ls/log4j/development/log4j.xml
trunk/perfsonar-java-xml-ls/log4j/production/log4j.xml
trunk/perfsonar-java-xml-ls/log4j/test/log4j.xml
Removed:
trunk/perfsonar-java-xml-ls/log4j/development/log4j.properties
trunk/perfsonar-java-xml-ls/log4j/production/log4j.properties
trunk/perfsonar-java-xml-ls/log4j/test/log4j.properties
Modified:
trunk/perfsonar-java-xml-ls/
trunk/perfsonar-java-xml-ls/packaging/debian/changelog
trunk/perfsonar-java-xml-ls/packaging/debian/conffiles
trunk/perfsonar-java-xml-ls/packaging/debian/control
trunk/perfsonar-java-xml-ls/packaging/debian/perfsonar-java-xml-ls.dirs
trunk/perfsonar-java-xml-ls/packaging/debian/perfsonar-java-xml-ls.postinst
trunk/perfsonar-java-xml-ls/packaging/debian/perfsonar-java-xml-ls.postrm
trunk/perfsonar-java-xml-ls/packaging/debian/perfsonar-java-xml-ls.preinst
trunk/perfsonar-java-xml-ls/packaging/package.sh
trunk/perfsonar-java-xml-ls/pom.xml
trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/components/XMLDBComponent.java
trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/servlets/ExistDbInitializerServlet.java
trunk/perfsonar-java-xml-ls/src/main/resources/perfsonar/conf/configuration.xml
trunk/perfsonar-java-xml-ls/src/main/resources/perfsonar/conf/webAdminConfig.xml
trunk/perfsonar-java-xml-ls/src/main/webapp/WEB-INF/web.xml
trunk/perfsonar-java-xml-ls/src/main/webapp/temp/link_creator.sh
trunk/perfsonar-java-xml-ls/src/test/java/org/perfsonar/tests/components/DataSourceComponentTest.java
trunk/perfsonar-java-xml-ls/src/test/java/org/perfsonar/tests/suite/LSTestSuite.java
trunk/perfsonar-java-xml-ls/src/test/java/org/perfsonar/tests/utilities/ExistDBInitializerTests.java
trunk/perfsonar-java-xml-ls/src/test/resources/perfsonar/conf/configuration.xml
Log:
Embedding eXist DB jar within our code, so we don't need to deploy the eXist
DB externally. This improves performance, refs PSSERVICES-613.
Preparing package for Debian 6 (squeeze), refs PSSERVICES-609.
Property changes on: trunk/perfsonar-java-xml-ls
___________________________________________________________________
Modified: svn:ignore
- jars
bin
target
.classpath
.project
.settings
.gitignore
+ jars
bin
target
.classpath
.project
.settings
.gitignore
.externalToolBuilders
Added: trunk/perfsonar-java-xml-ls/db/eXist/classes/conf.xml
===================================================================
--- trunk/perfsonar-java-xml-ls/db/eXist/classes/conf.xml
(rev 0)
+++ trunk/perfsonar-java-xml-ls/db/eXist/classes/conf.xml 2012-04-03
17:48:30 UTC (rev 5913)
@@ -0,0 +1,703 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ This is the central configuration file for the database. If the database
+ is running in a servlet-context, the configuration file will be read from
+ the WEB-INF directory of the web application. Otherwise, the
configuration
+ is read from the directory specified by the exist.home system property.
+
+ Structure of this xml document:
+
+ exist
+ cluster
+ db-connection
+ default-permissions
+ pool
+ recovery
+ security
+ watchdog
+ indexer
+ scheduler
+ job
+ serializer
+ transformer
+ validation
+ xquery
+ builtin-modules
+ module
+ xupdate
+
+
+ For detailed and latest information please consult the eXist
documentation:
+
+ - http://exist-db.org/configuration.html
+ - http://exist-db.org/cluster.html
+ - http://exist-db.org/documentation.html
+ - http://atomic.exist-db.org/
+
+ $Id: conf.xml.tmpl 9134 2009-06-13 11:35:31Z wolfgang_m $
+
+-->
+<exist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="schema/conf.xsd">
+
+ <!--
+ Configures the cluster configuration
+
+ - dbaUser:
+ defines the user used by the cluster for the replica.
+
+ - dbaPassword:
+ defines the user password used by the cluster for the replica.
+
+ - exclude:
+ some collections should be signed as no-replicated collections
i.e.
+ during the replica phase eXist cluster environment doesn't send
+ events based on these collections, colon is the separator char
when
+ more than one collection is added.
+
+ - journalDir:
+ specifies the folder where the eXist cluster node saves its
journal
+ file. Directory is automatically created if it doesn't exist. If
no
+ journaldir is specified, journal is disabled.
+
+ - protocol:
+ defines a protocol stack. Refers the jgroups protocol stack.
+ -->
+ <cluster dbaPassword="" dbaUser="admin"
exclude="/db/system,/db/system/config"
+ journalDir="../data/journal"
+
protocol="UDP(mcast_addr=228.1.2.3;mcast_port=45566;ip_ttl=8;ip_mcast=true;mcast_send_buf_size=800000;mcast_recv_buf_size=150000;ucast_send_buf_size=800000;ucast_recv_buf_size=150000;loopback=true):PING(timeout=2000;num_initial_members=3;up_thread=true;down_thread=true):MERGE2(min_interval=10000;max_interval=20000):FD(shun=true;up_thread=true;down_thread=true;timeout=2500;max_tries=5):VERIFY_SUSPECT(timeout=3000;num_msgs=3;up_thread=true;down_thread=true):pbcast.NAKACK(gc_lag=50;retransmit_timeout=300,600,1200,2400,4800;max_xmit_size=8192;up_thread=true;down_thread=true):UNICAST(timeout=300,600,1200,2400,4800;window_size=100;min_threshold=10;down_thread=true):pbcast.STABLE(desired_avg_gossip=20000;up_thread=true;down_thread=true):FRAG(frag_size=8192;down_thread=true;up_thread=true):pbcast.GMS(join_timeout=5000;join_retry_timeout=2000;shun=true;print_local_addr=true)"/>
+
+ <!--
+ Configures the database backend:
+
+ - cacheSize:
+ the maximum amount of memory to use for database page buffers.
+ Each database file has an associated page buffer for B+-tree and
+ data pages. However, the memory specified via cacheSize is shared
+ between all page buffers. It represents an absolute maximum,
which
+ would be occupied if all page buffers were completely full.
+
+ The cacheSize should not be more than half of the size of the
JVM
+ heap size (set by the JVM -Xmx parameter).
+
+ - collectionCache:
+ maximum amount of memory (in megabytes) to use for collection
caches.
+ Memory calculation is just approximate. If your collections are
very different
+ in size, it might be possible that the actual amount of memory
used exceeds
+ the specified limit. You should thus be careful with this
setting.
+
+ - database:
+ selects a database backend. Currently, "native" and
"native_cluster"
+ are the only valid setting.
+
+ - files:
+ path to the directory where database files are stored.
+
+ - pageSize:
+ the size of one page on the disk. This is the smallest unit
+ transferred from and to the database files. Should be a multiple
of
+ the operating system's file system page size (usually 4096).
+
+ =====================================================================
+
+ The settings below are very conservative to avoid out-of-memory
+ exceptions on machines with limited memory (256MB).
+
+ Increase the buffer settings for elements_buffers and words_buffers
if
+ you have some more memory to waste. If you deal with lots of
+ collections, you can also increase the collectionCacheSize value
+ -->
+ <db-connection cacheSize="96M" collectionCache="24M" database="native"
+ files="../data" pageSize="4096">
+
+ <!--
+ Specifies the default permissions for all resources and
collections
+ in eXist (see User Authentication and Access Control). When
this is
+ not configured, the default "mod" (similar to the Unix "chmod"
+ command) is set to 0775 in the resources and collections
attributes.
+
+ A different default value may be set for a database instance,
and
+ local overrides are also possible.
+ -->
+ <!--default-permissions collection="0775" resource="0775" /-->
+
+ <!--
+ Settings for the database connection pool:
+
+ - min:
+ minimum number of connections to keep alive.
+
+ - max:
+ maximum number of connections allowed.
+
+ - sync-period:
+ defines how often the database will flush its
+ internal buffers to disk. The sync thread will interrupt
+ normal database operation after the specified number of
+ milliseconds and write all dirty pages to disk.
+
+ - wait-before-shutdown:
+ defines how long the database instance will wait for running
+ operations to complete before it forces a shutdown. Forcing
+ a shutdown may leave the db in an unclean
state and may
+ trigger a recovery run on restart.
+
+ Setting wait-before-shutdown="-1" means that
the server will
+ wait for all threads to return, no matter how
long it takes.
+ No thread will be killed.
+ -->
+ <!--pool max="1" min="1" sync-period="120000"
wait-before-shutdown="10000"/-->
+ <pool max="5" min="1" sync-period="120000"
wait-before-shutdown="10000"/>
+
+ <!--
+ Configure the query pool.
+ - max-stack-size:
+ maximum number of queries in the query-pool.
+
+ - size:
+ number of copies of the same query kept in the
query-pool.
+ Value "-1" effectively disables caching. Queries
cannot be shared
+ by threads, each thread needs a private copy of a
query.
+
+ - timeout:
+ amount of time that a query will be cached in the
query-pool.
+
+ - timeout-check-interval:
+ time between checking for timed out queries. For
value "-1"
+ the time out is switched off, resulting cached
queries to remain
+ in the cache forever.
+ -->
+ <!--query-pool max-stack-size="5" size="128" timeout="120000"
+ timeout-check-interval="30000"/-->
+
+ <!--
+ Settings for the journaling and recovery of the database. With
+ recovery enabled, the database is able to recover from an unclean
+ database shutdown due to, for example, power failures, OS
reboots,
+ and hanging processes. For this to work correctly, all database
+ operations must be logged to a journal file.
+
+ - enabled:
+ if this attribute is set to yes, automatic recovery is
enabled.
+
+ - journal-dir:
+ this attribute sets the directory where journal files are to
be
+ written. If no directory is specified, the default path is to
+ the data directory.
+
+ - size:
+ this attributes sets the maximum allowed size of the journal
+ file. Once the journal reaches this limit, a checkpoint will
be
+ triggered and the journal will be cleaned. However, the
database
+ waits for running transactions to return before processing
this
+ checkpoint. In the event one of these transactions writes a
lot
+ of data to the journal file, the file will grow until the
+ transaction has completed. Hence, the size limit is not
enforced
+ in all cases.
+
+ - sync-on-commit:
+ this attribute determines whether or not to protect the
journal
+ during operating system failures. That is, it determines
whether
+ the database forces a file-sync on the journal after every
+ commit.
+ If this attribute is set to "yes", the journal is protected
+ against operating system failures. However, this will slow
+ performance - especially on Windows systems.
+ If set to "no", eXist will rely on the operating system to
flush
+ out the journal contents to disk. In the worst case
scenario,
+ in which there is a complete system failure, some committed
+ transactions might not have yet been written to the journal,
+ and so will be rolled back.
+
+ - group-commit:
+ If set to "yes", eXist will not sync the journal file
+ immediately after every transaction commit. Instead,
+ it will wait until the current file buffer (32kb)
+ is really full. This can speed up eXist on some systems
+ where a file sync is an expensive operation (mainly windows
+ XP; not necessary on Linux). However, group-comit="yes"
+ will increase the risk of an already committed
+ operation being rolled back after a database crash.
+
+ - force-restart:
+ Try to restart the db even if crash recovery
failed. This is
+ dangerous because there might be corruptions
inside the
+ data files. The transaction log will be
cleared, all locks removed
+ and the db reindexed.
+
+ Set this option to "yes" if you need to make
sure that the db is
+ online, even after a fatal crash. Errors
encountered during recovery
+ are written to the log files. Scan the log
files to see if any problems
+ occurred.
+
+ - consistency-check:
+ If set to "yes", a consistency check will be
run on the database
+ if an error was detected during crash
recovery. This option requires
+ force-restart to be set to "yes", otherwise
it has no effect.
+
+ The consistency check outputs a report to the
directory {files}/sanity
+ and if inconsistencies are found in the db,
it writes an emergency
+ backup to the same directory.
+ -->
+ <recovery enabled="yes" group-commit="no" size="100M"
+ sync-on-commit="no" force-restart="no" consistency-check="yes"/>
+
+ <!--
+ The <security> element in the <db-connection> node is used to
select
+ the security manager Class and control the database of users and
+ groups.
+
+ - class:
+ this attribute is required, and specifies a Java class name
used
+ to implement the org.exist.security.SecurityManager
interface,
+ as in the following example:
+
+ Example: <security> class Attribute (LDAP)
+ <security class="org.exist.security.LDAPSecurityManager" />
+
+ eXist is distributed with the following built-in security manager
+ implementations:
+
+ - org.exist.security.XMLSecurityManager
+
+ stores the user information in the database. This is the
+ default manager if the <security> element is not included
+ in <db-connection>.
+
+ - org.exist.security.LDAPSecurityManager
+
+ retrieves the user and groups from the LDAP database. This
+ requires addition configuration parameters which are
+ described in the LDAP Security Manager documentation.
+
+ - password-encoding:
+ password encoding can be set to one of the following types:
+
+ - plain:
+ applies plain encryption.
+
+ - md5: (default)
+ applies the MD5 algorithm to encrypt passwords.
+
+ - simple-md5:
+ applies a simplified MD5 algorithm to encrypt passwords.
+
+ - password-realm:
+ the realm to use for basic auth or http-digest password
+ challenges.
+ -->
+ <!-- security class="org.exist.security.LDAPSecurityManager" /-->
+
+ <!--
+ This is the global configuration for the query watchdog. The
+ watchdog monitors all query processes, and can terminate any
+ long-running queries if they exceed one of the predefined
limits.
+ These limits are as follows:
+
+ - output-size-limit
+ this attribute limits the size of XML fragments constructed
+ using XQuery, and thus sets the maximum amount of main
memory a
+ query is allowed to use. This limit is expressed as the
maximum
+ number of nodes allowed for an in-memory DOM tree. The
purpose
+ of this option is to avoid memory shortages on the server in
+ cases where users are allowed to run queries that produce
very
+ large output fragments.
+
+ - query-timeout
+ this attribute sets the maximum amount of time (expressed in
+ milliseconds) that the query can take before it is killed..
+
+ -->
+ <watchdog output-size-limit="10000" query-timeout="-1"/>
+
+ </db-connection>
+
+ <!--
+ Settings for the indexer:
+
+ - caseSensitive:
+ should equality comparisons between strings be case-sensitive or
+ insensitive: "yes" or "no".
+
+ - index-depth:
+ defines the maximum nesting depth of nodes which will be indexed
+ in the DOM index. Nodes below the specified nesting depth will
+ not be indexed in the DOM file. This has only an effect when
+ retrieving query results or for some types of XPath
subexpressions,
+ like equality comparisons.
+
+ - stemming:
+ eXist includes a very simple english language stemmer, based on
+ Porter's algorithm. Set the "stemming"-option to "true" if you
+ would like to use stemming. This does only work for english.
+
+ - suppress-whitespace:
+ should leading or trailing whitespace be removed from a text
node?
+ Set to "leading", "trailing", "both" or "none".
+ Changing the parameter will only have an effect on newly loaded
+ files, not old ones.
+
+ - suppress-whitespace-mixed-content:
+ preserve the white space inside a mixed content node
+
+ - tokenizer:
+ this attribute invokes the Java class used to tokenize a string
into
+ a sequence of single words or tokens, which are stored to the
+ fulltext index. Currently only the SimpleTokenizer is available.
+
+ - track-term-freq:
+ not documented.
+ -->
+ <indexer caseSensitive="yes" index-depth="5"
preserve-whitespace-mixed-content="yes"
+ stemming="no" suppress-whitespace="none"
+ tokenizer="org.exist.storage.analysis.SimpleTokenizer"
track-term-freq="yes">
+
+ <modules>
+ <module id="ngram-index"
class="org.exist.indexing.ngram.NGramIndex" file="ngram.dbx"
+ n="3"/>
+ <!--
+ <module id="spatial-index"
class="org.exist.indexing.spatial.GMLHSQLIndex"
+ connectionTimeout="10000" flushAfter="300" />
+ -->
+ <!-- The full text index is always required and should
+ not be disabled. We still have some
dependencies on
+ this index in the database core. These will be removed
+ once the redesign has been completed. -->
+ <module id="ft-legacy-index"
class="org.exist.fulltext.FTIndex"/>
+ </modules>
+
+ <!--
+ The file for this element points to a file containing a list of
+ stopwords. Note that stopwords are NOT added to the fullext
index.
+ -->
+ <stopwords file="stopword"/>
+
+ <!--
+ Default index settings. Default settings apply if there's no
+ collection-specific configuration for a collection.
+ -->
+ <index>
+ <fulltext attributes="true" default="all">
+ <exclude path="/auth"/>
+ </fulltext>
+ </index>
+ </indexer>
+
+ <!--
+ Configures user jobs for the scheduler
+ -->
+ <scheduler>
+ <!--
+ Job definitions:
+
+ - type:
+ The type of the job to schedule. Must be either "startup",
"system" or "user".
+
+ startup - Startup jobs are executed once during the
+ database startup but before the database becomes
available,
+ these jobs are synchronous.
+
+ system - System jobs require the database to be in a
consistent state.
+ All database operations will be stopped until the method
returns or
+ throws an exception. Any exception will be caught and a
warning written to
+ the log.
+
+ user - User jobs may be scheduled at any time and may be
mutually exclusive
+ or non-exclusive
+
+ - class:
+ If the job is written in Java then this should be the name of the
+ class that extends either -
+ org.exist.scheduler.StartupJob
+ org.exist.storage.SystemTask
+ org.exist.scheduler.UserJavaJob
+
+ - xquery:
+ If the job is written in XQuery (not suitable for system jobs)
then this should
+ be a path to an XQuery stored in the database. e.g.
/db/myCollection/myJob.xql
+ XQuery job's will be launched under the guest account initially,
+ although the running XQuery may switch permissions through
+ calls to xmldb:login().
+
+ - cron-trigger:
+ To define a firing pattern for the Job using Cron style syntax
+ use this attribute otherwise for a periodic job use the period
+ attribute. Not applicable to startup jobs.
+
+ - period:
+ Can be used to define an explicit period for firing the job
instead
+ of a Cron style syntax. The period should be in milliseconds.
+ Not applicable to startup jobs.
+
+ - delay:
+ Can be used with a period to delay the start of a job. If
unspecified jobs
+ will start as soon as the database and scheduler are initialised.
+
+ - repeat:
+ Can be used with a period to define for how many periods a job
should be
+ executed. If unspecified jobs will repeat for every period
indefinitely.
+ -->
+ <!-- job class="bar.foo.myjob" period="600000" delay="300000"
repeat="10" /-->
+ <!--
+ Run a consistency check on the database. This will detect
inconsistencies
+ or corruptions in documents or the collection store. The task
can also
+ be used to create automatic backups. The backup routine is
faster than
+ the one in the standard backup tool and it tries to export as
much data
+ as possible, even if parts of the collection tree are destroyed.
+
+ If errors are detected during the consistency check, the job will
+ automatically start creating a backup.
+
+ Errors are reported via the JMX object with the name:
+
+ org.exist.management.tasks:type=ConsistencyCheckTask
+
+ Parameters:
+ output The output directory used by the job. The path is
interpreted
+ relative to the data directory (WEB-INF/data).
+
+ backup Set to "yes" to create a backup whenever the job
runs, not just
+ when it detects errors.
+ -->
+ <!--
+ <job type="system" name="check1"
+ class="org.exist.storage.ConsistencyCheckTask"
+ cron-trigger="0 0 * * * ?">
+ <parameter name="output" value="sanity"/>
+ <parameter name="backup" value="no"/>
+ </job>
+ -->
+ <!-- Automatically creates a copy of the database .dbx files every 2
minutes
+ Parameters:
+ output-dir:
+ The directory into which the copy will be
written
+ -->
+
+ <!--
+ <job type="system" name="databackup"
+ class="org.exist.storage.DataBackup" period="120000">
+ <parameter name="output-dir" value="backup" />
+ </job-->
+ <!-- Automatically creates a backup of the database every 6 hours.
+
+ Parameters:
+ dir:
+ The directory into which the backup will be written.
+ suffix:
+ File suffix for the generated backup file or directory.
Specify
+ .zip to write the backup into a .zip. Otherwise, the
backup will
+ be written to a plain directory. The name of the final
backup
+ file or directory will be: prefix + current-date +
suffix.
+ prefix:
+ File prefix for the generated backup file or directory.
+
+ -->
+ <job type="system" name="backup"
+ class="org.exist.storage.BackupSystemTask"
+ cron-trigger="0 0 */6 * * ?">
+ <parameter name="dir" value="backup"/>
+ <parameter name="suffix" value=".zip"/>
+ <parameter name="prefix" value="backup-"/>
+ <parameter name="collection" value="/db"/>
+ <parameter name="user" value="admin"/>
+ <parameter name="password" value=""/>
+ <parameter name="zip-files-max" value="28"/>
+ </job>
+ </scheduler>
+
+ <!--
+ Default settings for the serializer. Most of these can be changed
+ by client code:
+
+ - add-exist-id:
+ for debugging: add an exist:id attribute to every element,
showing
+ the internal node identifier (as a long int) assigned to this
node.
+ Possible values are: "none", "element", "all". "all" displays
the
+ node of every element node; "element" displays the id only for
the
+ root nodes of the returned XML fragments.
+
+ - compress-output:
+ should the output be compressed when serializing documents?
+ Sometimes useful with remote clients.
+ Remember to add a statement like this to your client code:
+ service.setProperty("compress-output", "yes");
+ to uncompress the retrieved result in the client too.
+
+ - enable-xinclude:
+ should the database expand XInclude tags by default?
+
+ - enable-xsl:
+ should the database evaluate XSL processing instructions
+ when serializing documents?
+
+ - indent:
+ should the serializer pretty-print (indent) XML?
+
+ - match-tagging-attributes:
+ matches for attribute values can also be tagged using the
character
+ sequence "||" to demarcate the matching text string. Since this
+ changes the content of the attribute value, the feature is
disabled
+ by default.
+
+ - match-tagging-elements:
+ the database can highlight matches in the text content of a node
by
+ tagging the matching text string with <exist:match>. Clearly,
this
+ only works for XPath expressions using the fulltext index.
+
+ Set the parameter to "yes" to enable this feature.
+
+ -->
+ <serializer add-exist-id="none" compress-output="no"
enable-xinclude="yes" enable-xsl="no"
+ indent="yes" match-tagging-attributes="no"
match-tagging-elements="no"/>
+
+ <!--
+ Default settings for the XSLT Transformer. Allow's for a choice of
+ implementation:
+
+ - class:
+ the name of the class that implements
javax.xml.transform.TransformerFactory
+
+ for Saxon (XSLT 2.0 support) -
net.sf.saxon.TransformerFactoryImpl
+
+ You will need to copy saxon8.jar saxon8-dom.jar and
saxon8-xpath.jar
+ into lib/endorsed.
+ You can get these from http://sourceforge.net/projects/saxon
+
+ for Xalan (XSLT 1.0 support) -
org.apache.xalan.processor.TransformerFactoryImpl
+
+
+ For further details see -
http://atomic.exist-db.org/wiki/HowTo/XSLT2/
+
+ You can also include attribute child elements, if you wish to pass
in attributes
+ to your particular TransformerFactory as follows:
+
+ <transformer class="net.sf.saxon.TransformerFactoryImpl">
+ <attribute
name="http://saxon.sf.net/feature/version-warning" value="false"
type="boolean"/>
+ </transformer>
+
+ The example above sets Saxon to suppress warnings when executing a
XSLT 1.0 stylesheet
+ with the XLST 2.0 processor. Check the documentation for your
selected TransformerFactory
+ to determine which attributes can be set. Valid types include
"boolean", "integer"
+ and "string". Anything else will be treated as type "string".
+
+ -->
+ <transformer class="org.apache.xalan.processor.TransformerFactoryImpl"/>
+
+ <!--
+ Settings for XML validation
+ - mode
+ should XML source files be validated against a schema or DTD
before
+ storing them? The setting is passed to the XML parser. The actual
+ effects depend on the parser you use. eXist comes with Xerces
which
+ can validate against both: schemas and DTDs.
+
+ Possible values: "yes", "no", "auto". "auto" will leave
validation
+ to the parser.
+
+ -->
+ <validation mode="auto">
+ <!--
+ Specify the location of one or more catalog files. Catalogs are
+ used to resolve external entities in XML documents.
+
+ "${WEBAPP_HOME}" can be used as magic string.
+ -->
+ <entity-resolver>
+ <catalog uri="catalog.xml"/>
+ </entity-resolver>
+ </validation>
+
+ <!--
+ Define modules that contain xQuery functions.
+
+ - enable-java-binding:
+ eXist supports calls to arbitrary Java methods from within
+ XQuery. Setting to "yes" might introduce a security risk.
+ - enable-query-rewriting:
+ Set to "yes" to enable the new query-rewriting optimizer.
This is
+ work in progress and may lead to incorrect queries. Use at
your own
+ risk.
+ - backwardCompatible:
+ Set to "yes" to enable backward compatibility (untyped
argument checks for instance)
+ -->
+ <xquery enable-java-binding="no" enable-query-rewriting="yes"
backwardCompatible="no">
+ <builtin-modules>
+ <!-- Default Modules -->
+ <module class="org.exist.xquery.functions.util.UtilModule"
+ uri="http://exist-db.org/xquery/util"/>
+ <module
class="org.exist.xquery.functions.transform.TransformModule"
+ uri="http://exist-db.org/xquery/transform"/>
+ <module class="org.exist.xquery.functions.xmldb.XMLDBModule"
+ uri="http://exist-db.org/xquery/xmldb"/>
+ <module
class="org.exist.xquery.functions.response.ResponseModule"
+ uri="http://exist-db.org/xquery/response"/>
+ <module class="org.exist.xquery.functions.session.SessionModule"
+ uri="http://exist-db.org/xquery/session"/>
+ <module class="org.exist.xquery.functions.text.TextModule"
+ uri="http://exist-db.org/xquery/text"/>
+ <module
class="org.exist.xquery.functions.validation.ValidationModule"
+ uri="http://exist-db.org/xquery/validation"/>
+ <module class="org.exist.xquery.functions.system.SystemModule"
+ uri="http://exist-db.org/xquery/system"/>
+
+ <!-- New Modularized Indexes -->
+ <module class="org.exist.xquery.modules.ngram.NGramModule"
+ uri="http://exist-db.org/xquery/ngram"/>
+ <!--
+ <module class="org.exist.xquery.functions.request.RequestModule"
+ uri="http://exist-db.org/xquery/request"/>
+ <module class="org.exist.xquery.modules.example.ExampleModule"
+ uri="http://exist-db.org/xquery/examples"/>
+ <module class="org.exist.xquery.modules.spatial.SpatialModule"
+ uri="http://exist-db.org/xquery/spatial" />
+ -->
+
+ <!-- Optional Modules -->
+ <!--
+ <module
class="org.exist.xquery.modules.compression.CompressionModule"
+ uri="http://exist-db.org/xquery/compression" />
+ <module class="org.exist.xquery.modules.datetime.DateTimeModule"
+ uri="http://exist-db.org/xquery/datetime" />
+ <module class="org.exist.xquery.modules.example.ExampleModule"
+ uri="http://exist-db.org/xquery/examples" />
+ <module
class="org.exist.xquery.modules.httpclient.HTTPClientModule"
+ uri="http://exist-db.org/xquery/httpclient" />
+ <module class="org.exist.xquery.modules.image.ImageModule"
+ uri="http://exist-db.org/xquery/image" />
+ <module class="org.exist.xquery.modules.mail.MailModule"
+ uri="http://exist-db.org/xquery/mail" />
+ <module class="org.exist.xquery.modules.math.MathModule"
+ uri="http://exist-db.org/xquery/math" />
+ <module
class="org.exist.xquery.modules.scheduler.SchedulerModule"
+ uri="http://exist-db.org/xquery/scheduler" />
+ <module class="org.exist.xquery.modules.simpleql.SimpleQLModule"
+ uri="http://exist-db.org/xquery/simple-ql" />
+ <module class="org.exist.xquery.modules.sql.SQLModule"
+ uri="http://exist-db.org/xquery/sql" />
+ <module class="org.exist.xquery.modules.xslfo.XSLFOModule"
+ uri="http://exist-db.org/xquery/xslfo" />
+ <module class="org.exist.xquery.modules.xmldiff.XmlDiffModule"
+ uri="http://exist-db.org/xquery/xmldiff" />
+ -->
+ </builtin-modules>
+ </xquery>
+
+ <!--
+ Inserting new nodes into a document can lead to fragmentation
+ in the DOM storage file.
+
+ - allowed-fragmentation:
+ defines the maximum number of page splits allowed within a
document
+ before a defragmentation run will be triggered.
+
+ - enable-consistency-checks:
+ for debugging only. If the parameter is set to "yes", a
consistency
+ check will be run on every modified document after every XUpdate
+ request. It checks if the persistent DOM is complete and all
+ pointers in the structural index point to valid storage
addresses
+ containing valid nodes.
+
+ -->
+ <xupdate allowed-fragmentation="100" enable-consistency-checks="no"/>
+
+</exist>
Property changes on: trunk/perfsonar-java-xml-ls/db/eXist/classes/conf.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: trunk/perfsonar-java-xml-ls/db/eXist/data/README
===================================================================
--- trunk/perfsonar-java-xml-ls/db/eXist/data/README
(rev 0)
+++ trunk/perfsonar-java-xml-ls/db/eXist/data/README 2012-04-03 17:48:30
UTC (rev 5913)
@@ -0,0 +1 @@
+Directory to hold eXist database files. See conf.xml eXist file.
\ No newline at end of file
Deleted: trunk/perfsonar-java-xml-ls/log4j/development/log4j.properties
===================================================================
--- trunk/perfsonar-java-xml-ls/log4j/development/log4j.properties
2012-04-03 15:43:58 UTC (rev 5912)
+++ trunk/perfsonar-java-xml-ls/log4j/development/log4j.properties
2012-04-03 17:48:30 UTC (rev 5913)
@@ -1,20 +0,0 @@
-log4j.rootLogger=WARN, stdout
-
-#log4j.logger.org.perfsonar=INFO
-#log4j.logger.org.perfsonar.service.lookupservice=INFO
-#log4j.logger.org.perfsonar.service.lookupservice.DiscoveryQueryGenerator=TRACE
-#log4j.logger.org.perfsonar.service.lookupservice.LSRegisterServiceEngine=TRACE
-#log4j.logger.org.perfsonar.service.lookupservice.LSQueryServiceEngine=DEBUG
-#log4j.logger.org.perfsonar.service.lookupservice.LSDiscoveryAction=DEBUG
-#log4j.logger.org.perfsonar.service.lookupservice.components=DEBUG
-#log4j.logger.org.perfsonar.service.lookupservice.components.XMLDBComponent=TRACE
-#log4j.logger.org.perfsonar.service.lookupservice.storage=DEBUG
-#log4j.logger.org.perfsonar.service.lookupservice.storage.exist.dao=DEBUG
-log4j.logger.org.perfsonar.tests=INFO
-#log4j.logger.org.perfsonar.base2.service.configuration=DEBUG
-#log4j.logger.org.exist.xmldb=DEBUG
-#log4j.logger.org.exist.protocolhandler.xmlrpc=DEBUG
-
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d - [%p] %c{1}:%L - %m%n
Added: trunk/perfsonar-java-xml-ls/log4j/development/log4j.xml
===================================================================
--- trunk/perfsonar-java-xml-ls/log4j/development/log4j.xml
(rev 0)
+++ trunk/perfsonar-java-xml-ls/log4j/development/log4j.xml 2012-04-03
17:48:30 UTC (rev 5913)
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM
"http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">
+
+<!-- This is the configuration for LOG4J for perfSONAR development purposes
-->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+ <!-- Section: APPENDERS -->
+
+ <!--
+ writes log messages to the console. It outputs file name,
+ method name and line number of the caller. This is slow,
+ so just use it for debugging.
+ -->
+ <appender name="console" class="org.apache.log4j.ConsoleAppender">
+ <layout class="org.apache.log4j.PatternLayout">
+<!-- <param name="ConversionPattern" value="%d{DATE} [%t] %-5p
(%F [%M]:%L) - %m %n"/> -->
+ <param name="ConversionPattern" value="%d - [%p] %c{1}[%M]:%L -
%m%n"/>
+ </layout>
+ </appender>
+
+ <appender name="exist" class="org.apache.log4j.RollingFileAppender">
+ <param name="File" value="/var/log/perfsonar-java-xml-ls/exist.log"/>
+ <param name="MaxFileSize" value="10MB"/>
+ <param name="MaxBackupIndex" value="7"/>
+ <param name="Encoding" value="UTF-8"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d [%t] %-5p (%F [%M]:%L)
- %m %n"/>
+ </layout>
+ </appender>
+ <appender name="perfsonar" class="org.apache.log4j.RollingFileAppender">
+ <param name="File"
value="/var/log/perfsonar-java-xml-ls/perfsonar.log"/>
+ <param name="MaxFileSize" value="10MB"/>
+ <param name="MaxBackupIndex" value="7"/>
+ <param name="Encoding" value="UTF-8"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d [%t] %-5p (%F [%M]:%L)
- %m %n"/>
+ </layout>
+ </appender>
+
+ <!--
+ Axis produces a large amount of debugging output if
+ priority is set to debug
+ -->
+ <category name="org.apache" additivity="false">
+ <priority value="off"/>
+ <appender-ref ref="console"/>
+ </category>
+
+ <category name="xquery.profiling" additivity="false">
+ <priority value="warn"/>
+ <appender-ref ref="console"/>
+ </category>
+
+ <category name="org.exist.xmldb" additivity="false">
+ <priority value="info"/>
+ <appender-ref ref="console"/>
+ </category>
+
+ <category name="org.exist.storage" additivity="false">
+ <priority value="info"/>
+ <appender-ref ref="console"/>
+ </category>
+
+ <category name="org.exist.storage.btree" additivity="false">
+ <priority value="warn"/>
+ <appender-ref ref="console"/>
+ </category>
+
+ <category name="org.exist.security" additivity="false">
+ <priority value="warn"/>
+ <appender-ref ref="console"/>
+ </category>
+
+ <category name="org.exist.xquery" additivity="false">
+ <priority value="warn"/>
+<!-- <priority value="debug"/> -->
+ <appender-ref ref="console"/>
+ </category>
+
+ <!-- perfSONAR XML LS -->
+ <category name="org.perfsonar.service.lookupservice" additivity="false">
+ <level value="warn"/>
+<!-- <appender-ref ref="perfsonar"/>-->
+ <appender-ref ref="console"/>
+ </category>
+ <category name="org.perfsonar.service.lookupservice" additivity="false">
+ <level value="info"/>
+ <appender-ref ref="console"/>
+ </category>
+ <!--
+ <category name="org.perfsonar.service.lookupservice.components"
additivity="false">
+ <level value="trace"/>
+ <appender-ref ref="console"/>
+ </category>
+ -->
+
+ <!-- perfSONAR XML LS Unit tests -->
+ <category name="org.perfsonar.tests" additivity="false">
+ <level value="info"/>
+ <appender-ref ref="console"/>
+ </category>
+
+ <!-- Section: ROOT logger -->
+
+ <root>
+ <priority value="warn"/>
+<!-- <appender-ref ref="exist"/>-->
+ <appender-ref ref="console"/>
+ </root>
+
+</log4j:configuration>
Property changes on: trunk/perfsonar-java-xml-ls/log4j/development/log4j.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: trunk/perfsonar-java-xml-ls/log4j/production/log4j.properties
===================================================================
--- trunk/perfsonar-java-xml-ls/log4j/production/log4j.properties
2012-04-03 15:43:58 UTC (rev 5912)
+++ trunk/perfsonar-java-xml-ls/log4j/production/log4j.properties
2012-04-03 17:48:30 UTC (rev 5913)
@@ -1,8 +0,0 @@
-log4j.rootLogger=WARN, out
-
-log4j.appender.out=org.apache.log4j.RollingFileAppender
-log4j.appender.out.MaxFileSize=100KB
-log4j.appender.out.MaxBackupIndex=1
-log4j.appender.out.layout=org.apache.log4j.PatternLayout
-log4j.appender.out.layout.ConversionPattern=[%p] %c{1} - %m%n
-log4j.appender.out.File=/var/log/perfsonar-java-xml-ls/perfsonar.log
\ No newline at end of file
Added: trunk/perfsonar-java-xml-ls/log4j/production/log4j.xml
===================================================================
--- trunk/perfsonar-java-xml-ls/log4j/production/log4j.xml
(rev 0)
+++ trunk/perfsonar-java-xml-ls/log4j/production/log4j.xml 2012-04-03
17:48:30 UTC (rev 5913)
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM
"http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">
+
+<!-- This is the configuration for LOG4J for perfSONAR production sites -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+ <!-- Section: APPENDERS -->
+
+ <!--
+ writes log messages to the console. It outputs file name,
+ method name and line number of the caller. This is slow,
+ so just use it for debugging.
+ -->
+ <appender name="console" class="org.apache.log4j.ConsoleAppender">
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d - [%p] %c{1}[%M]:%L -
%m%n"/>
+ </layout>
+ </appender>
+
+ <appender name="exist" class="org.apache.log4j.RollingFileAppender">
+ <param name="File" value="/var/log/perfsonar-java-xml-ls/exist.log"/>
+ <param name="MaxFileSize" value="10MB"/>
+ <param name="MaxBackupIndex" value="7"/>
+ <param name="Encoding" value="UTF-8"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d [%t] %-5p (%F [%M]:%L)
- %m %n"/>
+ </layout>
+ </appender>
+
+ <appender name="perfsonar" class="org.apache.log4j.RollingFileAppender">
+ <param name="File"
value="/var/log/perfsonar-java-xml-ls/perfsonar.log"/>
+ <param name="MaxFileSize" value="10MB"/>
+ <param name="MaxBackupIndex" value="7"/>
+ <param name="Encoding" value="UTF-8"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d [%t] %-5p (%F [%M]:%L)
- %m %n"/>
+ </layout>
+ </appender>
+
+ <!--
+ Axis produces a large amount of debugging output if
+ priority is set to debug
+ -->
+ <category name="org.apache" additivity="false">
+ <priority value="off"/>
+ <appender-ref ref="console"/>
+ </category>
+
+ <!-- perfSONAR XML LS -->
+ <category name="org.perfsonar.service.lookupservice" additivity="false">
+ <level value="warn"/>
+ <appender-ref ref="perfsonar"/>
+ </category>
+
+
+ <!-- Section: ROOT logger -->
+
+ <root>
+ <priority value="warn"/>
+ <appender-ref ref="exist"/>
+ </root>
+
+</log4j:configuration>
Property changes on: trunk/perfsonar-java-xml-ls/log4j/production/log4j.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: trunk/perfsonar-java-xml-ls/log4j/test/log4j.properties
===================================================================
--- trunk/perfsonar-java-xml-ls/log4j/test/log4j.properties 2012-04-03
15:43:58 UTC (rev 5912)
+++ trunk/perfsonar-java-xml-ls/log4j/test/log4j.properties 2012-04-03
17:48:30 UTC (rev 5913)
@@ -1,14 +0,0 @@
-log4j.rootLogger=WARN, out, stdout
-
-log4j.logger.org.perfsonar=DEBUG
-
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=[%p] %c{1}:%L - %m%n
-
-log4j.appender.out=org.apache.log4j.RollingFileAppender
-log4j.appender.out.MaxFileSize=10MB
-log4j.appender.out.MaxBackupIndex=2
-log4j.appender.out.layout=org.apache.log4j.PatternLayout
-log4j.appender.out.layout.ConversionPattern=%d - [%p] %c{1} - %m%n
-log4j.appender.out.File=../logs/perfsonar.log
Added: trunk/perfsonar-java-xml-ls/log4j/test/log4j.xml
===================================================================
--- trunk/perfsonar-java-xml-ls/log4j/test/log4j.xml
(rev 0)
+++ trunk/perfsonar-java-xml-ls/log4j/test/log4j.xml 2012-04-03 17:48:30
UTC (rev 5913)
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM
"http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/xml/doc-files/log4j.dtd">
+
+<!-- This is the configuration for LOG4J for perfSONAR production sites -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+ <!-- Section: APPENDERS -->
+
+ <!--
+ writes log messages to the console. It outputs file name,
+ method name and line number of the caller. This is slow,
+ so just use it for debugging.
+ -->
+ <appender name="console" class="org.apache.log4j.ConsoleAppender">
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d - [%p] %c{1}[%M]:%L -
%m%n"/>
+ </layout>
+ </appender>
+
+ <appender name="exist" class="org.apache.log4j.RollingFileAppender">
+ <param name="File" value="/var/log/perfsonar-java-xml-ls/exist.log"/>
+ <param name="MaxFileSize" value="10MB"/>
+ <param name="MaxBackupIndex" value="7"/>
+ <param name="Encoding" value="UTF-8"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d [%t] %-5p (%F [%M]:%L)
- %m %n"/>
+ </layout>
+ </appender>
+
+ <appender name="perfsonar" class="org.apache.log4j.RollingFileAppender">
+ <param name="File"
value="/var/log/perfsonar-java-xml-ls/perfsonar.log"/>
+ <param name="MaxFileSize" value="10MB"/>
+ <param name="MaxBackupIndex" value="7"/>
+ <param name="Encoding" value="UTF-8"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d [%t] %-5p (%F [%M]:%L)
- %m %n"/>
+ </layout>
+ </appender>
+
+ <!--
+ Axis produces a large amount of debugging output if
+ priority is set to debug
+ -->
+ <category name="org.apache" additivity="false">
+ <priority value="off"/>
+ <appender-ref ref="console"/>
+ </category>
+
+ <!-- perfSONAR XML LS -->
+ <category name="org.perfsonar.service.lookupservice" additivity="false">
+ <level value="info"/>
+ <appender-ref ref="perfsonar"/>
+ </category>
+
+
+ <!-- Section: ROOT logger -->
+
+ <root>
+ <priority value="warn"/>
+ <appender-ref ref="exist"/>
+ </root>
+
+</log4j:configuration>
Property changes on: trunk/perfsonar-java-xml-ls/log4j/test/log4j.xml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/perfsonar-java-xml-ls/packaging/debian/changelog
===================================================================
--- trunk/perfsonar-java-xml-ls/packaging/debian/changelog 2012-04-03
15:43:58 UTC (rev 5912)
+++ trunk/perfsonar-java-xml-ls/packaging/debian/changelog 2012-04-03
17:48:30 UTC (rev 5913)
@@ -1,7 +1,9 @@
-perfsonar-java-xml-ls (1.5.1-1) stable; urgency=low
+perfsonar-java-xml-ls (1.6-1) stable; urgency=low
- * Fixes: PSSERVICES-572, PSSERVICES-563, PSSERVICES-558
- -- Antoine Delvaux
<>
Thu, 08 Mar 2012 10:20:00 +0000
+ * New: Embedded eXist DB (1.2.6)
+ * Change: tomcat6 compatibility
+ * Fixes: PSSERVICES-572, PSSERVICES-563, PSSERVICES-558, PSSERVICES-613
+ -- Antoine Delvaux
<>
Thu, 02 Apr 2012 10:20:00 +0000
perfsonar-java-xml-ls (1.5-1) stable; urgency=low
Modified: trunk/perfsonar-java-xml-ls/packaging/debian/conffiles
===================================================================
--- trunk/perfsonar-java-xml-ls/packaging/debian/conffiles 2012-04-03
15:43:58 UTC (rev 5912)
+++ trunk/perfsonar-java-xml-ls/packaging/debian/conffiles 2012-04-03
17:48:30 UTC (rev 5913)
@@ -1,5 +1,5 @@
usr/lib/perfsonar/services/perfsonar-java-xml-ls/WEB-INF/classes/perfsonar/conf/configuration.xml
usr/lib/perfsonar/services/perfsonar-java-xml-ls/WEB-INF/classes/perfsonar/conf/configuration-rules.xml
-usr/lib/perfsonar/services/perfsonar-java-xml-ls/WEB-INF/classes/log4j.properties
+usr/lib/perfsonar/services/perfsonar-java-xml-ls/WEB-INF/classes/log4j.xml
usr/lib/perfsonar/services/perfsonar-java-xml-ls/WEB-INF/conf/axis2.xml
usr/lib/perfsonar/services/perfsonar-java-xml-ls/WEB-INF/web.xml
Modified: trunk/perfsonar-java-xml-ls/packaging/debian/control
===================================================================
--- trunk/perfsonar-java-xml-ls/packaging/debian/control 2012-04-03
15:43:58 UTC (rev 5912)
+++ trunk/perfsonar-java-xml-ls/packaging/debian/control 2012-04-03
17:48:30 UTC (rev 5913)
@@ -8,6 +8,5 @@
Package: perfsonar-java-xml-ls
Architecture: all
-# an issue exists with JAVA_HOME in tomcat5.5
-Depends: sun-java6-jdk, tomcat5.5, exist (>=1.2.6)
+Depends: tomcat6
Description: perfSONAR Lookup Service
Modified:
trunk/perfsonar-java-xml-ls/packaging/debian/perfsonar-java-xml-ls.dirs
===================================================================
--- trunk/perfsonar-java-xml-ls/packaging/debian/perfsonar-java-xml-ls.dirs
2012-04-03 15:43:58 UTC (rev 5912)
+++ trunk/perfsonar-java-xml-ls/packaging/debian/perfsonar-java-xml-ls.dirs
2012-04-03 17:48:30 UTC (rev 5913)
@@ -1,3 +1,4 @@
usr/lib/perfsonar/services/perfsonar-java-xml-ls
usr/lib/perfsonar/services/geant2-java-xml-ls
var/run/perfsonar-java-xml-ls
+var/log/perfsonar-java-xml-ls
Modified:
trunk/perfsonar-java-xml-ls/packaging/debian/perfsonar-java-xml-ls.postinst
===================================================================
---
trunk/perfsonar-java-xml-ls/packaging/debian/perfsonar-java-xml-ls.postinst
2012-04-03 15:43:58 UTC (rev 5912)
+++
trunk/perfsonar-java-xml-ls/packaging/debian/perfsonar-java-xml-ls.postinst
2012-04-03 17:48:30 UTC (rev 5913)
@@ -25,23 +25,18 @@
case "$1" in
configure)
- if [ -h /var/lib/tomcat5.5/webapps/$SERVICENAME ]
+ if [ -h /var/lib/tomcat6/webapps/$SERVICENAME ]
then
- rm -rf /var/lib/tomcat5.5/webapps/$SERVICENAME
+ rm -rf /var/lib/tomcat6/webapps/$SERVICENAME
fi
- ln -sf $SERVICEPATH/$SERVICENAME /var/lib/tomcat5.5/webapps/$SERVICENAME
|| true
+ ln -sf $SERVICEPATH/$SERVICENAME /var/lib/tomcat6/webapps/$SERVICENAME
|| true
if [ -h /etc/$SERVICENAME ]
then
rm -rf /etc/$SERVICENAME
fi
ln -sf $SERVICEPATH/$SERVICENAME/WEB-INF/classes/perfsonar/conf
/etc/$SERVICENAME || true
- if [ -h /var/log/$SERVICENAME ]
- then
- rm -rf /var/log/$SERVICENAME
- fi
- mkdir -p $SERVICEPATH/$SERVICENAME/WEB-INF/log
- ln -sf $SERVICEPATH/$SERVICENAME/WEB-INF/log /var/log/$SERVICENAME ||
true
+ mkdir -p /var/log/$SERVICENAME || true
if [ -h /usr/share/doc/$SERVICENAME/spec ]
then
@@ -49,24 +44,21 @@
fi
ln -sf $SERVICEPATH/$SERVICENAME/doc /usr/share/doc/$SERVICENAME/spec ||
true
# servlet-context-redirector
- ln -sf $SERVICEPATH/$OLD_SERVICENAME
/var/lib/tomcat5.5/webapps/$OLD_SERVICENAME
+ ln -sf $SERVICEPATH/$OLD_SERVICENAME
/var/lib/tomcat6/webapps/$OLD_SERVICENAME
- chown -R tomcat55
$SERVICEPATH/$SERVICENAME/WEB-INF/classes/perfsonar/conf
- chown tomcat55 $SERVICEPATH/$SERVICENAME/WEB-INF/log
+ chown -R tomcat6:tomcat6
$SERVICEPATH/$SERVICENAME/WEB-INF/classes/perfsonar/conf
+ chown tomcat6:tomcat6 /var/log/$SERVICENAME/
+ chown tomcat6:tomcat6 $SERVICEPATH/$SERVICENAME/WEB-INF/data
- /etc/init.d/tomcat5.5 stop
+ /etc/init.d/tomcat6 stop
- # Correct Tomcat configuration so we can start without errors
- if [[ `grep -c '^JAVA_HOME' /etc/default/tomcat5.5` == 0 ]]
+ if [ -f /etc/default/tomcat ]
then
- sed -i
's/#JAVA_HOME=\/usr\/lib\/jvm\/java-6-sun/JAVA_HOME=\/usr\/lib\/jvm\/java-6-sun/'
/etc/default/tomcat5.5
+ # Increase memory allocated to Tomcat JVM
+ sed -i 's/JAVA_OPTS="-Djava.awt.headless=true
-Xmx128m/JAVA_OPTS="-Djava.awt.headless=true -Xmx256m/' /etc/default/tomcat6
fi
- if [[ `grep -c '^TOMCAT5_SECURITY' /etc/default/tomcat5.5` == 0 ]]
- then
- sed -i 's/#TOMCAT5_SECURITY=yes/TOMCAT5_SECURITY=no/'
/etc/default/tomcat5.5
- fi
- /etc/init.d/tomcat5.5 restart
+ /etc/init.d/tomcat6 restart
;;
abort-upgrade|abort-remove|abort-deconfigure)
Modified:
trunk/perfsonar-java-xml-ls/packaging/debian/perfsonar-java-xml-ls.postrm
===================================================================
--- trunk/perfsonar-java-xml-ls/packaging/debian/perfsonar-java-xml-ls.postrm
2012-04-03 15:43:58 UTC (rev 5912)
+++ trunk/perfsonar-java-xml-ls/packaging/debian/perfsonar-java-xml-ls.postrm
2012-04-03 17:48:30 UTC (rev 5913)
@@ -26,9 +26,9 @@
case "$1" in
purge)
- if [ -h /var/lib/tomcat5.5/webapps/$SERVICENAME ]
+ if [ -h /var/lib/tomcat6/webapps/$SERVICENAME ]
then
- rm /var/lib/tomcat5.5/webapps/$SERVICENAME
+ rm /var/lib/tomcat6/webapps/$SERVICENAME
fi
if [ -h /etc/$SERVICENAME ]
@@ -38,18 +38,17 @@
if [ -h /var/log/$SERVICENAME ]
then
- rm /var/log/$SERVICENAME
+ rm -rf /var/log/$SERVICENAME
fi
- rm -fr $SERVICEPATH/$SERVICENAME/WEB-INF/log
if [ -h /usr/share/doc/$SERVICENAME/spec ]
then
rm /usr/share/doc/$SERVICENAME/spec
fi
- if [ -h /usr/share/tomcat5.5/webapps/$OLD_SERVICENAME ]
+ if [ -h /usr/share/tomcat6/webapps/$OLD_SERVICENAME ]
then
- rm -rf /usr/share/tomcat5.5/webapps/$OLD_SERVICENAME
+ rm -rf /usr/share/tomcat6/webapps/$OLD_SERVICENAME
fi
;;
Modified:
trunk/perfsonar-java-xml-ls/packaging/debian/perfsonar-java-xml-ls.preinst
===================================================================
---
trunk/perfsonar-java-xml-ls/packaging/debian/perfsonar-java-xml-ls.preinst
2012-04-03 15:43:58 UTC (rev 5912)
+++
trunk/perfsonar-java-xml-ls/packaging/debian/perfsonar-java-xml-ls.preinst
2012-04-03 17:48:30 UTC (rev 5913)
@@ -21,22 +21,15 @@
case "$1" in
install|upgrade)
- if [ -f /etc/init.d/tomcat5.5 ]
+ if [ -f /etc/init.d/tomcat ]
then
- /etc/init.d/tomcat5.5 stop
+ /etc/init.d/tomcat stop
fi
- if [ -f /etc/default/tomcat5.5 ]
+ if [ -f /etc/default/tomcat ]
then
- # Correct Tomcat configuration so we can start
- if [[ `grep -c '^JAVA_HOME' /etc/default/tomcat5.5` == 0 ]]
- then
- sed -i
's/#JAVA_HOME=\/usr\/lib\/jvm\/java-6-sun/JAVA_HOME=\/usr\/lib\/jvm\/java-6-sun/'
/etc/default/tomcat5.5
- fi
- if [[ `grep -c '^TOMCAT5_SECURITY' /etc/default/tomcat5.5` == 0 ]]
- then
- sed -i 's/#TOMCAT5_SECURITY=yes/TOMCAT5_SECURITY=no/'
/etc/default/tomcat5.5
- fi
+ # Increase memory allocated to Tomcat JVM
+ sed -i 's/JAVA_OPTS="-Djava.awt.headless=true
-Xmx128m/JAVA_OPTS="-Djava.awt.headless=true -Xmx256m/' /etc/default/tomcat6
fi
if [ -h $SERVICEPATH/$SERVICENAME ]
@@ -44,14 +37,14 @@
rm -rf $SERVICEPATH/$SERVICENAME
fi
- if [ -h /var/lib/tomcat5.5/webapps/$SERVICENAME ]
+ if [ -h /var/lib/tomcat/webapps/$SERVICENAME ]
then
- rm -rf /var/lib/tomcat5.5/webapps/$SERVICENAME
+ rm -rf /var/lib/tomcat/webapps/$SERVICENAME
fi
- if [ -h /usr/share/tomcat5.5/webapps/$SERVICENAME ]
+ if [ -h /usr/share/tomcat/webapps/$SERVICENAME ]
then
- rm -rf /usr/share/tomcat5.5/webapps/$SERVICENAME
+ rm -rf /usr/share/tomcat/webapps/$SERVICENAME
fi
if [ -h /etc/$SERVICENAME ]
Modified: trunk/perfsonar-java-xml-ls/packaging/package.sh
===================================================================
--- trunk/perfsonar-java-xml-ls/packaging/package.sh 2012-04-03 15:43:58
UTC (rev 5912)
+++ trunk/perfsonar-java-xml-ls/packaging/package.sh 2012-04-03 17:48:30
UTC (rev 5913)
@@ -34,9 +34,9 @@
REDIRECTOR_DIR=${PROJECT_DIR}"../servlet-context-redirector/"
# TODO: Do we need it?
TMP_DIR="tmp/"
-DEB_VERSION="1.5.1"
+DEB_VERSION="1.6"
# Can include username with 'user@' before the hostname if needed
-DEB_BUILD_HOST="d5"
+DEB_BUILD_HOST="d6"
RPM_VERSION="%VERSION%"
SERVICE_NAME="perfsonar-java-xml-ls"
RPM_SPEC_NAME=$SERVICE_NAME".specs"
Modified: trunk/perfsonar-java-xml-ls/pom.xml
===================================================================
--- trunk/perfsonar-java-xml-ls/pom.xml 2012-04-03 15:43:58 UTC (rev 5912)
+++ trunk/perfsonar-java-xml-ls/pom.xml 2012-04-03 17:48:30 UTC (rev 5913)
@@ -4,14 +4,15 @@
<groupId>net.geant.perfsonar</groupId>
<artifactId>perfsonar-java-xml-ls</artifactId>
<packaging>war</packaging>
- <version>1.5.1</version>
+ <version>1.6</version>
<name>perfSONAR Java XML LS</name>
<url>http://perfsonar.forge.geant.net</url>
<properties>
<configurationFile>configuration.xml</configurationFile>
- <configurationFile>configuration-rules.xml</configurationFile>
- <configurationFile>resources.properties</configurationFile>
+ <configurationFile>configuration-rules.xml</configurationFile>
+ <configurationFile>resources.properties</configurationFile>
+ <configurationFile>conf.xml</configurationFile>
<axis2Id>axis2-1.4.1</axis2Id>
<packageName>perfsonar-java-xml-ls</packageName>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -29,53 +30,93 @@
<plugins>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+
<include>**/LSTestSuite.java</include>
+ </includes>
+ <systemPropertyVariables>
+
<exist.home>target/classes</exist.home>
+ </systemPropertyVariables>
+ <encoding>UTF-8</encoding>
+ <inputEncoding>UTF-8</inputEncoding>
+ <outputEncoding>UTF-8</outputEncoding>
+ </configuration>
+ <version>2.7.2</version>
+ </plugin>
+ <plugin>
+
<artifactId>maven-resources-plugin</artifactId>
+ <version>2.5</version>
+ <executions>
+ <execution>
+ <id>copy-resources</id>
+ <phase>compile</phase>
+ <goals>
+
<goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <encoding>UTF-8</encoding>
+
<outputDirectory>${basedir}/target</outputDirectory>
+ <resources>
+ <resource>
+
<directory>${basedir}/db/eXist</directory>
+
<filtering>false</filtering>
+ </resource>
+ </resources>
+
<includeEmptyDirs>true</includeEmptyDirs>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webResources>
- <resource>
-
<directory>${basedir}/axis/</directory>
- <includes>
-
<include>services.xml</include>
- </includes>
-
<targetPath>WEB-INF/services/LookupService/META-INF/</targetPath>
- </resource>
<resource>
+
<directory>${basedir}/axis/</directory>
+ <includes>
+
<include>services.xml</include>
+ </includes>
+
<targetPath>WEB-INF/services/LookupService/META-INF/</targetPath>
+ </resource>
+ <resource>
<directory>${basedir}/log4j/${log4j}
</directory>
<includes>
-
<include>log4j.properties</include>
+
<include>log4j.xml</include>
</includes>
<targetPath>WEB-INF/classes</targetPath>
</resource>
<resource>
<directory>${basedir}/db</directory>
<includes>
-
<include>**/*.xml</include>
+
<include>*.xml</include>
</includes>
<targetPath>db</targetPath>
</resource>
- <resource>
- <directory>${basedir}/doc</directory>
- <includes>
-
<include>Collaboration.txt</include>
- <include>License.txt</include>
- </includes>
- <targetPath>doc</targetPath>
- </resource>
<resource>
- <directory>${basedir}/doc/schema</directory>
- <includes>
- <include>**/*.rnc</include>
- </includes>
- <targetPath>schema</targetPath>
- </resource>
- <resource>
- <directory>${basedir}/packaging</directory>
+ <directory>${basedir}/db/eXist</directory>
<includes>
- <include>package.sh</include>
+ <include>**</include>
</includes>
- <targetPath>packaging</targetPath>
+ <targetPath>WEB-INF</targetPath>
</resource>
+ <resource>
+
<directory>${basedir}/doc</directory>
+ <includes>
+
<include>Collaboration.txt</include>
+
<include>License.txt</include>
+ </includes>
+
<targetPath>doc</targetPath>
+ </resource>
+ <resource>
+
<directory>${basedir}/doc/schema</directory>
+ <includes>
+
<include>**/*.rnc</include>
+ </includes>
+
<targetPath>schema</targetPath>
+ </resource>
</webResources>
</configuration>
<version>2.1.1</version>
@@ -98,7 +139,7 @@
<version>1.3</version>
<executions>
<execution>
- <id>replace.config</id>
+ <id>replace.config</id>
<goals>
<goal>replace</goal>
</goals>
@@ -123,13 +164,15 @@
<configuration>
<source>1.6</source>
<target>1.6</target>
+ <encoding>UTF-8</encoding>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
- <!--This plugin's configuration is used to
store Eclipse m2e settings only. It has no influence on the Maven build
itself.-->
+ <!--This plugin's configuration is used to
store Eclipse m2e settings
+ only. It has no influence on the
Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
@@ -183,20 +226,20 @@
</pluginManagement>
<resources>
<resource>
-
<directory>${basedir}/src/main/resources/org/perfsonar/resources</directory>
+
<directory>${basedir}/src/main/resources/org/perfsonar/resources</directory>
<targetPath>org/perfsonar/resources</targetPath>
<includes>
- <include>resources.properties</include>
+
<include>resources.properties</include>
</includes>
</resource>
<resource>
-
<directory>${basedir}/src/main/resources/perfsonar/conf</directory>
- <targetPath>perfsonar/conf</targetPath>
- <includes>
- <include>configuration.xml</include>
- <include>configuration-rules.xml</include>
- <include>webAdminConfig.xml</include>
- </includes>
+
<directory>${basedir}/src/main/resources/perfsonar/conf</directory>
+ <targetPath>perfsonar/conf</targetPath>
+ <includes>
+ <include>configuration.xml</include>
+
<include>configuration-rules.xml</include>
+ <include>webAdminConfig.xml</include>
+ </includes>
</resource>
</resources>
</build>
@@ -240,11 +283,11 @@
<name>GEANT repository</name>
<url>http://maven.geant.net/repo</url>
</repository>
- <repository>
- <id>geant-repository-3rdparty</id>
- <name>GEANT repository 3rd party products</name>
- <url>http://maven.geant.net/repo/net/geant/3rdparty</url>
- </repository>
+ <repository>
+ <id>geant-repository-3rdparty</id>
+ <name>GEANT repository 3rd party products</name>
+
<url>http://maven.geant.net/repo/net/geant/3rdparty</url>
+ </repository>
</repositories>
<distributionManagement>
@@ -284,6 +327,16 @@
<groupId>net.geant.perfsonar</groupId>
<artifactId>ps-mdm-base2</artifactId>
<version>1.0.6</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>exist</artifactId>
+ <groupId>exist</groupId>
+ </exclusion>
+ <exclusion>
+
<artifactId>xalan-serializer</artifactId>
+ <groupId>xalan</groupId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
@@ -299,18 +352,117 @@
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
- <version>1.5.4</version>
+ <version>1.4</version>
</dependency>
<dependency>
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
- <version>2.7.2</version>
+ <version>2.7.6</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.0.1</version>
</dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.0.4</version>
+ </dependency>
+ <dependency>
+ <groupId>xalan</groupId>
+ <artifactId>xalan</artifactId>
+ <version>2.7.1</version>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ <version>2.9.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlrpc</groupId>
+ <artifactId>xmlrpc-client</artifactId>
+ <version>3.1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>exist</groupId>
+ <artifactId>exist</artifactId>
+ <version>1.2.6</version>
+ </dependency>
+ <dependency>
+ <groupId>exist</groupId>
+ <artifactId>exist-jmx</artifactId>
+ <version>exist-1.2.6</version>
+ </dependency>
+ <dependency>
+ <groupId>exist</groupId>
+ <artifactId>exist-modules</artifactId>
+ <version>exist-1.2.6</version>
+ </dependency>
+ <dependency>
+ <groupId>exist</groupId>
+ <artifactId>exist-ngram-module</artifactId>
+ <version>exist-1.2.6</version>
+ </dependency>
+ <dependency>
+ <groupId>exist</groupId>
+ <artifactId>sunxacml</artifactId>
+ <version>exist-1.2.6</version>
+ </dependency>
+ <dependency>
+ <groupId>exist</groupId>
+ <artifactId>xml-apis</artifactId>
+ <version>exist-1.2.6</version>
+ </dependency>
+ <dependency>
+ <groupId>exist</groupId>
+ <artifactId>xmldb</artifactId>
+ <version>exist-1.2.6</version>
+ </dependency>
+ <dependency>
+ <groupId>opensymphony</groupId>
+ <artifactId>quartz</artifactId>
+ <version>1.6.0</version>
+ </dependency>
+ <dependency>
+ <groupId>xml-resolver</groupId>
+ <artifactId>xml-resolver</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>xalan</groupId>
+ <artifactId>serializer</artifactId>
+ <version>2.7.1</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>jgroups</groupId>
+ <artifactId>jgroups-all</artifactId>
+ <version>2.2.8</version>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.15</version>
+ <exclusions>
+ <exclusion>
+ <artifactId>jms</artifactId>
+ <groupId>javax.jms</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>jmxtools</artifactId>
+ <groupId>com.sun.jdmk</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>jmxri</artifactId>
+ <groupId>com.sun.jmx</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
</dependencies>
<profiles>
@@ -328,7 +480,7 @@
<repository>
<id>build.dep</id>
<name>Debian Build host</name>
- <url>scpexe://d5/home/antoine/</url>
+ <url>scpexe://d6/home/antoine/</url>
</repository>
</distributionManagement>
</profile>
@@ -336,7 +488,8 @@
<id>deb</id>
<properties>
<log4j>production</log4j>
- <port>8180</port>
+ <!-- TODO: why change from 8180 ??? -->
+ <port>8080</port>
</properties>
</profile>
<profile>
@@ -357,6 +510,7 @@
<system>Jira</system>
</issueManagement>
<ciManagement>
- <system>Hudson</system>
+ <system>Jenkins</system>
+ <url>https://ci.geant.net/jenkins/job/perfSONAR%20LS/</url>
</ciManagement>
</project>
Modified:
trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/components/XMLDBComponent.java
===================================================================
---
trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/components/XMLDBComponent.java
2012-04-03 15:43:58 UTC (rev 5912)
+++
trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/components/XMLDBComponent.java
2012-04-03 17:48:30 UTC (rev 5913)
@@ -9,7 +9,7 @@
import javax.xml.transform.OutputKeys;
import org.apache.log4j.Logger;
-import org.exist.xmldb.RemoteXPathQueryService;
+import org.exist.xmldb.LocalXPathQueryService;
import org.perfsonar.base2.service.configuration.Component;
import org.perfsonar.base2.service.configuration.ConfigurationManager;
import org.perfsonar.base2.service.exceptions.PerfSONARException;
@@ -43,7 +43,7 @@
private String password;
private Collection myMainCollection;
private Collection myStoreCollection;
- private RemoteXPathQueryService myService;
+ private LocalXPathQueryService myService;
public final static String DATASOURCE_KEY = "dataSource-ref";
public final static String READ_ONLY_KEY = "readOnly";
@@ -82,6 +82,7 @@
@SuppressWarnings("rawtypes")
Class cl =
Class.forName("org.exist.xmldb.DatabaseImpl");
Database database = (Database) cl.newInstance();
+ database.setProperty("create-database", "true");
DatabaseManager.registerDatabase(database);
} catch (ClassNotFoundException e) {
e.printStackTrace();
@@ -100,9 +101,9 @@
logger.debug("Initialize XMLDBComponent");
try {
// Get a main collection
- Collection col = getDBCollectionAs(url + "/"
+ mainCollection, username, password);
+ Collection col = getDBCollectionAs(url +
mainCollection, username, password);
col.setProperty(OutputKeys.INDENT, "no");
- myService = (RemoteXPathQueryService)
col.getService("XPathQueryService", "1.0");
+ myService = (LocalXPathQueryService)
col.getService("XPathQueryService", "1.0");
myService.setProperty("indent", "yes");
logger.trace(" Service instanciated: "
+ myService);
} catch (XMLDBException e) {
@@ -164,7 +165,7 @@
throw new
PerfSONARException("error.ls.no_storage", "Cannot get collection - wrong
datasource or db is not initialized");
}
}
- logger.trace(" store Collection instanciated:
" + collection);
+ logger.trace(" Collection correctly
instanciated: " + collection);
return collection;
} catch (XMLDBException e) {
logger.error("Getting collection (" + connectionURL +
") as \"" + username + "\" failed: " + e.getMessage());
@@ -181,7 +182,7 @@
*/
private void setStoreCollection() throws PerfSONARException {
if (myStoreCollection == null) {
- myStoreCollection = getDBCollectionAs(url + "/" +
mainCollection + "/store", username, password);
+ myStoreCollection = getDBCollectionAs(url +
mainCollection + "/store", username, password);
} else {
logger.trace(" store Collection was already
instanciated, we re-use it: " + myStoreCollection);
}
Modified:
trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/servlets/ExistDbInitializerServlet.java
===================================================================
---
trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/servlets/ExistDbInitializerServlet.java
2012-04-03 15:43:58 UTC (rev 5912)
+++
trunk/perfsonar-java-xml-ls/src/main/java/org/perfsonar/service/lookupservice/servlets/ExistDbInitializerServlet.java
2012-04-03 17:48:30 UTC (rev 5913)
@@ -30,7 +30,7 @@
@SuppressWarnings("serial")
public class ExistDbInitializerServlet extends ExistDBInitServlet {
- private Logger
logger=Logger.getLogger(ExistDbInitializerServlet.class);
+ private Logger logger =
Logger.getLogger(ExistDbInitializerServlet.class);
/**
*
@@ -63,42 +63,49 @@
Collection adminColl =
myXMLDbComponent.getDBCollectionAs(dbUrl,
myXMLDbComponent.getOption("username").getValue(),
myXMLDbComponent.getOption("password").getValue());
UserManagementService usrMngmtService =
getUserManagmentService(adminColl);
- User user=createUser(existDbComponent.getUsername(),
- existDbComponent.getPassword(),
"dba");
+ User user =
createUser(existDbComponent.getUsername(), existDbComponent.getPassword(),
"dba");
user.setHome(XmldbURI.xmldbUriFor(mainCollection));
if (existDbComponent.hasReadOnlyUser()) {
User
userRO=createUser(existDbComponent.getUsernameRO(),
existDbComponent.getPasswordRO(), "guest");
- usrMngmtService.addUser(userRO);
+ if (usrMngmtService.getUser("guest") != null)
{
+ logger.debug("Gest user already
existing, checking it");
+ usrMngmtService.updateUser(userRO);
+ } else {
+ logger.info("Creating guest user");
+ usrMngmtService.addUser(userRO);
+ }
}
- usrMngmtService.addUser(user);
+ if
(usrMngmtService.getUser(existDbComponent.getUsername()) != null) {
+ logger.debug("LS user already existing,
checking it");
+ usrMngmtService.updateUser(user);
+ } else {
+ logger.info("Creating dba user");
+ usrMngmtService.addUser(user);
+ }
// Then we create our Collections
Collection collection =
myXMLDbComponent.getDBCollectionAs(dbUrl, existDbComponent.getUsername(),
existDbComponent.getPassword());
CollectionManagementService colMngmtService =
getCollectionManagmentService(collection);
+ logger.info("Creating mainCollection and a backup
copy");
Collection lsCollection =
colMngmtService.createCollection(mainCollection);
- Collection copyCollection = colMngmtService
- .createCollection("copy");
+ Collection copyCollection =
colMngmtService.createCollection("copy");
- // removes all existing resources from store
collection (remove old
- // registered service stored in collection)
- Collection storeCollection = colMngmtService
-
.createCollection(mainCollection+"/store");
+ // removes all existing resources from store
collection (remove old registered services stored in the collection)
+ logger.info("Creating and emptying the /store
collection");
+ Collection storeCollection =
colMngmtService.createCollection(mainCollection+"/store");
for (String resourceName :
storeCollection.listResources()) {
- storeCollection.removeResource(storeCollection
- .getResource(resourceName));
+
storeCollection.removeResource(storeCollection.getResource(resourceName));
}
// And we upload starting LSStore files
// uploadFile("LSStore.xml", dbContentDirPath,
lsCollection);
-
uploadFile("LSStore-control.xml", dbContentDirPath,
lsCollection);
uploadFile("LSStore-summary.xml", dbContentDirPath,
lsCollection);
-
uploadFile("LSStore-summary.xml", dbContentDirPath,
copyCollection);
return true;
Modified:
trunk/perfsonar-java-xml-ls/src/main/resources/perfsonar/conf/configuration.xml
===================================================================
---
trunk/perfsonar-java-xml-ls/src/main/resources/perfsonar/conf/configuration.xml
2012-04-03 15:43:58 UTC (rev 5912)
+++
trunk/perfsonar-java-xml-ls/src/main/resources/perfsonar/conf/configuration.xml
2012-04-03 17:48:30 UTC (rev 5913)
@@ -73,7 +73,7 @@
<!-- exist datasource contains optionally read-only credentials -->
<component name="existDataSource"
className="org.perfsonar.service.lookupservice.components.DataSourceComponent">
- <option name="url"
value="xmldb:exist://localhost:%PORT%/exist/xmlrpc/db/ls"/>
+ <option name="url" value="xmldb:exist:///db/ls"/>
<option name="username" value="lookupservice"/>
<option name="password" value="sonar"/>
<option name="usernameRO" value="guest"/>
Modified:
trunk/perfsonar-java-xml-ls/src/main/resources/perfsonar/conf/webAdminConfig.xml
===================================================================
---
trunk/perfsonar-java-xml-ls/src/main/resources/perfsonar/conf/webAdminConfig.xml
2012-04-03 15:43:58 UTC (rev 5912)
+++
trunk/perfsonar-java-xml-ls/src/main/resources/perfsonar/conf/webAdminConfig.xml
2012-04-03 17:48:30 UTC (rev 5913)
@@ -8,7 +8,7 @@
<wa:serviceInformation>
<wa:accessPoint>http://localhost:%PORT%/perfsonar-java-xml-ls/services/LookupService</wa:accessPoint>
<wa:serviceName>Lookup service</wa:serviceName>
- <wa:version>1.5</wa:version>
+ <wa:version>1.6</wa:version>
</wa:serviceInformation>
<!-- credential for WA -->
Modified: trunk/perfsonar-java-xml-ls/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/perfsonar-java-xml-ls/src/main/webapp/WEB-INF/web.xml 2012-04-03
15:43:58 UTC (rev 5912)
+++ trunk/perfsonar-java-xml-ls/src/main/webapp/WEB-INF/web.xml 2012-04-03
17:48:30 UTC (rev 5913)
@@ -5,16 +5,16 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
+ <display-name>GEANT XML LS</display-name>
+
<servlet>
<servlet-name>AxisServlet</servlet-name>
- <display-name>Apache-Axis Servlet</display-name>
<servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>ExistDbInitializer</servlet-name>
- <display-name>Exist database initializer</display-name>
<servlet-class>org.perfsonar.service.lookupservice.servlets.ExistDbInitializerServlet</servlet-class>
</servlet>
Modified: trunk/perfsonar-java-xml-ls/src/main/webapp/temp/link_creator.sh
===================================================================
--- trunk/perfsonar-java-xml-ls/src/main/webapp/temp/link_creator.sh
2012-04-03 15:43:58 UTC (rev 5912)
+++ trunk/perfsonar-java-xml-ls/src/main/webapp/temp/link_creator.sh
2012-04-03 17:48:30 UTC (rev 5913)
@@ -1,4 +1,5 @@
#!/bin/bash
+#TODO: do we really need this crap?
flag=0;
Modified:
trunk/perfsonar-java-xml-ls/src/test/java/org/perfsonar/tests/components/DataSourceComponentTest.java
===================================================================
---
trunk/perfsonar-java-xml-ls/src/test/java/org/perfsonar/tests/components/DataSourceComponentTest.java
2012-04-03 15:43:58 UTC (rev 5912)
+++
trunk/perfsonar-java-xml-ls/src/test/java/org/perfsonar/tests/components/DataSourceComponentTest.java
2012-04-03 17:48:30 UTC (rev 5913)
@@ -12,13 +12,9 @@
private static final Logger logger =
Logger.getLogger(DataSourceComponentTest.class);
- public void testComponents() throws PerfSONARException {
- logger.info("•••• Testing existDataSource instanciation");
- testComponent("existDataSource");
- }
-
- private void testComponent(String src) throws PerfSONARException {
- DataSourceComponent dsc = (DataSourceComponent)
ConfigurationManager.getInstanceWithoutRunningComponents().getConfiguration().getAuxiliaryComponent(src);
+ public void testComponent() throws PerfSONARException {
+ logger.info("•••• Testing existDataSource component");
+ DataSourceComponent dsc = (DataSourceComponent)
ConfigurationManager.getInstanceWithoutRunningComponents().getConfiguration().getAuxiliaryComponent("existDataSource");
assertNotNull(dsc);
String username = dsc.getOption("username").getValue();
@@ -45,7 +41,9 @@
// Check URL splitting
String url = dsc.getOption("url").getValue();
+ logger.info("Extracted DB URL: " + url);
assertEquals(url, dsc.getUrl() + dsc.getMainCollection());
+ logger.info("•• existDataSource component is ok");
}
}
Modified:
trunk/perfsonar-java-xml-ls/src/test/java/org/perfsonar/tests/suite/LSTestSuite.java
===================================================================
---
trunk/perfsonar-java-xml-ls/src/test/java/org/perfsonar/tests/suite/LSTestSuite.java
2012-04-03 15:43:58 UTC (rev 5912)
+++
trunk/perfsonar-java-xml-ls/src/test/java/org/perfsonar/tests/suite/LSTestSuite.java
2012-04-03 17:48:30 UTC (rev 5913)
@@ -1,6 +1,5 @@
package org.perfsonar.tests.suite;
-
import org.apache.log4j.Logger;
import org.perfsonar.tests.actions.*;
import org.perfsonar.tests.components.*;
@@ -62,7 +61,7 @@
// Summarization
suite.addTestSuite(SummarizationTests.class);
-
+
// TODO: Scheduler
return suite;
Modified:
trunk/perfsonar-java-xml-ls/src/test/java/org/perfsonar/tests/utilities/ExistDBInitializerTests.java
===================================================================
---
trunk/perfsonar-java-xml-ls/src/test/java/org/perfsonar/tests/utilities/ExistDBInitializerTests.java
2012-04-03 15:43:58 UTC (rev 5912)
+++
trunk/perfsonar-java-xml-ls/src/test/java/org/perfsonar/tests/utilities/ExistDBInitializerTests.java
2012-04-03 17:48:30 UTC (rev 5913)
@@ -2,35 +2,73 @@
import junit.framework.TestCase;
+import org.apache.log4j.Logger;
+import org.exist.xmldb.DatabaseInstanceManager;
import org.perfsonar.base2.service.configuration.ConfigurationManager;
import org.perfsonar.base2.service.exceptions.PerfSONARException;
import org.perfsonar.base2.service.storage.xml.XMLDBResult;
import org.perfsonar.service.lookupservice.components.XMLDBComponent;
import
org.perfsonar.service.lookupservice.servlets.ExistDbInitializerServlet;
+import org.xmldb.api.DatabaseManager;
+import org.xmldb.api.base.Collection;
+import org.xmldb.api.base.Database;
+import org.xmldb.api.base.XMLDBException;
public class ExistDBInitializerTests extends TestCase {
+ private static final Logger logger =
Logger.getLogger(ExistDBInitializerTests.class);
+
public XMLDBComponent getDBAccessManager() throws PerfSONARException {
return (XMLDBComponent) ConfigurationManager.getInstance()
.getConfiguration().getAuxiliaryComponent("existAccessManager");
}
+ /**
+ * Test the embedded eXist DB can be started and shutdown
+ *
+ * @throws XMLDBException
+ * @throws ClassNotFoundException
+ * @throws InstantiationException
+ * @throws IllegalAccessException
+ */
+ public void testeXist() throws XMLDBException,
ClassNotFoundException, InstantiationException, IllegalAccessException {
+ logger.info("•••• Testing eXistDB driver init");
+ @SuppressWarnings("rawtypes")
+ Class cl = Class.forName("org.exist.xmldb.DatabaseImpl");
+ Database database = (Database)cl.newInstance();
+ database.setProperty("create-database", "true");
+ DatabaseManager.registerDatabase(database);
+
+ // Try to read the root collection
+ Collection col =
DatabaseManager.getCollection("xmldb:exist:///db", "admin", "");
+ String resources[] = col.listResources();
+ System.out.println("Resources:");
+ for (int i = 0; i < resources.length; i++) {
+ System.out.println(resources[i]);
+ }
+
+ // Then cleanly shut down the database
+ logger.debug("Now shuting down eXistDB properly");
+ DatabaseInstanceManager manager = (DatabaseInstanceManager)
col.getService("DatabaseInstanceManager", "1.0");
+ manager.shutdown();
+ logger.info("•• eXistDB properly shutdown");
+ }
+
public void testExistDbInitializer() throws Exception {
+ logger.info("•••• Testing eXistDB initialization");
XMLDBComponent component = getDBAccessManager();
ExistDbInitializerServlet emt = new
ExistDbInitializerServlet();
- emt.initializeDatabase("db", ConfigurationManager
- .getInstanceWithoutRunningComponents());
+ emt.initializeDatabase("db",
ConfigurationManager.getInstanceWithoutRunningComponents());
component.performXQuery("xmldb:remove('/db/ls')");
- emt.initializeDatabase("db", ConfigurationManager
- .getInstanceWithoutRunningComponents());
+ emt.initializeDatabase("db",
ConfigurationManager.getInstanceWithoutRunningComponents());
- XMLDBResult rs = component
-
.performXQuery("xmldb:collection-exists('/db/ls')");
+ XMLDBResult rs =
component.performXQuery("xmldb:collection-exists('/db/ls')");
assertEquals("true", rs.getTextResults()[0]);
+ logger.info("•• eXist DB properly initialized and tested");
}
}
Modified:
trunk/perfsonar-java-xml-ls/src/test/resources/perfsonar/conf/configuration.xml
===================================================================
---
trunk/perfsonar-java-xml-ls/src/test/resources/perfsonar/conf/configuration.xml
2012-04-03 15:43:58 UTC (rev 5912)
+++
trunk/perfsonar-java-xml-ls/src/test/resources/perfsonar/conf/configuration.xml
2012-04-03 17:48:30 UTC (rev 5913)
@@ -7,6 +7,7 @@
<!--
....................................................................................
-->
<!-- Lookup Info of the LS instance -->
+ <!-- This one is for the Unit testing only -->
<!-- This file should be used for the JUnit tests run under Eclipse -->
<!-- You can reference it in your JUnit run settings to be used instead
of the Maven configurable one -->
@@ -77,7 +78,7 @@
<component name="existDataSource"
className="org.perfsonar.service.lookupservice.components.DataSourceComponent">
- <option name="url"
value="xmldb:exist://localhost:8080/exist/xmlrpc/db/ls"/>
+ <option name="url" value="xmldb:exist:///db/ls"/>
<option name="username" value="lookupservice"/>
<option name="password" value="sonar"/>
<option name="usernameRO" value="guest"/>
- [pS-dev] [GEANT/SA2/ps-java-services] r5913 - in trunk/perfsonar-java-xml-ls: . db db/eXist db/eXist/classes db/eXist/data log4j/development log4j/production log4j/test packaging packaging/debian src/main/java/org/perfsonar/service/lookupservice/components src/main/java/org/perfsonar/service/lookupservice/servlets src/main/resources/perfsonar/conf src/main/webapp/WEB-INF src/main/webapp/temp src/test/java/org/perfsonar/tests/components src/test/java/org/perfsonar/tests/suite src/test/java/org/perfsonar/tests/utilities src/test/resources/perfsonar/conf, svn-noreply, 04/03/2012
Archive powered by MHonArc 2.6.16.