Permalink
Browse files

Pushed JDG quickstarts

  • Loading branch information...
rafabene committed Jan 25, 2013
1 parent 0785249 commit 6d79919b955dd2d67223b207749655bfc7a2a538
Showing with 9,242 additions and 1 deletion.
  1. +0 −1 a
  2. +89 −0 carmart-tx/README-tomcat.md
  3. +90 −0 carmart-tx/README.md
  4. +299 −0 carmart-tx/pom.xml
  5. +146 −0 carmart-tx/src/jbossas/java/org/jboss/as/quickstarts/datagrid/carmart/jsf/PopulateCache.java
  6. +220 −0 carmart-tx/src/jbossas/java/org/jboss/as/quickstarts/datagrid/carmart/session/CarManager.java
  7. +85 −0 ...jbossas/java/org/jboss/as/quickstarts/datagrid/carmart/session/JBossASCacheContainerProvider.java
  8. +110 −0 carmart-tx/src/main/java/org/jboss/as/quickstarts/datagrid/carmart/model/Car.java
  9. +37 −0 ...rt-tx/src/main/java/org/jboss/as/quickstarts/datagrid/carmart/session/CacheContainerProvider.java
  10. +42 −0 carmart-tx/src/main/java/org/jboss/as/quickstarts/datagrid/carmart/session/CarTypeManager.java
  11. +42 −0 carmart-tx/src/main/java/org/jboss/as/quickstarts/datagrid/carmart/session/CountryManager.java
  12. +72 −0 ...t-tx/src/main/java/org/jboss/as/quickstarts/datagrid/carmart/session/LocalStatisticsProvider.java
  13. +47 −0 carmart-tx/src/main/java/org/jboss/as/quickstarts/datagrid/carmart/session/StatisticsProvider.java
  14. +8 −0 carmart-tx/src/main/webapp-tomcat7/META-INF/context.xml
  15. +41 −0 carmart-tx/src/main/webapp-tomcat7/WEB-INF/web.xml
  16. +9 −0 carmart-tx/src/main/webapp/WEB-INF/beans.xml
  17. +40 −0 carmart-tx/src/main/webapp/WEB-INF/faces-config.xml
  18. +42 −0 carmart-tx/src/main/webapp/addcar.xhtml
  19. +23 −0 carmart-tx/src/main/webapp/details.xhtml
  20. +26 −0 carmart-tx/src/main/webapp/home.xhtml
  21. +5 −0 carmart-tx/src/main/webapp/index.html
  22. +108 −0 carmart-tx/src/main/webapp/resources/css/style.css
  23. BIN carmart-tx/src/main/webapp/resources/gfx/divider.png
  24. +51 −0 carmart-tx/src/main/webapp/template.xhtml
  25. +136 −0 carmart-tx/src/tomcat/java/org/jboss/as/quickstarts/datagrid/carmart/jsf/PopulateCache.java
  26. +226 −0 carmart-tx/src/tomcat/java/org/jboss/as/quickstarts/datagrid/carmart/session/CarManager.java
  27. +85 −0 ...c/tomcat/java/org/jboss/as/quickstarts/datagrid/carmart/session/TomcatCacheContainerProvider.java
  28. +86 −0 carmart/README-tomcat.md
  29. +127 −0 carmart/README.md
  30. +330 −0 carmart/pom.xml
  31. +78 −0 ...src/local/java/org/jboss/as/quickstarts/datagrid/carmart/session/LocalCacheContainerProvider.java
  32. +72 −0 ...art/src/local/java/org/jboss/as/quickstarts/datagrid/carmart/session/LocalStatisticsProvider.java
  33. +127 −0 carmart/src/main/java/org/jboss/as/quickstarts/datagrid/carmart/jsf/PopulateCache.java
  34. +110 −0 carmart/src/main/java/org/jboss/as/quickstarts/datagrid/carmart/model/Car.java
  35. +55 −0 carmart/src/main/java/org/jboss/as/quickstarts/datagrid/carmart/session/CacheContainerProvider.java
  36. +128 −0 carmart/src/main/java/org/jboss/as/quickstarts/datagrid/carmart/session/CarManager.java
  37. +42 −0 carmart/src/main/java/org/jboss/as/quickstarts/datagrid/carmart/session/CarTypeManager.java
  38. +42 −0 carmart/src/main/java/org/jboss/as/quickstarts/datagrid/carmart/session/CountryManager.java
  39. +47 −0 carmart/src/main/java/org/jboss/as/quickstarts/datagrid/carmart/session/StatisticsProvider.java
  40. +6 −0 carmart/src/main/resources/META-INF/datagrid.properties
  41. +8 −0 carmart/src/main/webapp-tomcat7/META-INF/context.xml
  42. +41 −0 carmart/src/main/webapp-tomcat7/WEB-INF/web.xml
  43. +9 −0 carmart/src/main/webapp/WEB-INF/beans.xml
  44. +40 −0 carmart/src/main/webapp/WEB-INF/faces-config.xml
  45. +41 −0 carmart/src/main/webapp/addcar.xhtml
  46. +23 −0 carmart/src/main/webapp/details.xhtml
  47. +26 −0 carmart/src/main/webapp/home.xhtml
  48. +5 −0 carmart/src/main/webapp/index.html
  49. +108 −0 carmart/src/main/webapp/resources/css/style.css
  50. BIN carmart/src/main/webapp/resources/gfx/divider.png
  51. +51 −0 carmart/src/main/webapp/template.xhtml
  52. +61 −0 ...c/remote/java/org/jboss/as/quickstarts/datagrid/carmart/session/RemoteCacheContainerProvider.java
  53. +76 −0 ...t/src/remote/java/org/jboss/as/quickstarts/datagrid/carmart/session/RemoteStatisticsProvider.java
  54. +133 −0 helloworld-jdg/README.md
  55. +141 −0 helloworld-jdg/pom.xml
  56. +95 −0 helloworld-jdg/src/main/java/org/jboss/as/quickstarts/datagrid/GetController.java
  57. +81 −0 helloworld-jdg/src/main/java/org/jboss/as/quickstarts/datagrid/MyCacheManagerProvider.java
  58. +84 −0 helloworld-jdg/src/main/java/org/jboss/as/quickstarts/datagrid/PutController.java
  59. +52 −0 helloworld-jdg/src/main/java/org/jboss/as/quickstarts/datagrid/Resources.java
  60. +73 −0 helloworld-jdg/src/main/java/org/jboss/as/quickstarts/datagrid/TestServletGet.java
  61. +71 −0 helloworld-jdg/src/main/java/org/jboss/as/quickstarts/datagrid/TestServletPut.java
  62. +77 −0 helloworld-jdg/src/main/resources/jgroups-udp.xml
  63. +17 −0 helloworld-jdg/src/main/webapp/WEB-INF/beans.xml
  64. +17 −0 helloworld-jdg/src/main/webapp/WEB-INF/faces-config.xml
  65. +23 −0 helloworld-jdg/src/main/webapp/WEB-INF/web.xml
  66. +31 −0 helloworld-jdg/src/main/webapp/get.xhtml
  67. +23 −0 helloworld-jdg/src/main/webapp/index.html
  68. +31 −0 helloworld-jdg/src/main/webapp/put.xhtml
  69. +31 −0 helloworld-jdg/src/main/webapp/template.xhtml
  70. +165 −0 hotrod-endpoint/README.md
  71. +142 −0 hotrod-endpoint/pom.xml
  72. +160 −0 hotrod-endpoint/src/main/java/org/jboss/as/quickstarts/datagrid/hotrod/FootballManager.java
  73. +65 −0 hotrod-endpoint/src/main/java/org/jboss/as/quickstarts/datagrid/hotrod/Team.java
  74. +2 −0 hotrod-endpoint/src/main/resources/jdg.properties
  75. +166 −0 memcached-endpoint/README.md
  76. +119 −0 memcached-endpoint/pom.xml
  77. +1,255 −0 memcached-endpoint/src/main/java/org/jboss/as/quickstarts/datagrid/memcached/Base64.java
  78. +171 −0 memcached-endpoint/src/main/java/org/jboss/as/quickstarts/datagrid/memcached/FootballManager.java
  79. +164 −0 memcached-endpoint/src/main/java/org/jboss/as/quickstarts/datagrid/memcached/MemcachedCache.java
  80. +65 −0 memcached-endpoint/src/main/java/org/jboss/as/quickstarts/datagrid/memcached/Team.java
  81. +2 −0 memcached-endpoint/src/main/resources/jdg.properties
  82. +173 −0 rest-endpoint/README.md
  83. +103 −0 rest-endpoint/pom.xml
  84. +1,255 −0 rest-endpoint/src/main/java/org/jboss/as/quickstarts/datagrid/rest/Base64.java
  85. +177 −0 rest-endpoint/src/main/java/org/jboss/as/quickstarts/datagrid/rest/FootballManager.java
  86. +192 −0 rest-endpoint/src/main/java/org/jboss/as/quickstarts/datagrid/rest/RestCache.java
  87. +65 −0 rest-endpoint/src/main/java/org/jboss/as/quickstarts/datagrid/rest/Team.java
  88. +3 −0 rest-endpoint/src/main/resources/jdg.properties
