Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ ModeShape Quickstarts
What is it?
-----------

ModeShape quickstarts are a collection of self-contained projects, that demonstrate how to use ModeShape when installed as part of JBoss EAP.
ModeShape quickstarts are a collection of self-contained projects, that demonstrate how to use ModeShape when installed as part of JBoss AS.
Each quickstart is a small, specific, focused, working example that can be used as a reference for your own project.

System requirements
-------------------

All you need to build the quickstarts is Java 6.0 (Java SDK 1.6) or better, Maven 3.0 or better. Each quickstart
produces a web application (WAR) that is designed to be run on JBoss Enterprise Application Platform 6.
All you need to build the quickstarts is Java 7.0 (Java SDK 1.7) or better, Maven 3.0 or better. Each quickstart
produces a web application (WAR) that is designed to be run on JBoss Wildfly 8.

Contents
--------

The following quickstarts are available:

* [modeshape-cdi](modeshape-cdi) - shows how you use CDI to inject various ModeShape JCR object instances
* [modeshape-cli](modeshape-cli) - shows how you use the JBoss EAP CLI to configure a ModeShape subsystem
* [modeshape-cli](modeshape-cli) - shows how you use the JBoss AS CLI to configure a ModeShape subsystem
* [modeshape-clustering](modeshape-clustering) - shows how you can configure multiple ModeShape nodes to run in a cluster
* [modeshape-ejb](modeshape-ejb) - shows how you can use ModeShape from different types of EJBs
* [modeshape-servlet](modeshape-servlet) - shows how you can use ModeShape from a standard web application Servlet
Expand Down
2 changes: 1 addition & 1 deletion dist/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<groupId>org.modeshape.quickstarts</groupId>
<artifactId>modeshape-quickstarts-dist</artifactId>
<version>3.7.1.Final</version>
<name>ModeShape EAP Quickstarts Distribution</name>
<name>ModeShape AS Quickstarts Distribution</name>
<description>POM for building the quickstarts distribution.</description>
<url>http://www.modeshape.org</url>
<packaging>pom</packaging>
Expand Down
5 changes: 2 additions & 3 deletions dist/src/main/assembly/assembly.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<assembly 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/xsd/assembly-1.1.1.xsd">
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd">
<id>dist</id>
<baseDirectory>modeshape-quickstarts-${project.version}</baseDirectory>
<formats>
Expand Down
10 changes: 5 additions & 5 deletions modeshape-cdi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ a JSF application, using only CDI.
System requirements
-------------------

All you need to build this project is Java 6.0 (Java SDK 1.6) or better, Maven 3.0 or better.
The application this project produces is designed to be run on JBoss Enterprise Application Platform 6.
All you need to build this project is Java 7.0 (Java SDK 1.7) or better, Maven 3.0 or better.
The application this project produces is designed to be run on JBoss Wildfly 8.

