DNA SVN: r1573 - trunk/extensions/dna-search-lucene/src/main/java/org/jboss/dna/search/lucene.
by dna-commits@lists.jboss.org
Author: rhauch
Date: 2010-01-09 16:30:51 -0500 (Sat, 09 Jan 2010)
New Revision: 1573
Modified:
trunk/extensions/dna-search-lucene/src/main/java/org/jboss/dna/search/lucene/LuceneSearchSession.java
Log:
Added the name of the nodes to be included in full-text searches.
Modified: trunk/extensions/dna-search-lucene/src/main/java/org/jboss/dna/search/lucene/LuceneSearchSession.java
===================================================================
--- trunk/extensions/dna-search-lucene/src/main/java/org/jboss/dna/search/lucene/LuceneSearchSession.java 2010-01-09 21:30:31 UTC (rev 1572)
+++ trunk/extensions/dna-search-lucene/src/main/java/org/jboss/dna/search/lucene/LuceneSearchSession.java 2010-01-09 21:30:51 UTC (rev 1573)
@@ -380,9 +380,12 @@
}
}
+ // Always include the local name in the full-text search field ...
+ StringBuilder fullTextSearchValue = new StringBuilder();
+ fullTextSearchValue.append(localNameStr);
+
// Index the properties
String stringValue = null;
- StringBuilder fullTextSearchValue = null;
for (Property property : properties) {
Name name = property.getName();
Rule rule = workspace.rules.getRule(name);
@@ -446,12 +449,7 @@
if (rule.getIndexOption() != Field.Index.NO) {
// This field is to be full-text searchable ...
- if (fullTextSearchValue == null) {
- fullTextSearchValue = new StringBuilder();
- } else {
- fullTextSearchValue.append(' ');
- }
- fullTextSearchValue.append(stringValue);
+ fullTextSearchValue.append(' ').append(stringValue);
// Also create a full-text-searchable field ...
String fullTextNameString = processor.fullTextFieldName(nameString);
@@ -460,7 +458,7 @@
}
}
// Add the full-text-search field ...
- if (fullTextSearchValue != null && fullTextSearchValue.length() != 0) {
+ if (fullTextSearchValue.length() != 0) {
doc.add(new Field(ContentIndex.FULL_TEXT, fullTextSearchValue.toString(), Field.Store.NO, Field.Index.ANALYZED));
}
getContentWriter().updateDocument(new Term(ContentIndex.PATH, pathStr), doc);
15 years, 11 months
DNA SVN: r1572 - in trunk/docs/gettingstarted/src/main/docbook/en-US: content and 1 other directory.
by dna-commits@lists.jboss.org
Author: rhauch
Date: 2010-01-09 16:30:31 -0500 (Sat, 09 Jan 2010)
New Revision: 1572
Modified:
trunk/docs/gettingstarted/src/main/docbook/en-US/content/downloading_and_running.xml
trunk/docs/gettingstarted/src/main/docbook/en-US/content/repository_example.xml
trunk/docs/gettingstarted/src/main/docbook/en-US/content/using_dna.xml
trunk/docs/gettingstarted/src/main/docbook/en-US/custom.dtd
Log:
DNA-621 Made more corrections to the Getting Started guide, and added a new section on deploying DNA via JNDI.
Modified: trunk/docs/gettingstarted/src/main/docbook/en-US/content/downloading_and_running.xml
===================================================================
--- trunk/docs/gettingstarted/src/main/docbook/en-US/content/downloading_and_running.xml 2010-01-09 21:30:13 UTC (rev 1571)
+++ trunk/docs/gettingstarted/src/main/docbook/en-US/content/downloading_and_running.xml 2010-01-09 21:30:31 UTC (rev 1572)
@@ -47,8 +47,7 @@
Maven can be downloaded from <ulink url="http://maven.apache.org/">http://maven.apache.org/</ulink>, and is installed by unzipping the
<code>maven-2.0.9-bin.zip</code> file to a convenient location on your local disk. Simply add <code>$MAVEN_HOME/bin</code>
to your path and add the following profile to your <code>~/.m2/settings.xml</code> file:</para>
- <programlisting role="XML"><![CDATA[
-<settings>
+ <programlisting role="XML"><![CDATA[<settings>
<profiles>
<profile>
<id>jboss.repository</id>
Modified: trunk/docs/gettingstarted/src/main/docbook/en-US/content/repository_example.xml
===================================================================
--- trunk/docs/gettingstarted/src/main/docbook/en-US/content/repository_example.xml 2010-01-09 21:30:13 UTC (rev 1571)
+++ trunk/docs/gettingstarted/src/main/docbook/en-US/content/repository_example.xml 2010-01-09 21:30:31 UTC (rev 1572)
@@ -152,12 +152,12 @@
</listitem>
</itemizedlist>
<para>
- <figure id="dna-connectors-0.2">
+ <figure id="dna-connectors">
<title>JBoss DNA can put JCR on top of multiple kinds of systems</title>
<graphic align="center" scale="100" fileref="dna-connectors.png"/>
</figure>
And the JBoss DNA project has plans to create other connectors, too. For instance, we're going to build a connector
- to other JCR repositories. And another to existing databases so that some or all of the existing data (in whatever structure)
+ to other JCR repositories. And another to access existing databases so that some or all of the existing data (in whatever structure)
can be accessed through JCR. Of course, if we don't have a connector to suit your needs, you can write your own.
<figure id="dna-connectors-future">
<title>Future JBoss DNA connectors</title>
Modified: trunk/docs/gettingstarted/src/main/docbook/en-US/content/using_dna.xml
===================================================================
--- trunk/docs/gettingstarted/src/main/docbook/en-US/content/using_dna.xml 2010-01-09 21:30:13 UTC (rev 1571)
+++ trunk/docs/gettingstarted/src/main/docbook/en-US/content/using_dna.xml 2010-01-09 21:30:31 UTC (rev 1572)
@@ -46,27 +46,21 @@
Obtaining a &JcrEngine; instance is very easy - assuming that you have a valid &JcrConfiguration; instance. We'll see
how to get one of those in a little bit, but if you have one then all you have to do is build and start the engine:
</para>
- <programlisting role="JAVA"><![CDATA[
-JcrConfiguration config = ...
+ <programlisting role="JAVA"><![CDATA[JcrConfiguration config = ...
JcrEngine engine = config.build();
-engine.start();
- ]]></programlisting>
+engine.start();]]></programlisting>
<para>
Obtaining a JCR &Repository; instance is a matter of simply asking the engine for it by the name defined in the configuration:
</para>
- <programlisting role="JAVA"><![CDATA[
-javax.jcr.Repository repository = engine.getRepository("Name of repository");
- ]]></programlisting>
+ <programlisting role="JAVA"><![CDATA[javax.jcr.Repository repository = engine.getRepository("Name of repository");]]></programlisting>
<para>
At this point, your application can proceed by working with the JCR API.
</para>
<para>
And, once you're finished with the &JcrEngine;, you should shut it down:
</para>
- <programlisting role="JAVA"><![CDATA[
-engine.shutdown();
-engine.awaitTermination(3,TimeUnit.SECONDS); // optional
- ]]></programlisting>
+ <programlisting role="JAVA"><![CDATA[engine.shutdown();
+engine.awaitTermination(3,TimeUnit.SECONDS); // optional]]></programlisting>
<para>
When the <code>shutdown()</code> method is called, the &Repository; instances managed by the engine are marked as being shut down,
and they will not be able to create new &Session;s. However, any existing &Session;s or ongoing operations (e.g., event notifications)
@@ -148,8 +142,7 @@
Loading the JBoss DNA configuration from a file is actually very simple:
</para>
<programlisting role="JAVA"><![CDATA[JcrConfiguration config = new JcrConfiguration();
-configuration.loadFrom(file);
- ]]></programlisting>
+configuration.loadFrom(file);]]></programlisting>
<para>
where the <code>file</code> parameter can actually be a &File; instance, a &URL; to the file, an &InputStream;
containing the contents of the file, or even a &String; containing the path to the file.
@@ -169,8 +162,7 @@
Here is the configuration file that is used in the repository example, though it has been simplified a bit and most comments
have been removed for clarity):
</para>
- <programlisting role="JAVA"><![CDATA[
-<?xml version="1.0" encoding="UTF-8"?>
+ <programlisting role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<configuration xmlns="http://www.jboss.org/dna/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0">
<!--
Define the JCR repositories
@@ -221,8 +213,7 @@
<dna:mimeTypeDetectors>
<dna:mimeTypeDetector jcr:name="Detector" dna:description="Standard extension-based MIME type detector"/>
</dna:mimeTypeDetectors>
-</configuration>
- ]]></programlisting>
+</configuration>]]></programlisting>
</sect2>
<sect2 id="loading_from_repository">
<title>Loading from a configuration repository</title>
@@ -231,11 +222,9 @@
&RepositorySource; instance to point to the desired repository, and then call the <code>loadFrom(&RepositorySource; source)</code>
method:
</para>
- <programlisting role="JAVA"><![CDATA[
-RepositorySource configSource = ...
+ <programlisting role="JAVA"><![CDATA[RepositorySource configSource = ...
JcrConfiguration config = new JcrConfiguration();
-configuration.loadFrom(configSource);
- ]]></programlisting>
+configuration.loadFrom(configSource);]]></programlisting>
<para>
This really is a more advanced way to define your configuration, so we won't go into how you configure a &RepositorySource;.
Suffice to say that you can create a &JcrConfiguration; that uses a &RepositorySource;, programmatically define the configuration,
@@ -264,13 +253,11 @@
<para>Each repository source definition must include the name of the &RepositorySource; class as well as each bean property
that should be set on the object:
</para>
- <programlisting role="JAVA"><![CDATA[
-JcrConfiguration config = ...
+ <programlisting role="JAVA"><![CDATA[JcrConfiguration config = ...
config.repositorySource("source A")
.usingClass(InMemoryRepositorySource.class)
.setDescription("The repository for our content")
- .setProperty("defaultWorkspaceName", workspaceName);
- ]]></programlisting>
+ .setProperty("defaultWorkspaceName", workspaceName);]]></programlisting>
<para>
This example defines an in-memory source with the name "source A", a description, and a single "defaultWorkspaceName" bean property.
Different &RepositorySource; implementations will the bean properties that are required and optional.
@@ -289,8 +276,7 @@
<title>Repositories</title>
<para>Each repository must be defined to use a named repository source, but all other aspects (e.g., namespaces, node types, options)
are optional.</para>
- <programlisting role="JAVA"><![CDATA[
-JcrConfiguration config = ...
+<programlisting role="JAVA"><![CDATA[JcrConfiguration config = ...
config.repository("repository A")
.addNodeTypes("myCustomNodeTypes.cnd")
.setSource("source 1")
@@ -299,12 +285,10 @@
/*
* As a convenience, DNA allows guest users full access by default. In a production system,
- * you would want to limit this access by adding one of the lines below to modify this option:
+ * you would want to limit this access by adding one of the lines below to modify this option:
* .setOption(JcrRepository.Option.ANONYMOUS_USER_ROLES, ""); // No access
* .setOption(JcrRepository.Option.ANONYMOUS_USER_ROLES, "readonly"); // Read-only access
- */
-
- ]]></programlisting>
+ */]]></programlisting>
<para>
This example defines a repository that uses the "source 1" repository source (which could be a federated source, an in-memory source,
a database store, or any other source). Additionally, this example adds the node types in the "myCustomNodeTypes.cnd" file as those
@@ -325,15 +309,13 @@
<para>Each defined sequencer must specify the name of the &StreamSequencer; implementation class as well as the path expressions
defining which nodes should be sequenced and the output paths defining where the sequencer output should be placed (often as a function
of the input path expression).</para>
- <programlisting role="JAVA"><![CDATA[
-JcrConfiguration config = ...
+ <programlisting role="JAVA"><![CDATA[JcrConfiguration config = ...
config.sequencer("Image Sequencer")
.usingClass("org.jboss.dna.sequencer.image.ImageMetadataSequencer")
.loadedFromClasspath()
.setDescription("Sequences image files to extract the characteristics of the image")
.sequencingFrom("//(*.(jpg|jpeg|gif|bmp|pcx|png|iff|ras|pbm|pgm|ppm|psd)[*])/jcr:content[@jcr:data]")
- .andOutputtingTo("/images/$1");
- ]]></programlisting>
+ .andOutputtingTo("/images/$1");]]></programlisting>
<para>
This shows an example of a sequencer definition named "Image Sequencer" that uses the &ImageMetadataSequencer; class
(loaded from the classpath), that is to sequence the "jcr:data" property on any new or changed nodes that are named
@@ -356,11 +338,9 @@
<title>MIME type detectors</title>
<para>Each defined MIME type detector must specify the name of the &MimeTypeDetector; implementation class as well as any
other bean properties required by the implementation.</para>
- <programlisting role="JAVA"><![CDATA[
-JcrConfiguration config = ...
+ <programlisting role="JAVA"><![CDATA[JcrConfiguration config = ...
config.mimeTypeDetector("Extension Detector")
- .usingClass(org.jboss.dna.graph.mimetype.ExtensionBasedMimeTypeDetector.class);
- ]]></programlisting>
+ .usingClass(org.jboss.dna.graph.mimetype.ExtensionBasedMimeTypeDetector.class);]]></programlisting>
<para>
Of course, the class can be specified as Class reference or a string (followed by whether the class should be loaded from
the classpath or from a specific classpath).
@@ -375,6 +355,93 @@
</sect3>
</sect2>
</sect1>
+ <sect1 id="dna_and_jndi">
+ <title>Deploying JBoss DNA via JNDI</title>
+ <para>
+ Sometimes your applications can simply define a &JcrConfiguration; and instantiate the &JcrEngine; instance directly.
+ This is very straightforward, and this is what the <link linkend="downloading_and_running">JBoss DNA examples</link> do.
+ </para>
+ <para>
+ Web applications are a different story. Often, you may not want your web application to contain the code that initializes
+ a JBoss DNA engine. Or, you may want the same &JcrEngine; instance to be reused in multiple web applications deployed
+ to the same web/application server. In these cases, it is possible to configure the web/app server's JNDI instance to
+ instantiate the &JcrEngine;, meaning the web applications need only use the standard JNDI and JCR APIs.
+ </para>
+ <sect2 id="dna_and_jndi_application">
+ <title>Example application using JCR and JNDI</title>
+ <para>
+ Here's an example of how such a web application would obtain a JCR &Repository; instance, use it to create a &JcrSession;,
+ and then close the session when completed.
+ </para>
+ <programlisting role="JAVA"><![CDATA[Session session = null;
+
+try {
+ // Look up the JCR Repository object ...
+ InitialContext initCtx = new InitialContext();
+ Context envCtx = (Context) initCtx.lookup("java:comp/env");
+ Repository repo = (Repository) envCtx.lookup("jcr/local"); // name in JNDI is defined by configuration
+
+ // Obtain a JCR Session using simple authentication
+ // (or use anonymous authentication if desired)
+ session = repo.login(new SimpleCredentials("username", "password".toCharArray()));
+
+ // Use the JCR Session to do something interesting
+
+} catch (Exception ex) {
+ ex.printStackTrace();
+} finally {
+ if (session != null) session.logout();
+}]]></programlisting>
+ <para>
+ Note that the location of the &Repository; instance in JNDI depends upon the configuration. In this example, we used
+ "<code>jcr/local</code>", but the only requirement is that it match the location where it was placed in JNDI.
+ </para>
+ <para>
+ We showed how web applications can use an existing &Repository; instance. In the next section, we describe how to configure
+ the web server so that the &Repository; instance is available in JNDI.
+ </para>
+ </sect2>
+ <sect2 id="dna_and_jndi_configuring">
+ <title>Configuring JCR and JNDI</title>
+ <para>
+ Each kind of web server or application server is different, but all servlet containers do provide a way of configuring
+ objects and placing them into JNDI. JBoss DNA provides a &JndiRepositoryFactory; class that implements &ObjectFactory;
+ and that can be used in the server's configuration. The &JndiRepositoryFactory; requires two properties:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <emphasis role="strong"><code>configFile</code></emphasis> is the path to the
+ <link linkend="loading_from_file">configuration file</link> resource, which must be available on the classpath
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <emphasis role="strong"><code>repositoryName</code></emphasis> is the name of a JCR repository that exists
+ in the &JcrConfiguration; and that will be made available by this JNDI entry
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ Here's an example of a fragment of the <code>conf/context.xml</code> for Tomcat:
+ </para>
+<programlisting role="XML"><![CDATA[<Resource name="jcr/local"
+ auth="Container"
+ type="javax.jcr.Repository"
+ factory="org.jboss.dna.jcr.JndiRepositoryFactory"
+ configFile="/resource/path/to/configuration.xml"
+ repositoryName="Test Repository Source" />]]></programlisting>
+ <para>
+ Note that it is possible to have multiple <code>Resource</code> entries. The &JndiRepositoryFactory; ensures
+ that only one &JcrEngine; is instantiated, but that a &Repository; instance is registered for each entry.
+ </para>
+ <para>
+ Before the server can start, however, all of the JBoss DNA jars need to be placed on the classpath for the server.
+ JAAS also needs to be configured, and this can be done using the application server's configuration or in your
+ web application if you're using a simple servlet container. For more details, see the &ReferenceGuide;.
+ </para>
+ </sect2>
+ </sect1>
<sect1 id="using_dna_whats_next">
<title>What's next</title>
<para>
Modified: trunk/docs/gettingstarted/src/main/docbook/en-US/custom.dtd
===================================================================
--- trunk/docs/gettingstarted/src/main/docbook/en-US/custom.dtd 2010-01-09 21:30:13 UTC (rev 1571)
+++ trunk/docs/gettingstarted/src/main/docbook/en-US/custom.dtd 2010-01-09 21:30:31 UTC (rev 1572)
@@ -126,6 +126,7 @@
<!ENTITY JcrConfiguration "<ulink url='&API;jcr/JcrConfiguration.html'><classname>JcrConfiguration</classname></ulink>">
<!ENTITY JcrRepository "<ulink url='&API;jcr/JcrRepository.html'><classname>JcrRepository</classname></ulink>">
<!ENTITY JcrSession "<ulink url='&API;jcr/JcrSession.html'><classname>JcrSession</classname></ulink>">
+<!ENTITY JndiRepositoryFactory "<ulink url='&API;jcr/JcrRepository.html'><classname>JndiRepositoryFactory</classname></ulink>">
<!-- Types in extensions/ -->
15 years, 11 months
DNA SVN: r1571 - trunk/docs/gettingstarted/src/main/docbook/en-US.
by dna-commits@lists.jboss.org
Author: rhauch
Date: 2010-01-09 16:30:13 -0500 (Sat, 09 Jan 2010)
New Revision: 1571
Modified:
trunk/docs/gettingstarted/src/main/docbook/en-US/custom.dtd
Log:
DNA-621 Corrected version in the Getting Starting guide.
Modified: trunk/docs/gettingstarted/src/main/docbook/en-US/custom.dtd
===================================================================
--- trunk/docs/gettingstarted/src/main/docbook/en-US/custom.dtd 2010-01-09 21:29:50 UTC (rev 1570)
+++ trunk/docs/gettingstarted/src/main/docbook/en-US/custom.dtd 2010-01-09 21:30:13 UTC (rev 1571)
@@ -1,4 +1,4 @@
-<!ENTITY versionNumber "0.6">
+<!ENTITY versionNumber "0.7">
<!ENTITY copyrightYears "2008-2010">
<!ENTITY copyrightHolder "Red Hat, Inc.">
15 years, 11 months
DNA SVN: r1569 - in trunk/docs/examples/gettingstarted/repositories: src/main/assembly and 8 other directories.
by dna-commits@lists.jboss.org
Author: rhauch
Date: 2010-01-09 16:29:12 -0500 (Sat, 09 Jan 2010)
New Revision: 1569
Added:
trunk/docs/examples/gettingstarted/repositories/ufoSource/
trunk/docs/examples/gettingstarted/repositories/ufoSource/workspace1/
trunk/docs/examples/gettingstarted/repositories/ufoSource/workspace1/README.txt
trunk/docs/examples/gettingstarted/repositories/ufoSource/workspace1/martians/
trunk/docs/examples/gettingstarted/repositories/ufoSource/workspace1/martians/zzyzx.txt
trunk/docs/examples/gettingstarted/repositories/ufoSource/workspace1/venutians/
trunk/docs/examples/gettingstarted/repositories/ufoSource/workspace1/venutians/frobozz.txt
Removed:
trunk/docs/examples/gettingstarted/repositories/src/main/resources/ufoSource/workspace1/README.txt
trunk/docs/examples/gettingstarted/repositories/src/main/resources/ufoSource/workspace1/martians/zzyzx.txt
trunk/docs/examples/gettingstarted/repositories/src/main/resources/ufoSource/workspace1/venutians/frobozz.txt
Modified:
trunk/docs/examples/gettingstarted/repositories/src/main/assembly/basic.xml
trunk/docs/examples/gettingstarted/repositories/src/main/resources/configRepository.xml
Log:
Moved location of the files and folders used by the UFO source from the 'src/main/resources' directory to be right under the top of the project. This allows the configRepository.xml file to simply reference the ufoSource directory as being in the same directory from which the tests are run, which also allows the build directory (where the examples are run via the command-line, per the Getting Started guide) to directly contain the 'ufoSource' folder instead of 'src/main/resources/ufoSource' (which is a bit confusing).
Modified: trunk/docs/examples/gettingstarted/repositories/src/main/assembly/basic.xml
===================================================================
--- trunk/docs/examples/gettingstarted/repositories/src/main/assembly/basic.xml 2010-01-09 18:49:20 UTC (rev 1568)
+++ trunk/docs/examples/gettingstarted/repositories/src/main/assembly/basic.xml 2010-01-09 21:29:12 UTC (rev 1569)
@@ -21,12 +21,12 @@
</includes>
</fileSet>
<fileSet>
- <directory>src/main/resources/security/</directory>
- <outputDirectory/>
+ <directory>src/main/resources/security</directory>
+ <outputDirectory>security</outputDirectory>
</fileSet>
<fileSet>
- <directory>src/main/resources/ufoSource</directory>
- <outputDirectory>src/main/resources/ufoSource</outputDirectory>
+ <directory>ufoSource</directory>
+ <outputDirectory>ufoSource</outputDirectory>
</fileSet>
</fileSets>
<files>
Modified: trunk/docs/examples/gettingstarted/repositories/src/main/resources/configRepository.xml
===================================================================
--- trunk/docs/examples/gettingstarted/repositories/src/main/resources/configRepository.xml 2010-01-09 18:49:20 UTC (rev 1568)
+++ trunk/docs/examples/gettingstarted/repositories/src/main/resources/configRepository.xml 2010-01-09 21:29:12 UTC (rev 1569)
@@ -72,7 +72,7 @@
files and folders as JCR nodes. It can save JCR nodes too, but only if they have certain primary types.
-->
<dna:source jcr:name="UFOs" dna:classname="org.jboss.dna.connector.filesystem.FileSystemSource"
- dna:workspaceRootPath="./src/main/resources/ufoSource"
+ dna:workspaceRootPath="./ufoSource"
dna:defaultWorkspaceName="workspace1"
dna:creatingWorkspacesAllowed="false"
dna:updatesAllowed="true"/>
Deleted: trunk/docs/examples/gettingstarted/repositories/src/main/resources/ufoSource/workspace1/README.txt
===================================================================
--- trunk/docs/examples/gettingstarted/repositories/src/main/resources/ufoSource/workspace1/README.txt 2010-01-09 18:49:20 UTC (rev 1568)
+++ trunk/docs/examples/gettingstarted/repositories/src/main/resources/ufoSource/workspace1/README.txt 2010-01-09 21:29:12 UTC (rev 1569)
@@ -1 +0,0 @@
-This workspace contains skeletal information on unconfirmed UFOs.
\ No newline at end of file
Deleted: trunk/docs/examples/gettingstarted/repositories/src/main/resources/ufoSource/workspace1/martians/zzyzx.txt
===================================================================
--- trunk/docs/examples/gettingstarted/repositories/src/main/resources/ufoSource/workspace1/martians/zzyzx.txt 2010-01-09 18:49:20 UTC (rev 1568)
+++ trunk/docs/examples/gettingstarted/repositories/src/main/resources/ufoSource/workspace1/martians/zzyzx.txt 2010-01-09 21:29:12 UTC (rev 1569)
@@ -1,2 +0,0 @@
-The Zzyzx is the fastest vehicle in the Martian fleet. It has spinning lasers and can drop
-disintegration bombs on unsuspecting targets.
Deleted: trunk/docs/examples/gettingstarted/repositories/src/main/resources/ufoSource/workspace1/venutians/frobozz.txt
===================================================================
--- trunk/docs/examples/gettingstarted/repositories/src/main/resources/ufoSource/workspace1/venutians/frobozz.txt 2010-01-09 18:49:20 UTC (rev 1568)
+++ trunk/docs/examples/gettingstarted/repositories/src/main/resources/ufoSource/workspace1/venutians/frobozz.txt 2010-01-09 21:29:12 UTC (rev 1569)
@@ -1 +0,0 @@
-The Venutian Frobozz travels faster than the speed of light and fires a death ray.
\ No newline at end of file
Copied: trunk/docs/examples/gettingstarted/repositories/ufoSource/workspace1/README.txt (from rev 1568, trunk/docs/examples/gettingstarted/repositories/src/main/resources/ufoSource/workspace1/README.txt)
===================================================================
--- trunk/docs/examples/gettingstarted/repositories/ufoSource/workspace1/README.txt (rev 0)
+++ trunk/docs/examples/gettingstarted/repositories/ufoSource/workspace1/README.txt 2010-01-09 21:29:12 UTC (rev 1569)
@@ -0,0 +1 @@
+This workspace contains skeletal information on unconfirmed UFOs.
\ No newline at end of file
Property changes on: trunk/docs/examples/gettingstarted/repositories/ufoSource/workspace1/README.txt
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: trunk/docs/examples/gettingstarted/repositories/ufoSource/workspace1/martians/zzyzx.txt (from rev 1568, trunk/docs/examples/gettingstarted/repositories/src/main/resources/ufoSource/workspace1/martians/zzyzx.txt)
===================================================================
--- trunk/docs/examples/gettingstarted/repositories/ufoSource/workspace1/martians/zzyzx.txt (rev 0)
+++ trunk/docs/examples/gettingstarted/repositories/ufoSource/workspace1/martians/zzyzx.txt 2010-01-09 21:29:12 UTC (rev 1569)
@@ -0,0 +1,2 @@
+The Zzyzx is the fastest vehicle in the Martian fleet. It has spinning lasers and can drop
+disintegration bombs on unsuspecting targets.
Property changes on: trunk/docs/examples/gettingstarted/repositories/ufoSource/workspace1/martians/zzyzx.txt
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: trunk/docs/examples/gettingstarted/repositories/ufoSource/workspace1/venutians/frobozz.txt (from rev 1568, trunk/docs/examples/gettingstarted/repositories/src/main/resources/ufoSource/workspace1/venutians/frobozz.txt)
===================================================================
--- trunk/docs/examples/gettingstarted/repositories/ufoSource/workspace1/venutians/frobozz.txt (rev 0)
+++ trunk/docs/examples/gettingstarted/repositories/ufoSource/workspace1/venutians/frobozz.txt 2010-01-09 21:29:12 UTC (rev 1569)
@@ -0,0 +1 @@
+The Venutian Frobozz travels faster than the speed of light and fires a death ray.
\ No newline at end of file
Property changes on: trunk/docs/examples/gettingstarted/repositories/ufoSource/workspace1/venutians/frobozz.txt
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
15 years, 11 months
DNA SVN: r1568 - trunk/dna-jcr/src/main/java/org/jboss/dna/jcr.
by dna-commits@lists.jboss.org
Author: bcarothers
Date: 2010-01-09 13:49:20 -0500 (Sat, 09 Jan 2010)
New Revision: 1568
Modified:
trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JndiRepositoryFactory.java
Log:
Removed extra @Override
Modified: trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JndiRepositoryFactory.java
===================================================================
--- trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JndiRepositoryFactory.java 2010-01-09 16:59:11 UTC (rev 1567)
+++ trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JndiRepositoryFactory.java 2010-01-09 18:49:20 UTC (rev 1568)
@@ -116,7 +116,6 @@
* @throws RepositoryException if the {@link JcrEngine#start() JcrEngine could not be started}, the named repository does not
* exist in the given configuration resource, or the named repository could not be created
*/
- @Override
public JcrRepository getObjectInstance( Object obj,
Name name,
Context nameCtx,
15 years, 11 months
DNA SVN: r1567 - in trunk/dna-jcr/src/main: resources/org/jboss/dna/jcr and 1 other directory.
by dna-commits@lists.jboss.org
Author: bcarothers
Date: 2010-01-09 11:59:11 -0500 (Sat, 09 Jan 2010)
New Revision: 1567
Added:
trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JndiRepositoryFactory.java
Modified:
trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrI18n.java
trunk/dna-jcr/src/main/resources/org/jboss/dna/jcr/JcrI18n.properties
Log:
DNA-640 JNDI-Based Deployment
Applied patch adds a standalone JNDI factory for the JcrEngine class that exposes JCR repositories. Multiple JCR repositories can be exposed by the same engine by creating successive JNDI references. Only one JcrEngine will be started/loaded.
Modified: trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrI18n.java
===================================================================
--- trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrI18n.java 2010-01-09 11:58:01 UTC (rev 1566)
+++ trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JcrI18n.java 2010-01-09 16:59:11 UTC (rev 1567)
@@ -32,6 +32,12 @@
@Immutable
public final class JcrI18n {
+ public static I18n engineStarting;
+ public static I18n engineStarted;
+ public static I18n couldNotStartEngine;
+ public static I18n engineStopping;
+ public static I18n engineStopped;
+
public static I18n cannotConvertValue;
public static I18n credentialsMustProvideJaasMethod;
public static I18n mustBeInPrivilegedAction;
Added: trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JndiRepositoryFactory.java
===================================================================
--- trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JndiRepositoryFactory.java (rev 0)
+++ trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JndiRepositoryFactory.java 2010-01-09 16:59:11 UTC (rev 1567)
@@ -0,0 +1,181 @@
+package org.jboss.dna.jcr;
+
+import java.io.IOException;
+import java.util.Hashtable;
+import java.util.concurrent.TimeUnit;
+import javax.jcr.Repository;
+import javax.jcr.RepositoryException;
+import javax.naming.Context;
+import javax.naming.Name;
+import javax.naming.NamingException;
+import javax.naming.RefAddr;
+import javax.naming.Reference;
+import javax.naming.event.EventContext;
+import javax.naming.event.NamespaceChangeListener;
+import javax.naming.event.NamingEvent;
+import javax.naming.event.NamingExceptionEvent;
+import javax.naming.spi.ObjectFactory;
+import org.jboss.dna.common.collection.Problem;
+import org.jboss.dna.common.collection.Problems;
+import org.jboss.dna.common.util.Logger;
+import org.xml.sax.SAXException;
+
+/**
+ * The {@code JndiRepositoryFactory} class provides a means of initializing and accessing {@link Repository repositories} in a
+ * JNDI tree. <h2>Example JNDI Configurations</h2> <h3>Tomcat 5.5</h3>
+ * <p>
+ * The following configuration can be added to added to server.xml in Tomcat 5.5 to initialize a {@code JcrRepository} and add it
+ * to the JNDI tree.
+ *
+ * <pre>
+ * <GlobalNamingResources>
+ * <!-- Other configuration omitted -->
+ * <Resource name="jcr/local" auth="Container"
+ * type="javax.jcr.Repository"
+ * factory="org.jboss.dna.jcr.JndiRepositoryFactory"
+ * configFile="/tck/default/configRepository.xml"
+ * repositoryName="Test Repository Source"
+ * />
+ * </GlobalNamingResources>
+ * </pre>
+ *
+ * This will create a repository loaded from the resource "/tck/default/configRepository.xml" (which must be accessible
+ * through the classpath) and return the JCR repository named "Test Repository Source". The name of the repository is
+ * important as a single configuration file may contain configuration information for many JCR repositories.
+ * </p>
+ */
+public class JndiRepositoryFactory implements ObjectFactory {
+
+ private static final String CONFIG_FILE = "configFile";
+ private static final String REPOSITORY_NAME = "repositoryName";
+
+ private static JcrEngine engine;
+ protected static final Logger log = Logger.getLogger(JndiRepositoryFactory.class);
+
+ /**
+ * {@link JcrConfiguration#loadFrom(java.io.InputStream) Initializes} and {@link JcrEngine#start() starts} the {@code
+ * JcrEngine} managed by this factory.
+ *
+ * @param configResourceName the fully-qualified name of the resource containing the configuration information for the {@code
+ * JcrEngine}
+ * @throws IOException if there is an error or problem reading the configuration resource at the supplied path
+ * @throws SAXException if the contents of the configuration resource are not valid XML
+ * @throws RepositoryException if the {@link JcrEngine#start() JcrEngine could not be started}
+ * @see JcrConfiguration#loadFrom(java.io.InputStream)
+ * @see Class#getResourceAsStream(String)
+ */
+ private static synchronized void initializeEngine( String configResourceName )
+ throws IOException, SAXException, RepositoryException {
+ if (engine != null) return;
+
+ log.info(JcrI18n.engineStarting);
+ long start = System.currentTimeMillis();
+
+ JcrConfiguration config = new JcrConfiguration();
+ engine = config.loadFrom(JndiRepositoryFactory.class.getResourceAsStream(configResourceName)).build();
+ engine.start();
+
+ Problems problems = engine.getProblems();
+ for (Problem problem : problems) {
+ switch (problem.getStatus()) {
+ case ERROR:
+ log.error(problem.getThrowable(), problem.getMessage(), problem.getParameters());
+ break;
+ case WARNING:
+ log.warn(problem.getThrowable(), problem.getMessage(), problem.getParameters());
+ break;
+ case INFO:
+ log.info(problem.getThrowable(), problem.getMessage(), problem.getParameters());
+ break;
+ }
+ }
+
+ if (problems.hasErrors()) {
+ throw new RepositoryException(JcrI18n.couldNotStartEngine.text());
+ }
+ log.info(JcrI18n.engineStarted, (System.currentTimeMillis() - start));
+ }
+
+ /**
+ * Creates an {@code JcrRepository} using the reference information specified.
+ * <p>
+ * This method first attempts to convert the {@code obj} parameter into a {@link Reference reference to JNDI configuration
+ * information}. If that is successful, a {@link JcrEngine} will be created (if not previously created by a call to this
+ * method) and it will be configured from the resource at the location specified by the {@code configFile} key in the
+ * reference. After the configuration is successful, the {@link JcrEngine#getRepository(String) JcrEngine will be queried} for
+ * the repository with the name specified by the value of the @{code repositoryName} key in the reference.
+ * </p>
+ *
+ * @param obj the reference to the JNDI configuration information; must be a non-null instance of {@link Reference}
+ * @param name ignored
+ * @param nameCtx ignored
+ * @param environment ignored
+ * @throws IOException if there is an error or problem reading the configuration resource at the supplied path
+ * @throws SAXException if the contents of the configuration resource are not valid XML
+ * @throws NamingException if there is an error registering the namespace listener
+ * @throws RepositoryException if the {@link JcrEngine#start() JcrEngine could not be started}, the named repository does not
+ * exist in the given configuration resource, or the named repository could not be created
+ */
+ @Override
+ public JcrRepository getObjectInstance( Object obj,
+ Name name,
+ Context nameCtx,
+ Hashtable<?, ?> environment )
+ throws IOException, SAXException, RepositoryException, NamingException {
+ if (!(obj instanceof Reference)) return null;
+
+ Reference ref = (Reference)obj;
+
+ if (engine == null) {
+ RefAddr configFile = ref.get(CONFIG_FILE);
+ assert configFile != null;
+
+ initializeEngine(configFile.getContent().toString());
+
+ if (nameCtx instanceof EventContext) {
+ EventContext evtCtx = (EventContext)nameCtx;
+
+ NamespaceChangeListener listener = new NamespaceChangeListener() {
+
+ public void namingExceptionThrown( NamingExceptionEvent evt ) {
+ evt.getException().printStackTrace();
+ }
+
+ public void objectAdded( NamingEvent evt ) {
+ }
+
+ public void objectRemoved( NamingEvent evt ) {
+ Object oldObject = evt.getOldBinding().getObject();
+ if (!(oldObject instanceof JcrEngine)) return;
+
+ JcrEngine engine = (JcrEngine)oldObject;
+
+ log.info(JcrI18n.engineStopping);
+ long start = System.currentTimeMillis();
+ engine.shutdown();
+ try {
+ engine.awaitTermination(30, TimeUnit.SECONDS);
+ log.info(JcrI18n.engineStopped, (System.currentTimeMillis() - start));
+ } catch (InterruptedException ie) {
+ // Thread.interrupted();
+ }
+ }
+
+ public void objectRenamed( NamingEvent evt ) {
+ }
+
+ };
+
+ evtCtx.addNamingListener(name, EventContext.OBJECT_SCOPE, listener);
+ }
+ }
+
+ assert engine != null;
+
+ RefAddr repositoryName = ref.get(REPOSITORY_NAME);
+ assert repositoryName != null;
+
+ return engine.getRepository(repositoryName.getContent().toString());
+ }
+
+}
Property changes on: trunk/dna-jcr/src/main/java/org/jboss/dna/jcr/JndiRepositoryFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: trunk/dna-jcr/src/main/resources/org/jboss/dna/jcr/JcrI18n.properties
===================================================================
--- trunk/dna-jcr/src/main/resources/org/jboss/dna/jcr/JcrI18n.properties 2010-01-09 11:58:01 UTC (rev 1566)
+++ trunk/dna-jcr/src/main/resources/org/jboss/dna/jcr/JcrI18n.properties 2010-01-09 16:59:11 UTC (rev 1567)
@@ -21,6 +21,13 @@
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA, or see the FSF site: http://www.fsf.org.
#
+
+engineStarting = JcrEngine starting...
+engineStarted = JcrEngine started in {0} ms
+couldNotStartEngine = Could not start the JcrEngine
+engineStopping = JcrEngine stopping...
+engineStopped = JcrEngine stopped in {0} ms
+
cannotConvertValue = Cannot convert {0} value to {1}
credentialsMustProvideJaasMethod = The Credentials class "{0}" must implement "public LoginContext getLoginContext();", be an instance of "javax.jcr.SimpleCredentials", or be an instance of "org.jboss.dna.jcr.SecurityContextCredentials"
mustBeInPrivilegedAction=login() can only be called successfully from within a java.security.PrivilegedAction or when the ANONYMOUS_USER_ROLES repository option is set
15 years, 11 months
DNA SVN: r1566 - in trunk: dna-jcr-tck and 2 other directories.
by dna-commits@lists.jboss.org
Author: bcarothers
Date: 2010-01-09 06:58:01 -0500 (Sat, 09 Jan 2010)
New Revision: 1566
Removed:
trunk/dna-jcr-tck/src/test/resources/repositoryForTckTests.xml
Modified:
trunk/dna-jcr-tck/pom.xml
trunk/dna-jcr-tck/src/test/java/org/jboss/dna/jcr/Jsr170LevelOneTckTest.java
trunk/dna-jcr-tck/src/test/java/org/jboss/dna/jcr/Jsr170OptionalSqlQueryTckTest.java
trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrTckTest.java
Log:
DNA-639 JcrTckTest Missing Two Test Cases
Applied patch that updates the tests in JcrTckTest (and comments them out as they don't pass yet) and cleans up dna-jcr-tck, which had some misclassified test cases and some out-of-date dependencies,
Modified: trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrTckTest.java
===================================================================
--- trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrTckTest.java 2010-01-08 17:31:57 UTC (rev 1565)
+++ trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrTckTest.java 2010-01-09 11:58:01 UTC (rev 1566)
@@ -174,7 +174,7 @@
addTestSuite(org.apache.jackrabbit.test.api.ExportDocViewTest.class);
addTestSuite(org.apache.jackrabbit.test.api.RepositoryLoginTest.class);
- // These might not all be level one tests
+ // addTestSuite(org.apache.jackrabbit.test.api.query.ElementTest.class);
addTestSuite(org.apache.jackrabbit.test.api.query.XPathPosIndexTest.class);
// addTestSuite(org.apache.jackrabbit.test.api.query.XPathDocOrderTest.class);
addTestSuite(org.apache.jackrabbit.test.api.query.XPathOrderByTest.class);
@@ -269,6 +269,7 @@
addTestSuite(SerializationTest.class);
addTestSuite(ValueFactoryTest.class);
+ // addTestSuite(XPathQueryLevel2Test.class);
}
}
Modified: trunk/dna-jcr-tck/pom.xml
===================================================================
--- trunk/dna-jcr-tck/pom.xml 2010-01-08 17:31:57 UTC (rev 1565)
+++ trunk/dna-jcr-tck/pom.xml 2010-01-09 11:58:01 UTC (rev 1566)
@@ -18,44 +18,50 @@
defined in the dependencyManagement section of the parent pom.
-->
<dependencies>
- <dependency>
- <groupId>org.jboss.dna</groupId>
- <artifactId>dna-common</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.dna</groupId>
- <artifactId>dna-common</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.dna</groupId>
- <artifactId>dna-graph</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.dna</groupId>
- <artifactId>dna-graph</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.dna</groupId>
- <artifactId>dna-repository</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.dna</groupId>
- <artifactId>dna-jcr</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.dna</groupId>
- <artifactId>dna-jcr</artifactId>
- <version>${project.version}</version>
- <type>test-jar</type>
- <scope>test</scope>
- </dependency>
+ <dependency>
+ <groupId>org.jboss.dna</groupId>
+ <artifactId>dna-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.dna</groupId>
+ <artifactId>dna-classloader-maven</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.dna</groupId>
+ <artifactId>dna-repository</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.dna</groupId>
+ <artifactId>dna-jcr</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.dna</groupId>
+ <artifactId>dna-sequencer-ddl</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+
+ <!--
+ Testing (note the scope)
+ -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.dna</groupId>
+ <artifactId>dna-common</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.dna</groupId>
+ <artifactId>dna-jcr</artifactId>
+ <version>${project.version}</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
<!--
Testing (note the scope)
-->
@@ -81,19 +87,14 @@
<artifactId>log4j</artifactId>
<scope>test</scope>
</dependency>
+
<!--
- Java Concurrency in Practice annotations
- -->
- <dependency>
- <groupId>net.jcip</groupId>
- <artifactId>jcip-annotations</artifactId>
- </dependency>
- <!--
Java Content Repository API
-->
<dependency>
<groupId>javax.jcr</groupId>
<artifactId>jcr</artifactId>
+ <scope>test</scope>
</dependency>
<!--
Apache JCR API unit tests (for any JCR implementation), which is a subset of the official TCK
@@ -101,13 +102,11 @@
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-jcr-tests</artifactId>
+ <scope>test</scope>
</dependency>
- <dependency>
- <groupId>com.google.code.google-collections</groupId>
- <artifactId>google-collect</artifactId>
- <version>snapshot-20080530</version>
- </dependency>
-
+ <!--
+ ID Trust (JAAS Dependency)
+ -->
<dependency>
<groupId>org.jboss.security</groupId>
<artifactId>jboss-idtrust</artifactId>
@@ -115,27 +114,32 @@
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jboss-security-spi-bare</artifactId>
- <version>2.0.2.SP6</version>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-security-spi-bare</artifactId>
+ <version>2.0.2.SP6</version>
<scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.jboss.security</groupId>
- <artifactId>jbosssx-bare</artifactId>
- <version>2.0.2.SP6</version>
- <exclusions>
- <exclusion>
- <groupId>apache-xalan</groupId>
- <artifactId>xalan</artifactId>
- </exclusion>
- <exclusion>
- <groupId>apache-xalan</groupId>
- <artifactId>serializer</artifactId>
- </exclusion>
- </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jbosssx-bare</artifactId>
+ <version>2.0.2.SP6</version>
<scope>test</scope>
- </dependency>
+ <exclusions>
+ <exclusion>
+ <groupId>apache-xalan</groupId>
+ <artifactId>xalan</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>apache-xalan</groupId>
+ <artifactId>serializer</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>com.google.collections</groupId>
+ <artifactId>google-collections</artifactId>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: trunk/dna-jcr-tck/src/test/java/org/jboss/dna/jcr/Jsr170LevelOneTckTest.java
===================================================================
--- trunk/dna-jcr-tck/src/test/java/org/jboss/dna/jcr/Jsr170LevelOneTckTest.java 2010-01-08 17:31:57 UTC (rev 1565)
+++ trunk/dna-jcr-tck/src/test/java/org/jboss/dna/jcr/Jsr170LevelOneTckTest.java 2010-01-09 11:58:01 UTC (rev 1566)
@@ -99,11 +99,6 @@
addTestSuite(org.apache.jackrabbit.test.api.query.XPathJcrPathTest.class);
addTestSuite(org.apache.jackrabbit.test.api.query.ElementTest.class);
- addTestSuite(org.apache.jackrabbit.test.api.query.OrderByDateTest.class);
- addTestSuite(org.apache.jackrabbit.test.api.query.OrderByDoubleTest.class);
- addTestSuite(org.apache.jackrabbit.test.api.query.OrderByLongTest.class);
- addTestSuite(org.apache.jackrabbit.test.api.query.OrderByMultiTypeTest.class);
- addTestSuite(org.apache.jackrabbit.test.api.query.OrderByStringTest.class);
addTestSuite(org.apache.jackrabbit.test.api.query.QueryResultNodeIteratorTest.class);
addTestSuite(org.apache.jackrabbit.test.api.query.XPathDocOrderTest.class);
addTestSuite(org.apache.jackrabbit.test.api.query.XPathJcrPathTest.class);
Modified: trunk/dna-jcr-tck/src/test/java/org/jboss/dna/jcr/Jsr170OptionalSqlQueryTckTest.java
===================================================================
--- trunk/dna-jcr-tck/src/test/java/org/jboss/dna/jcr/Jsr170OptionalSqlQueryTckTest.java 2010-01-08 17:31:57 UTC (rev 1565)
+++ trunk/dna-jcr-tck/src/test/java/org/jboss/dna/jcr/Jsr170OptionalSqlQueryTckTest.java 2010-01-09 11:58:01 UTC (rev 1566)
@@ -65,6 +65,12 @@
protected OptionalSqlQueryFeatureTests() {
super("JCR Optional Feature (JCR-SQL Query) Tests");
+ addTestSuite(org.apache.jackrabbit.test.api.query.OrderByDateTest.class);
+ addTestSuite(org.apache.jackrabbit.test.api.query.OrderByDoubleTest.class);
+ addTestSuite(org.apache.jackrabbit.test.api.query.OrderByLongTest.class);
+ addTestSuite(org.apache.jackrabbit.test.api.query.OrderByMultiTypeTest.class);
+ addTestSuite(org.apache.jackrabbit.test.api.query.OrderByStringTest.class);
+
addTestSuite(SQLOrderByTest.class);
addTestSuite(SQLQueryLevel2Test.class);
addTestSuite(SQLJoinTest.class);
Deleted: trunk/dna-jcr-tck/src/test/resources/repositoryForTckTests.xml
===================================================================
--- trunk/dna-jcr-tck/src/test/resources/repositoryForTckTests.xml 2010-01-08 17:31:57 UTC (rev 1565)
+++ trunk/dna-jcr-tck/src/test/resources/repositoryForTckTests.xml 2010-01-09 11:58:01 UTC (rev 1566)
@@ -1,59 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ JBoss DNA (http://www.jboss.org/dna)
- ~
- ~ See the COPYRIGHT.txt file distributed with this work for information
- ~ regarding copyright ownership. Some portions may be licensed
- ~ to Red Hat, Inc. under one or more contributor license agreements.
- ~ See the AUTHORS.txt file in the distribution for a full listing of
- ~ individual contributors.
- ~
- ~ JBoss DNA is free software. Unless otherwise indicated, all code in JBoss DNA
- ~ is licensed to you under the terms of the GNU Lesser General Public License as
- ~ published by the Free Software Foundation; either version 2.1 of
- ~ the License, or (at your option) any later version.
- ~
- ~ JBoss DNA is distributed in the hope that it will be useful,
- ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- ~ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- ~ for more details.
- ~
- ~ You should have received a copy of the GNU Lesser General Public License
- ~ along with this distribution; if not, write to:
- ~ Free Software Foundation, Inc.
- ~ 51 Franklin Street, Fifth Floor
- ~ Boston, MA 02110-1301 USA
- -->
-<testroot xmlns:jcr="http://www.jcp.org/jcr/1.0"
- xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
- xmlns:dna="http://www.jboss.org/dna/1.0"
- jcr:primaryType="nt:unstructured">
- <nt:unstructured jcr:name="node1" prop1="<foo&foo>" >
- <!--
- This stanza checks for the jcr:xmltext special case for export as per JCR 1.0.1 section 6.4.2.3
- -->
- <nt:unstructured jcr:name="jcr:xmltext" jcr:xmlcharacters="This is my "XML" text!" />
- </nt:unstructured>
- <nt:unstructured jcr:name="node2 has a multi-word name" multi-valued-property="bar baz blah">
- <!--
- This stanza checks that consecutive jcr:xmltext elements will be merged in the export as
- per JCR 1.0.1 section 6.4.2.3
- -->
- <nt:unstructured jcr:name="jcr:xmltext" jcr:xmlcharacters="This is my "XML" text!" />
- <nt:unstructured jcr:name="jcr:xmltext" jcr:xmlcharacters="This is my "other" text!" />
- </nt:unstructured>
- <!--
- Test of unprintable character exports.
- Cannot test \r character here on Windows as TCK XML Parser will replace it with \n and fail the comparison
- -->
- <nt:unstructured jcr:name="node3" multi-line-property="Line	1
Line 2"/>
-
- <!-- Helps test date property conversion, mandatory properties (jcr:content), and primary items -->
- <!--
- <nt:folder jcr:name="hierarchyRoot" jcr:created="+2009-03-15T12:30:00.000Z">
- <nt:file jcr:name="testFile" jcr:created="+2009-03-15T13:30:00.000Z">
- <nt:unstructured jcr:name="jcr:content" />
- </nt:file>
- </nt:folder>
- -->
-</testroot>
\ No newline at end of file
15 years, 11 months
DNA SVN: r1565 - trunk.
by dna-commits@lists.jboss.org
Author: spagop
Date: 2010-01-08 12:31:57 -0500 (Fri, 08 Jan 2010)
New Revision: 1565
Modified:
trunk/pom.xml
Log:
DONE REST client osgi bundle for the Eclipse plugin
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-01-08 17:19:02 UTC (rev 1564)
+++ trunk/pom.xml 2010-01-08 17:31:57 UTC (rev 1565)
@@ -690,6 +690,12 @@
<artifactId>maven-jar-plugin</artifactId>
<version>2.2</version>
</plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <version>1.4.3</version>
+ </plugin>
</plugins>
</pluginManagement>
<plugins>
15 years, 11 months
DNA SVN: r1564 - trunk/dna-common.
by dna-commits@lists.jboss.org
Author: spagop
Date: 2010-01-08 12:19:02 -0500 (Fri, 08 Jan 2010)
New Revision: 1564
Modified:
trunk/dna-common/pom.xml
Log:
CLOSED - issue DNA-614: REST client osgi bundle for the Eclipse plugin
https://jira.jboss.org/jira/browse/DNA-614
Modified: trunk/dna-common/pom.xml
===================================================================
--- trunk/dna-common/pom.xml 2010-01-08 17:18:23 UTC (rev 1563)
+++ trunk/dna-common/pom.xml 2010-01-08 17:19:02 UTC (rev 1564)
@@ -1,66 +1,97 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.jboss.dna</groupId>
- <artifactId>dna</artifactId>
- <version>0.7-SNAPSHOT</version>
- </parent>
- <!-- The groupId and version values are inherited from parent -->
- <artifactId>dna-common</artifactId>
- <packaging>jar</packaging>
- <name>JBoss DNA Common</name>
- <description>JBoss DNA Common Library and Utilities</description>
- <url>http://labs.jboss.org/dna</url>
- <!--
- Define the dependencies. Note that all version and scopes default to those
- defined in the dependencyManagement section of the parent pom.
- -->
- <dependencies>
- <!--
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.jboss.dna</groupId>
+ <artifactId>dna</artifactId>
+ <version>0.7-SNAPSHOT</version>
+ </parent>
+ <!-- The groupId and version values are inherited from parent -->
+ <artifactId>dna-common</artifactId>
+ <packaging>jar</packaging>
+ <name>JBoss DNA Common</name>
+ <description>JBoss DNA Common Library and Utilities</description>
+ <url>http://labs.jboss.org/dna</url>
+
+ <build>
+ <plugins>
+ <!--
+ Adding OSGI metadata to the JAR without changing the packaging type.
+ -->
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>bundle-manifest</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>manifest</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <!--
+ Define the dependencies. Note that all version and scopes default to
+ those defined in the dependencyManagement section of the parent pom.
+ -->
+ <dependencies>
+ <!--
Testing (note the scope)
-->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </dependency>
- <dependency>
- <groupId>org.hamcrest</groupId>
- <artifactId>hamcrest-library</artifactId>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <scope>test</scope>
- </dependency>
- <!--
- Logging (require SLF4J API for compiling, but use Log4J and its SLF4J binding for testing)
- -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </dependency>
- <!--
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.hamcrest</groupId>
+ <artifactId>hamcrest-library</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-all</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <!--
+ Logging (require SLF4J API for compiling, but use Log4J and its SLF4J
+ binding for testing)
+ -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+ <!--
Java Concurrency in Practice annotations
-->
- <dependency>
- <groupId>net.jcip</groupId>
- <artifactId>jcip-annotations</artifactId>
- </dependency>
- </dependencies>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-report-plugin</artifactId>
- </plugin>
- </plugins>
- </reporting>
+ <dependency>
+ <groupId>net.jcip</groupId>
+ <artifactId>jcip-annotations</artifactId>
+ </dependency>
+ </dependencies>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
</project>
\ No newline at end of file
15 years, 11 months
DNA SVN: r1563 - trunk/web/dna-web-jcr-rest-client.
by dna-commits@lists.jboss.org
Author: spagop
Date: 2010-01-08 12:18:23 -0500 (Fri, 08 Jan 2010)
New Revision: 1563
Modified:
trunk/web/dna-web-jcr-rest-client/pom.xml
Log:
CLOSED - issue DNA-614: REST client osgi bundle for the Eclipse plugin
https://jira.jboss.org/jira/browse/DNA-614
Modified: trunk/web/dna-web-jcr-rest-client/pom.xml
===================================================================
--- trunk/web/dna-web-jcr-rest-client/pom.xml 2010-01-08 16:01:33 UTC (rev 1562)
+++ trunk/web/dna-web-jcr-rest-client/pom.xml 2010-01-08 17:18:23 UTC (rev 1563)
@@ -37,22 +37,22 @@
<version>${project.version}</version>
<scope>integration-test</scope>
</dependency>
- <dependency>
- <groupId>org.jboss.resteasy</groupId>
- <artifactId>resteasy-jaxrs</artifactId>
- <version>1.2.1.GA</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.resteasy</groupId>
- <artifactId>resteasy-jaxb-provider</artifactId>
- <version>1.2.1.GA</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.resteasy</groupId>
- <artifactId>resteasy-jettison-provider</artifactId>
- <version>1.2.1.GA</version>
- </dependency>
<dependency>
+ <groupId>org.jboss.resteasy</groupId>
+ <artifactId>resteasy-jaxrs</artifactId>
+ <version>1.2.1.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.resteasy</groupId>
+ <artifactId>resteasy-jaxb-provider</artifactId>
+ <version>1.2.1.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.resteasy</groupId>
+ <artifactId>resteasy-jettison-provider</artifactId>
+ <version>1.2.1.GA</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.0</version>
@@ -209,6 +209,32 @@
</execution>
</executions>
</plugin>
+
+ <!--
+ Adding OSGI metadata to the JAR without changing the packaging
+ type.
+ -->
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>bundle-manifest</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>manifest</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</profile>
15 years, 11 months