[jboss-cvs] JBossAS SVN: r91528 - projects/docs/enterprise/5.0/Examples/RESTEasy.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Jul 21 19:30:23 EDT 2009


Author: laubai
Date: 2009-07-21 19:30:23 -0400 (Tue, 21 Jul 2009)
New Revision: 91528

Added:
   projects/docs/enterprise/5.0/Examples/RESTEasy/api-clients_README.txt
   projects/docs/enterprise/5.0/Examples/RESTEasy/async-job-service_README.txt
   projects/docs/enterprise/5.0/Examples/RESTEasy/ejb-integration_README.txt
   projects/docs/enterprise/5.0/Examples/RESTEasy/jaxb-json_README.txt
   projects/docs/enterprise/5.0/Examples/RESTEasy/jms-facade_README.txt
   projects/docs/enterprise/5.0/Examples/RESTEasy/resteasy-springMVC_README.txt
   projects/docs/enterprise/5.0/Examples/RESTEasy/simple_README.txt
   projects/docs/enterprise/5.0/Examples/RESTEasy/spring-hibernate_README.txt
Log:
Added revised RESTEasy example readmes.

Added: projects/docs/enterprise/5.0/Examples/RESTEasy/api-clients_README.txt
===================================================================
--- projects/docs/enterprise/5.0/Examples/RESTEasy/api-clients_README.txt	                        (rev 0)
+++ projects/docs/enterprise/5.0/Examples/RESTEasy/api-clients_README.txt	2009-07-21 23:30:23 UTC (rev 91528)
@@ -0,0 +1,31 @@
+README for the RESTEasy spring-hibernate example project:
+=========================================================
+
+This project is a simple example showing the use of:
+- @Path annotation
+- @GET annotation
+- PUT
+- POST
+- @PathParam annotation
+It also uses pure streaming output.
+
+
+System Requirements:
+====================
+- Maven 2.0.9 or higher
+
+
+Building the Project:
+=====================
+
+In the project's root directory, run:
+  mvn clean compile
+
+Flickr Client:
+1. Apply for an API key from Flickr: http://www.flickr.com/services/api/keys/apply 
+2. Run:
+     mvn exec:java -Dexec.mainClass="org.jboss.resteasy.examples.flickr.FlickrClient" -Dexec.args="<apiKey>"
+
+Twitter Client:
+- Run:
+    mvn exec:java -Dexec.mainClass="org.jboss.resteasy.examples.twitter.Twitter" -Dexec.args="<userId> <password>"

Added: projects/docs/enterprise/5.0/Examples/RESTEasy/async-job-service_README.txt
===================================================================
--- projects/docs/enterprise/5.0/Examples/RESTEasy/async-job-service_README.txt	                        (rev 0)
+++ projects/docs/enterprise/5.0/Examples/RESTEasy/async-job-service_README.txt	2009-07-21 23:30:23 UTC (rev 91528)
@@ -0,0 +1,17 @@
+README for the RESTEasy async-job-service example project:
+=========================================================
+
+This project is a simple example demostrating the use of the Asynchronous Job Service.
+
+
+System Requirements:
+====================
+- Maven 2.0.9 or higher
+
+
+Building the Project:
+=====================
+
+In the project's root directory, run:
+  mvn clean install
+This builds a WAR and runs it with embedded Jetty.

Added: projects/docs/enterprise/5.0/Examples/RESTEasy/ejb-integration_README.txt
===================================================================
--- projects/docs/enterprise/5.0/Examples/RESTEasy/ejb-integration_README.txt	                        (rev 0)
+++ projects/docs/enterprise/5.0/Examples/RESTEasy/ejb-integration_README.txt	2009-07-21 23:30:23 UTC (rev 91528)
@@ -0,0 +1,26 @@
+README for the RESTEasy ejb-integration example project:
+=========================================================
+
+This project is an example of using RESTEasy with:
+- Enterprise JavaBeans (EJBs)
+- Enterprise Archives (EARs)
+
+
+System Requirements:
+====================
+- Maven 2.0.9 or higher
+- JBoss 4.2.x or higher
+  You will need to modify the POM files to work with another
+  Java EE 5-compatible application server.
+
+
+Building the Project:
+=====================
+
+- Edit pom.xml (in the root directory).
+  Change the <jbossHome> property to match the location of your JBoss installation.
+
+- In the project's root directory, run:
+    mvn clean install
+  This builds an EJB, a WAR (for RESTEasy), and an EAR. The EAR module will deploy
+  the EAR file into JBoss and run the test suite provided in the EAR module.

