diff --git a/hibernate/README-source.adoc b/hibernate/README-source.adoc index 68ed914d45..8dccccd0e3 100644 --- a/hibernate/README-source.adoc +++ b/hibernate/README-source.adoc @@ -52,61 +52,9 @@ For example: // build and run with standard server distribution [[build_and_run_the_quickstart_with_server_dist]] == Building and running the quickstart application with a {productName} server distribution -// Back Up the {productName} Standalone Server Configuration -include::../shared-doc/back-up-server-standalone-configuration.adoc[leveloffset=+2] // Start the {productName} Standalone Server include::../shared-doc/start-the-standalone-server.adoc[leveloffset=+2] -[[configure_the_server]] -=== Configure the Server - -You can configure the server by running JBoss CLI commands. For your convenience, this quickstart batches the commands into a `configure-server.cli` script provided in the root directory of this quickstart. - -. Before you begin, make sure you do the following: - -* xref:back_up_standalone_server_configuration[Back up the {productName} standalone server configuration] as described above. -* xref:start_the_eap_standalone_server[Start the {productName} server with the standalone default profile] as described above. - -. Review the `configure-server.cli` file in the root of this quickstart directory. This script adds datasource required for this quickstart. -. Open a new terminal, navigate to the root directory of this quickstart, and run the following command, replacing `__{jbossHomeName}__` with the path to your server: -+ -[source,subs="+quotes,attributes+",options="nowrap"] ----- -$ __{jbossHomeName}__/bin/jboss-cli.sh --connect --file=configure-server.cli ----- -+ -NOTE: For Windows, use the `__{jbossHomeName}__\bin\jboss-cli.bat` script. - -+ -You should see the following result when you run the script: -+ -[source,options="nowrap"] ----- -The batch executed successfully ----- - -. Stop the {productName} server. - -=== Review the Modified Server Configuration - -After stopping the server, open the `__{jbossHomeName}__/standalone/configuration/standalone.xml` file and review the changes. - -. The following datasource was added to the `datasources` subsystem. -+ -[source,xml,options="nowrap"] ----- - - jdbc:h2:mem:hibernate-quickstart;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=-1 - h2 - - sa - sa - - ----- - // Build and Deploy the Quickstart include::../shared-doc/build-and-deploy-the-quickstart.adoc[leveloffset=+2] @@ -120,22 +68,6 @@ include::../shared-doc/run-integration-tests-with-server-distribution.adoc[level // Undeploy the Quickstart include::../shared-doc/undeploy-the-quickstart.adoc[leveloffset=+2] -// Restore the {productName} Standalone Server Configuration -include::../shared-doc/restore-standalone-server-configuration.adoc[leveloffset=+2] - -// Additional information about this script -This script removes the datasource used for this quickstart. You should see the following result when you run the script: - - -[source,options="nowrap"] ----- -The batch executed successfully -process-state: reload-required ----- - -// Restore the {productName} Standalone Server Configuration Manually -include::../shared-doc/restore-standalone-server-configuration-manual.adoc[leveloffset=+3] - // Build and run sections for other environments/builds include::../shared-doc/build-and-run-the-quickstart-with-provisioned-server.adoc[leveloffset=+1] include::../shared-doc/build-and-run-the-quickstart-with-openshift.adoc[leveloffset=+1] diff --git a/hibernate/configure-server.cli b/hibernate/configure-server.cli deleted file mode 100644 index 3dc3c4de56..0000000000 --- a/hibernate/configure-server.cli +++ /dev/null @@ -1,13 +0,0 @@ -# Batch script to configure the datasource -batch - -# Start by creating the JDBC datasource -/subsystem=datasources/data-source=HibernateQuickstartDS:add(connection-url="jdbc:h2:mem:hibernate-quickstart;DB_CLOSE_ON_EXIT=FALSE;DB_CLOSE_DELAY=-1", jndi-name="java:jboss/datasources/HibernateQuickstartDS", driver-name=h2, user-name="sa", password="sa", use-java-context=true) - -# Run the batch commands -run-batch - -# Reload the server configuration -#reload - - diff --git a/hibernate/pom.xml b/hibernate/pom.xml index 3f50b2d2ed..41c251eafe 100644 --- a/hibernate/pom.xml +++ b/hibernate/pom.xml @@ -173,21 +173,10 @@ ${version.server} - - false h2-database - - - - - - - false - - @@ -211,21 +200,10 @@ ${version.server} cloud - - false h2-database - - - - - - - false - - diff --git a/hibernate/restore-configuration.cli b/hibernate/restore-configuration.cli deleted file mode 100644 index aa0d3a66d5..0000000000 --- a/hibernate/restore-configuration.cli +++ /dev/null @@ -1,18 +0,0 @@ -# Batch script to remove the hibernate quickstart datasource from the server configuration file - -# Start batching commands -batch - -# Remove the JDBC datasource -/subsystem=datasources/data-source=HibernateQuickstartDS:remove() - -# The README file contains instructions to undeploy the application. -# If you prefer, you can uncomment the following to undeploy the application using this script. -# undeploy hibernate.war - -# Run the batch commands -run-batch - -# Reload the server configuration -reload - diff --git a/hibernate/src/main/resources/META-INF/persistence.xml b/hibernate/src/main/resources/META-INF/persistence.xml index 5fcf2e9203..7d74d647ae 100644 --- a/hibernate/src/main/resources/META-INF/persistence.xml +++ b/hibernate/src/main/resources/META-INF/persistence.xml @@ -21,9 +21,7 @@ - - java:jboss/datasources/HibernateQuickstartDS + java:jboss/datasources/ExampleDS