Install ModeShape's EAP kit into an existing JBoss EAP 6 server
Install ModeShape's AS kit into an existing Wildfly 8 server
-----------------------------------------------------
Before running this demo make sure that you have installed the ModeShape EAP kit into an existing JBoss EAP server.
Before running this demo make sure that you have installed the ModeShape Wildfly kit into an existing JBoss Wildfly server.
The simplest way to do this is to follow the instructions provided [here](https://docs.jboss.org/author/display/MODE/Installing+ModeShape+into+AS7)

Start JBoss EAP with the ModeShape configuration
Start JBoss Wildfly with the ModeShape configuration
--------------------------------------------------------------------------------

1. Open a command line and navigate to the root of the JBoss server directory.
Expand Down
16 changes: 8 additions & 8 deletions modeshape-cdi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.modeshape.quickstarts</groupId>
<artifactId>modeshape-cdi</artifactId>
<version>3.7.1.Final</version>
<version>4.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>Example of a JSF web application that uses ModeShape via CDI</name>
<description>
Expand All @@ -13,8 +13,8 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>

<!-- Maven plugin versions -->
<version.assembly.plugin>2.4</version.assembly.plugin>
Expand All @@ -29,7 +29,7 @@
<version.org.jboss.as.plugins.maven.plugin>7.4.Final</version.org.jboss.as.plugins.maven.plugin>

<!-- Global dependency version information-->
<version.modeshape>3.7.1.Final</version.modeshape>
<version.modeshape>4.0-SNAPSHOT</version.modeshape>
</properties>

<dependencyManagement>
Expand All @@ -40,7 +40,7 @@
specify the versions of any of those modules.-->
<dependency>
<groupId>org.modeshape.bom</groupId>
<artifactId>modeshape-bom-jbosseap</artifactId>
<artifactId>modeshape-bom-jbossas</artifactId>
<version>${version.modeshape}</version>
<type>pom</type>
<scope>import</scope>
Expand Down Expand Up @@ -92,6 +92,7 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
Expand Down Expand Up @@ -213,9 +214,8 @@
<id>arq-jbossas-remote</id>
<dependencies>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-arquillian-container-remote</artifactId>
<scope>test</scope>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-arquillian-container-remote</artifactId>
</dependency>
</dependencies>
</profile>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.modeshape.quickstart.cdi;

import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.Set;
import java.util.TreeSet;
import javax.enterprise.context.RequestScoped;
Expand Down Expand Up @@ -28,7 +28,7 @@ public class CDIController {
private String parentPath = "/";
private String newNodeName;

private Set<String> children = Collections.emptySet();
private Set<String> children = new TreeSet<>();

/**
* Sets a name for a new node to create.
Expand Down Expand Up @@ -79,7 +79,7 @@ public Set<String> getChildren() {
* Loads the children nodes of the node located at {@link CDIController#parentPath}
*/
public void loadChildren() {
children = new TreeSet<String>();
children = new TreeSet<>();
if (parentPath == null || parentPath.trim().length() == 0) {
FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(
"The absolute path of the parent node is required"));
Expand Down
14 changes: 7 additions & 7 deletions modeshape-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ a JSF application, after the ModeShape subsystem and the repository have be set
System requirements
-------------------

All you need to build this project is Java 6.0 (Java SDK 1.6) or better, Maven 3.0 or better.
The application this project produces is designed to be run on JBoss Enterprise Application Platform 6.
All you need to build this project is Java 7.0 (Java SDK 1.7) or better, Maven 3.0 or better.
The application this project produces is designed to be run on JBoss Wildfly 8.

Install ModeShape's EAP kit into an existing JBoss EAP 6 server
Install ModeShape's AS kit into an existing JBoss Wildfly server
-----------------------------------------------------
Before running this demo make sure that you have installed the ModeShape EAP kit into an existing JBoss EAP server.
Before running this demo make sure that you have installed the ModeShape AS kit into an existing JBoss Wildfly server.
The simplest way to do this is to follow the instructions provided [here](https://docs.jboss.org/author/display/MODE/Installing+ModeShape+into+AS7)

Start JBoss EAP with the default configuration
Start Wildfly with the default configuration
--------------------------------------------------------------------------------

1. Open a command line and navigate to the root of the JBoss server directory.
Expand All @@ -34,8 +34,8 @@ Run the CLI script that creates the demo repository
1. Open a command line and navigate to the root of the JBoss server directory.
2. The following shows the command line which runs the script that creates the repository:

For Linux: JBOSS_HOME/bin/jboss-cli.sh -c --file QUICKSTART_ROOT/src/main/resources/create-repository.cli
For Windows: JBOSS_HOME\bin\jboss-cli.bat -c --file QUICKSTART_ROOT\src\main\resources\create-repository.cli
For Linux: JBOSS_HOME/bin/jboss-cli.sh -c --file=QUICKSTART_ROOT/src/main/resources/create-repository.cli
For Windows: JBOSS_HOME\bin\jboss-cli.bat -c --file=QUICKSTART_ROOT\src\main\resources\create-repository.cli

Build and Deploy the Quickstart
-------------------------
Expand Down
15 changes: 7 additions & 8 deletions modeshape-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.modeshape.quickstarts</groupId>
<artifactId>modeshape-cli</artifactId>
<version>3.7.1.Final</version>
<version>4.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>Example of a JSF web application that uses CLI scripts to create and remove a repository</name>
<description>
Expand All @@ -13,8 +13,8 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>

<!-- Maven plugin versions -->
<version.assembly.plugin>2.4</version.assembly.plugin>
Expand All @@ -29,7 +29,7 @@
<version.org.jboss.as.plugins.maven.plugin>7.4.Final</version.org.jboss.as.plugins.maven.plugin>

<!-- Global dependency version information-->
<version.modeshape>3.7.1.Final</version.modeshape>
<version.modeshape>4.0-SNAPSHOT</version.modeshape>
</properties>

<dependencyManagement>
Expand All @@ -40,7 +40,7 @@
specify the versions of any of those modules.-->
<dependency>
<groupId>org.modeshape.bom</groupId>
<artifactId>modeshape-bom-jbosseap</artifactId>
<artifactId>modeshape-bom-jbossas</artifactId>
<version>${version.modeshape}</version>
<type>pom</type>
<scope>import</scope>
Expand Down Expand Up @@ -260,9 +260,8 @@
<id>arq-jbossas-remote</id>
<dependencies>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-arquillian-container-remote</artifactId>
<scope>test</scope>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-arquillian-container-remote</artifactId>
</dependency>
</dependencies>
</profile>
Expand Down
2 changes: 1 addition & 1 deletion modeshape-cli/src/main/resources/create-repository.cli
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if (outcome != success) of /subsystem=infinispan/cache-container=modeshape-test:
/subsystem=infinispan/cache-container=modeshape-test:add
/subsystem=infinispan/cache-container=modeshape-test/local-cache=test-cli:add
/subsystem=infinispan/cache-container=modeshape-test/local-cache=test-cli/transaction=TRANSACTION:add(mode=NON_XA)
/subsystem=infinispan/cache-container=modeshape-test/local-cache=test-cli/file-store=FILE_STORE:add(path="modeshape/store/test-cli",relative-to="jboss.server.data.dir",passivation=false,purge=false)
/subsystem=infinispan/cache-container=modeshape-test/local-cache=test-cli/file-store=FILE_STORE:add(path="modeshape/store/test-cli",passivation=false,purge=false)
end-if

# Add the test repository
Expand Down
10 changes: 5 additions & 5 deletions modeshape-clustering/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ is the distributed JMS configuration, with the __JMS provider configured for Hig
System requirements
-------------------

All you need to build this project is Java 6.0 (Java SDK 1.6) or better, Maven 3.0 or better.
The application this project produces is designed to be run on JBoss Enterprise Application Platform 6.
All you need to build this project is Java 7.0 (Java SDK 1.7) or better, Maven 3.0 or better.
The application this project produces is designed to be run on JBoss Wildfly.

Install ModeShape's EAP kit into an existing JBoss EAP 6 server
Install ModeShape's Wildfly kit into an existing JBoss Wildfly server
---------------------------------------------------------------

Before running this demo make sure that you have installed the ModeShape EAP kit into an existing JBoss EAP server.
Before running this demo make sure that you have installed the ModeShape Wildfly kit into an existing JBoss Wildfly server.
The simplest way to do this is to follow the instructions provided [here](https://docs.jboss.org/author/display/MODE/Installing+ModeShape+into+AS7)

Start 2 JBoss EAP instances with either set of provided configurations (see above)
Start 2 JBoss Wildfly instances with either set of provided configurations (see above)
--------------------------------------------------------------------------------------

1. Copy the `standalone-modeshape-master.xml` and `standalone-modeshape-slave.xml` configuration files from the root of the quickstart
Expand Down
15 changes: 7 additions & 8 deletions modeshape-clustering/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.modeshape.quickstarts</groupId>
<artifactId>modeshape-clustering</artifactId>
<version>3.7.1.Final</version>
<version>4.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>Example of a JSF web application that uses several clustered ModeShape servers</name>
<description>
Expand All @@ -13,8 +13,8 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>

<!-- Maven plugin versions -->
<version.assembly.plugin>2.4</version.assembly.plugin>
Expand All @@ -29,7 +29,7 @@
<version.org.jboss.as.plugins.maven.plugin>7.4.Final</version.org.jboss.as.plugins.maven.plugin>

<!-- Global dependency version information-->
<version.modeshape>3.7.1.Final</version.modeshape>
<version.modeshape>4.0-SNAPSHOT</version.modeshape>
</properties>

<dependencyManagement>
Expand All @@ -40,7 +40,7 @@
specify the versions of any of those modules.-->
<dependency>
<groupId>org.modeshape.bom</groupId>
<artifactId>modeshape-bom-jbosseap</artifactId>
<artifactId>modeshape-bom-jbossas</artifactId>
<version>${version.modeshape}</version>
<type>pom</type>
<scope>import</scope>
Expand Down Expand Up @@ -214,9 +214,8 @@
<id>arq-jbossas-remote</id>
<dependencies>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-arquillian-container-remote</artifactId>
<scope>test</scope>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-arquillian-container-remote</artifactId>
</dependency>
</dependencies>
</profile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class ClusteringController {
private String newNodeName;
private String nodeNamePattern;

private Set<String> nodes = Collections.emptySet();
private Set<String> nodes = new TreeSet<String>();

/**
* Sets a name for a new node to create.
Expand Down
Loading