Added: projects/docs/enterprise/5.0/Examples/RESTEasy/jaxb-json_README.txt
===================================================================
--- projects/docs/enterprise/5.0/Examples/RESTEasy/jaxb-json_README.txt	                        (rev 0)
+++ projects/docs/enterprise/5.0/Examples/RESTEasy/jaxb-json_README.txt	2009-07-21 23:30:23 UTC (rev 91528)
@@ -0,0 +1,46 @@
+README for the RESTEasy jaxb-json example project:
+=========================================================
+
+This project is an example of:
+- using JSON with RESTEasy
+- the JAXB/JSON Provider
+- using javax.ws.rs.core.Application
+- using the <context-param> resteasy.servlet.mapping.prefix
+- Jetty (embedded)
+
+
+System Requirements:
+====================
+- Maven 2.0.9 or higher
+
+
+Building the Project:
+=====================
+
+In the root directory, run:
+  mvn clean install
+
+
+Running the Project and Testing it Manually:
+============================================
+
+- mvn jetty6:run-exploded
+
+- Open a browser at the following URLs to test each listed object/function:
+
+  The HTML form that pulls JSON from a JAX-RS service.
+  The data includes JAXB-annotated classes marshalled to JSON using the
+  Jettison mapped format:
+    http://localhost:9095/mapped.html
+
+  The HTML form that pulls JSON from a JAX-RS service.
+  The data is JAXB annotated classes marshalled to JSON
+  using the Jettison Badger format:
+    http://localhost:9095/badger.html
+
+  To view the Mapped JSON format:
+    http://localhost:9095/resteasy/library/books/mapped.html
+
+  To view the Badger JSON format:
+    http://localhost:9095/resteasy/library/books/badger.html
+

Added: projects/docs/enterprise/5.0/Examples/RESTEasy/jms-facade_README.txt
===================================================================
--- projects/docs/enterprise/5.0/Examples/RESTEasy/jms-facade_README.txt	                        (rev 0)
+++ projects/docs/enterprise/5.0/Examples/RESTEasy/jms-facade_README.txt	2009-07-21 23:30:23 UTC (rev 91528)
@@ -0,0 +1,37 @@
+README for the RESTEasy jms-facade example project:
+===================================================
+
+This project is an example of using RESTEasy with:
+- Java Message Service (JMS)
+- sub-resource locators
+- custom assembly of root resources
+
+
+System Requirements:
+====================
+- Maven 2.0.9 or higher
+
+- JBoss 4.2.x or higher
+  You will need to modfy the POM files to work with another
+  Java EE 5-compatible application server.
+
+- JMS security must be disabled.
+  In the JBoss deploy directory, edit jms/jbossmq-service.xml.
+  Comment out the NextInterceptor attribute and replace it with
+  DestinationManager, like so:
+    <mbean code="org.jboss.mq.server.jmx.InterceptorLoader" name="jboss.mq:service=TracingInterceptor">
+      <attribute name="InterceptorClass">org.jboss.mq.server.TracingInterceptor</attribute>
+        <depends optional-attribute-name="NextInterceptor">jboss.mq:service=DestinationManager</depends>
+<!--    <depends optional-attribute-name="NextInterceptor">jboss.mq:service=SecurityManager</depends>  -->
+    </mbean>
+
+
+Building the Project:
+=====================
+
+- Edit pom.xml (in the root directory).
+  Change the <jbossHome> property to match the location of your JBoss installation.
+
+- In the root directory, run
+    mvn clean install
+  This will build a WAR for RESTEasy and run several unit tests.

Added: projects/docs/enterprise/5.0/Examples/RESTEasy/resteasy-springMVC_README.txt
===================================================================
--- projects/docs/enterprise/5.0/Examples/RESTEasy/resteasy-springMVC_README.txt	                        (rev 0)
+++ projects/docs/enterprise/5.0/Examples/RESTEasy/resteasy-springMVC_README.txt	2009-07-21 23:30:23 UTC (rev 91528)
@@ -0,0 +1,38 @@
+README for the RESTEasy resteasy-springMVC example project:
+=========================================================
+
+This project is an example of using RESTEasy with:
+- Spring
+- Jetty (embedded)
+
+
+System Requirements:
+====================
+- Maven 2.0.9 or higher
+
+
+07/07/08 Updated:
+=================
+
+- Added client module.
+  The client module shows an example that tests the service module-generated 
+  WAR with the same web container (Jetty6 in an embedded mode). The container is
+  injected in the junit 4 test. The client uses the RESTEasy Client Framework.
+
+
+Building the Project:
+=====================
+
+In the project's root directory, run:
+  mvn clean install
+
+
+Running the Project and Testing it Manually:
+============================================
+
+- mvn jetty:run
+
+- Open a browser at the following URL to test the function:
+
+  List all available contacts:
+  http://localhost:9095/contacts