View
1 a
@@ -1 +0,0 @@
-a
@@ -0,0 +1,89 @@
+carmart-tx: Basic Infinispan example with transactions
+=================================================================
+Author: Tristan Tarrant, Martin Gencur
+Level: Intermediate
+Technologies: Infinispan, CDI, Transactions
+Summary: Shows how to use Infinispan instead of a relational database with transactions enabled.
+
+What is it?
+-----------
+
+Transactional CarMart is a simple web application that uses Infinispan instead of a relational database.
+
+Users can list cars, add new cars or remove them from the CarMart. Information about each car is stored in a cache. The application also shows cache statistics like stores, hits, retrievals, etc.
+
+The Transactional CarMart quickstart works in a library mode. All libraries (jar files) are bundled with the application and deployed to the server. Caches are configured programatically and run in the same JVM as the web application.
+
+All operations are done in a transactional context. In order to run the application in JBoss Enterprise Web Server 2 or Tomcat 7, the standalone transaction manager from JBoss Transactions is used. _NOTE: Using the JBoss Transactions on Tomcat is an unsupported use case_
+
+When running this quickstart on JBoss Enterprise Web Server 2 or Tomcat 7, you must use only the "library-tomcat" maven profile. This profile only enables "library" mode.
+
+
+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 Tomcat.
+
+
+Configure JBoss Enterprise Web Server 2 or Tomcat 7
+---------------------------------------------------
+
+Before starting EWS/Tomcat, add the following lines to `conf/tomcat-users.xml` to allow the Maven Tomcat plugin to access the manager application:
+
+ <role rolename="manager-script"/>
+ <user username="admin" password="SOMEPASSWD" roles="manager-script"/>
+
+Configure Maven
+---------------
+
+If you have not yet done so, you must [Configure Maven](../README.md#configure-maven-) before testing the quickstarts.
+
+
+Add a `<server>` element into your Maven settings.xml with `<id>` equal to tomcat and correct credentials:
+
+ <server>
+ <id>tomcat</id>
+ <username>admin</username>
+ <password>SOMEPASSWD</password>
+ </server>
+
+
+Start JBoss Enterprise Web Server 2 or Tomcat 7
+-----------------------------------------------
+
+1. Open a command line and navigate to the root of the EWS/Tomcat server directory.
+2. The following shows the command line to start the server with the web profile:
+
+ For Linux: TOMCAT_HOME/bin/catalina.sh run
+ For Windows: TOMCAT_HOME\bin\catalina.bat run
+
+
+Build and Deploy the Application in Library Mode
+------------------------------------------------
+
+1. Make sure you have started EWS/Tomcat as described above.
+2. Open a command line and navigate to the root directory of this quickstart.
+3. Type this command to build and deploy the archive:
+
+ mvn -Plibrary-tomcat clean package tomcat:deploy
+
+4. This will deploy `target/jboss-as-carmart-tx.war` to the running instance of Tomcat/EWS.
+
+
+Access the application
+---------------------
+
+The application will be running at the following URL: <http://localhost:8080/jboss-as-carmart-tx/>
+
+
+Undeploy the Archive
+--------------------
+
+1. Make sure you have started EWS/Tomcat as described above.
+2. Open a command line and navigate to the root directory of this quickstart.
+3. When you are finished testing, type this command to undeploy the archive:
+
+ `mvn -Plibrary-tomcat tomcat:undeploy `
+
View
@@ -0,0 +1,90 @@
+carmart-tx: Basic Infinispan example with transactions
+=================================================================
+Author: Tristan Tarrant, Martin Gencur
+Level: Intermediate
+Technologies: Infinispan, CDI, Transactions
+Summary: Shows how to use Infinispan instead of a relational database with transactions enabled.
+Target Product: JDG
+
+What is it?
+-----------
+
+Transactional CarMart is a simple web application that uses Infinispan instead of a relational database.
+
+Users can list cars, add new cars or remove them from the CarMart. Information about each car is stored in a cache. The application also shows cache statistics like stores, hits, retrievals, etc.
+
+The Transactional CarMart quickstart works only in a library mode", so the application has a slightly different architecture". All libraries (jar files) are bundled with the application and deployed to the server. Caches are configured programmatically and run in the same JVM as the web application.
+
+All operations are done in a transactional context that is configured at JBossASCacheContainerProvider/TomcatCacheContainerProvider impl classes for CacheContainerProvider interface.
+
+Infinispan ships with several transaction manager lookup classes:
+
+- **DummyTransactionManagerLookup** : This provides with a dummy transaction manager which should only be used for testing. Being a dummy, this is not recommended for production use a it has some severe limitations to do with concurrent transactions and recovery.
+- **JBossStandaloneJTAManagerLookup** : If you're running Infinispan in a standalone environment, this should be your default choice for transaction manager. It's a fully fledged transaction manager based on JBoss Transactions which overcomes all the deficiencies of the dummy transaction manager.
+- **GenericTransactionManagerLookup** : This is a lookup class that locate transaction managers in the most popular Java EE application servers _(JBoss, JRun4, Resin, Orion, JOnAS, BEA Weblogic, Websphere, Glassfish)_. If no transaction manager can be found, it defaults on the dummy transaction manager.
+- **JBossTransactionManagerLookup** : This lookup class locates the transaction manager running within a JBoss Application Server instance.
+
+
+
+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 or JBoss AS 7.
+
+
+Configure Maven
+---------------
+
+If you have not yet done so, you must [Configure Maven](../README.md#configure-maven-) before testing the quickstarts.
+
+
+Start JBoss Enterprise Application Platform 6 or JBoss AS 7
+-----------------------------------------------------------
+
+1. Open a command line and navigate to the root of the JBoss server directory.
+2. The following shows the command line to start the server with the web profile:
+
+ For Linux: JBOSS_HOME/bin/standalone.sh
+ For Windows: JBOSS_HOME\bin\standalone.bat
+
+
+Build and Deploy the Application in Library Mode
+------------------------------------------------
+
+_NOTE: The following build command assumes you have configured your Maven user settings. If you have not, you must include Maven setting arguments on the command line. See [Build and Deploy the Quickstarts](../README.md#buildanddeploy) for complete instructions and additional options._
+
+1. Make sure you have started the JBoss Server as described above.
+2. Open a command line and navigate to the root directory of this quickstart.
+3. Type this command to build and deploy the archive:
+
+ mvn clean package jboss-as:deploy
+
+4. This will deploy `target/jboss-as-carmart-tx.war` to the running instance of the server.
+
+
+Access the application
+---------------------
+
+Access the running application in a browser at the following URL: <http://localhost:8080/jboss-as-carmart-tx/>
+
+
+Undeploy the Archive
+--------------------
+
+1. Make sure you have started the JBoss Server as described above.
+2. Open a command line and navigate to the root directory of this quickstart.
+3. When you are finished testing, type this command to undeploy the archive:
+
+ mvn jboss-as:undeploy
+
+
+Debug the Application
+------------------------------------
+
+If you want to debug the source code or look at the Javadocs of any library in the project, run either of the following commands to pull them into your local repository. The IDE should then detect them.
+
+ mvn dependency:sources
+ mvn dependency:resolve -Dclassifier=javadoc
+
Oops, something went wrong.

0 comments on commit 6d79919

Please sign in to comment.