Added: projects/docs/enterprise/5.0/Examples/RESTEasy/simple_README.txt
===================================================================
--- projects/docs/enterprise/5.0/Examples/RESTEasy/simple_README.txt	                        (rev 0)
+++ projects/docs/enterprise/5.0/Examples/RESTEasy/simple_README.txt	2009-07-21 23:30:23 UTC (rev 91528)
@@ -0,0 +1,24 @@
+README for the RESTEasy simple example project:
+=========================================================
+
+This project is a simple example showing the use of:
+- @Path
+- @GET
+- PUT
+- POST
+- @PathParam
+
+It also uses pure streaming output.
+
+
+System Requirements:
+====================
+- Maven 2.0.9 or higher
+
+
+Building the Project:
+=====================
+
+In the root directory, run:
+  mvn clean install
+This builds a WAR and runs it with embedded Jetty.

Added: projects/docs/enterprise/5.0/Examples/RESTEasy/spring-hibernate_README.txt
===================================================================
--- projects/docs/enterprise/5.0/Examples/RESTEasy/spring-hibernate_README.txt	                        (rev 0)
+++ projects/docs/enterprise/5.0/Examples/RESTEasy/spring-hibernate_README.txt	2009-07-21 23:30:23 UTC (rev 91528)
@@ -0,0 +1,90 @@
+README for the RESTEasy spring-hibernate example project:
+=========================================================
+
+This project is an example of using RESTEasy with:
+- Hibernate
+- Hibernate Annotations
+- Spring
+- Jetty (embedded)
+- In-memory HSQLDB 
+- MySQL as a possible replacement to HSQLDB
+
+
+System Requirements:
+====================
+- Maven 2.0.9 or higher
+
+
+07/07/08 Updated:
+=================
+
+- Added client module.
+  The client module shows an example that tests the service module-generated 
+  WAR with the same web container (Jetty6 in an embedded mode). The container is
+  injected in the junit 4 test. The client uses the RESTEasy Client Framework.
+
+
+Building the Project:
+=====================
+
+In the project's root directory, run:
+  mvn clean install
+
+
+Running the Project and Testing it Manually:
+============================================
+
+- cd services
+
+- mvn jetty6:run-exploded
+
+- Open a browser at the following URLs to test each function:
+
+  List all available contacts in database:
+  http://localhost:9095/services/contactservice/contacts
+
+  List a contact by Id (among the list of the previously returned list):
+  http://localhost:9095/services/contactservice/contacts/1
+    OR
+  http://localhost:9095/services/contactservice/contacts/2
+    OR
+  http://localhost:9095/services/contactservice/contacts/3
+
+  List the contacts of contacts:
+  http://localhost:9095/services/contactservice/contacts/1/contacts
+    OR
+  http://localhost:9095/services/contactservice/contacts/2/contacts
+    OR
+  http://localhost:9095/services/contactservice/contacts/3/contacts
+
+
+(Optional) Switch HSQLDB to MySQL:
+==================================
+
+MySQL must be installed and accessible.
+
+The Maven 2.x build process creates and initializes a new database instance.
+The following files MUST be changed prior to building the project, because
+permissions must be given for the database instance to work correctly.
+
+- persistence/src/main/sql/mysql/initialize.bat: 
+  Replace:  <MYSQL_USER>      with the MySQL user that has privileges to
+                              create a database
+            <MYSQL_PASSWORD>  with the user's associated password
+  The file contains the following lines:
+            mysql -u<MYSQL_USER> -p<MYSQL_PASSWORD> < dbschema.sql
+            mysql -u<MYSQL_USER> -p<MYSQL_PASSWORD> < data.sql
+
+- persistence/src/main/resources/db.properties
+  Replace:  <MYSQL_USER>      with the MySQL user that has privileges to
+                              create a database
+            <MYSQL_PASSWORD>  with the user's associated password
+            The database URL, if the MySQL instance has been configured on a
+            different machine.
+  The file contains the following lines:
+            mzt.db.username=<MYSQL_USER>
+            mzt.db.password=<MYSQL_PASSWORD>
+            mzt.db.driver=com.mysql.jdbc.Driver
+            mzt.db.url=jdbc:mysql://localhost/contact?useUnicode=true&characterEncoding=UTF-8
+
+




More information about the jboss-cvs-commits mailing list