Permalink
Browse files

1st commit of kichensink

  • Loading branch information...
0 parents commit 4f19cb38eda84e7f050cd5d71565dda0aaf710b5 @dblado dblado committed Mar 2, 2012
Showing with 1,463 additions and 0 deletions.
  1. +5 −0 .openshift/action_hooks/build
  2. +5 −0 .openshift/action_hooks/deploy
  3. +4 −0 .openshift/action_hooks/post_deploy
  4. +5 −0 .openshift/action_hooks/pre_build
  5. +3 −0 .openshift/config/modules/README
  6. +282 −0 .openshift/config/standalone.xml
  7. +22 −0 .openshift/cron/README.cron
  8. 0 .openshift/cron/daily/.gitignore
  9. 0 .openshift/cron/hourly/.gitignore
  10. 0 .openshift/cron/minutely/.gitignore
  11. 0 .openshift/cron/monthly/.gitignore
  12. +16 −0 .openshift/cron/weekly/README
  13. +1 −0 .openshift/cron/weekly/chrono.dat
  14. +3 −0 .openshift/cron/weekly/chronograph
  15. +12 −0 .openshift/cron/weekly/jobs.allow
  16. +7 −0 .openshift/cron/weekly/jobs.deny
  17. +15 −0 .openshift/markers/README
  18. +146 −0 README
  19. 0 deployments/.gitkeep
  20. +258 −0 pom.xml
  21. +59 −0 src/main/java/org/jboss/as/quickstarts/kitchensink/controller/MemberRegistration.java
  22. +48 −0 src/main/java/org/jboss/as/quickstarts/kitchensink/data/MemberListProducer.java
  23. +78 −0 src/main/java/org/jboss/as/quickstarts/kitchensink/model/Member.java
  24. +18 −0 src/main/java/org/jboss/as/quickstarts/kitchensink/rest/JaxRsActivator.java
  25. +46 −0 src/main/java/org/jboss/as/quickstarts/kitchensink/rest/MemberResourceRESTService.java
  26. +41 −0 src/main/java/org/jboss/as/quickstarts/kitchensink/util/Resources.java
  27. +19 −0 src/main/resources/META-INF/persistence.xml
  28. +2 −0 src/main/resources/import.sql
  29. +9 −0 src/main/webapp/WEB-INF/beans.xml
  30. +14 −0 src/main/webapp/WEB-INF/faces-config.xml
  31. +21 −0 src/main/webapp/WEB-INF/kitchensink-quickstart-ds.xml
  32. +84 −0 src/main/webapp/WEB-INF/templates/default.xhtml
  33. +7 −0 src/main/webapp/index.html
  34. +67 −0 src/main/webapp/index.xhtml
  35. +52 −0 src/main/webapp/resources/css/screen.css
  36. BIN src/main/webapp/resources/gfx/banner.png
  37. BIN src/main/webapp/resources/gfx/logo.png
  38. +50 −0 src/test/java/org/jboss/as/quickstarts/kitchensink/test/MemberRegistrationTest.java
  39. +20 −0 src/test/resources/META-INF/test-persistence.xml
  40. +23 −0 src/test/resources/arquillian.xml
  41. +21 −0 src/test/resources/test-ds.xml
@@ -0,0 +1,5 @@
+#!/bin/bash
+# This is a simple build script and will be executed on your CI system if
+# available. Otherwise it will execute while your application is stopped
+# before the deploy step. This script gets executed directly, so it
+# could be python, php, ruby, etc.
@@ -0,0 +1,5 @@
+#!/bin/bash
+# This deploy hook gets executed after dependencies are resolved and the
+# build hook has been run but before the application has been started back
+# up again. This script gets executed directly, so it could be python, php,
+# ruby, etc.
@@ -0,0 +1,4 @@
+#!/bin/bash
+# This is a simple post deploy hook executed after your application
+# is deployed and started. This script gets executed directly, so
+# it could be python, php, ruby, etc.
@@ -0,0 +1,5 @@
+#!/bin/bash
+# This is a simple script and will be executed on your CI system if
+# available. Otherwise it will execute while your application is stopped
+# before the build step. This script gets executed directly, so it
+# could be python, php, ruby, etc.
@@ -0,0 +1,3 @@
+Place your jboss-as7 modules in this directory. This directory is added to the
+module path of the jboss-as7 server associated with your application. It has the
+same structure as the jboss-as7/modules directory.
@@ -0,0 +1,282 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<server xmlns="urn:jboss:domain:1.1">
+
+ <extensions>
+ <extension module="org.jboss.as.clustering.infinispan"/>
+ <extension module="org.jboss.as.connector"/>
+ <extension module="org.jboss.as.deployment-scanner"/>
+ <extension module="org.jboss.as.ee"/>
+ <extension module="org.jboss.as.ejb3"/>
+ <extension module="org.jboss.as.jaxrs"/>
+ <extension module="org.jboss.as.jdr"/>
+ <extension module="org.jboss.as.jmx"/>
+ <extension module="org.jboss.as.jpa"/>
+ <extension module="org.jboss.as.logging"/>
+ <extension module="org.jboss.as.mail"/>
+ <extension module="org.jboss.as.naming"/>
+ <extension module="org.jboss.as.pojo"/>
+ <!--extension module="org.jboss.as.remoting"/-->
+ <extension module="org.jboss.as.sar"/>
+ <extension module="org.jboss.as.security"/>
+ <extension module="org.jboss.as.threads"/>
+ <extension module="org.jboss.as.transactions"/>
+ <extension module="org.jboss.as.web"/>
+ <extension module="org.jboss.as.weld"/>
+ </extensions>
+
+ <!--management>
+ <security-realms>
+ <security-realm name="ManagementRealm">
+ <authentication>
+ <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>
+ </authentication>
+ </security-realm>
+ <security-realm name="ApplicationRealm">
+ <authentication>
+ <properties path="application-users.properties" relative-to="jboss.server.config.dir"/>
+ </authentication>
+ </security-realm>
+ </security-realms>
+ <management-interfaces>
+ <native-interface security-realm="ManagementRealm">
+ <socket-binding native="management-native"/>
+ </native-interface>
+ <http-interface security-realm="ManagementRealm">
+ <socket-binding http="management-http"/>
+ </http-interface>
+ </management-interfaces>
+ </management-->
+
+ <profile>
+ <subsystem xmlns="urn:jboss:domain:logging:1.1">
+ <!--console-handler name="CONSOLE">
+ <level name="INFO"/>
+ <formatter>
+ <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
+ </formatter>
+ </console-handler-->
+ <periodic-rotating-file-handler name="FILE">
+ <formatter>
+ <pattern-formatter pattern="%d{yyyy/MM/dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
+ </formatter>
+ <file relative-to="jboss.server.log.dir" path="server.log"/>
+ <suffix value=".yyyy-MM-dd"/>
+ <append value="true"/>
+ </periodic-rotating-file-handler>
+ <logger category="com.arjuna">
+ <level name="WARN"/>
+ </logger>
+ <logger category="org.apache.tomcat.util.modeler">
+ <level name="WARN"/>
+ </logger>
+ <logger category="sun.rmi">
+ <level name="WARN"/>
+ </logger>
+ <logger category="jacorb">
+ <level name="WARN"/>
+ </logger>
+ <logger category="jacorb.config">
+ <level name="ERROR"/>
+ </logger>
+ <root-logger>
+ <level name="INFO"/>
+ <handlers>
+ <!--handler name="CONSOLE"/-->
+ <handler name="FILE"/>
+ </handlers>
+ </root-logger>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:datasources:1.0">
+ <datasources>
+ <datasource jndi-name="java:jboss/datasources/ExampleDS" enabled="true" use-java-context="true" pool-name="H2DS">
+ <connection-url>jdbc:h2:${jboss.server.data.dir}/test;DB_CLOSE_DELAY=-1</connection-url>
+ <driver>h2</driver>
+ <security>
+ <user-name>sa</user-name>
+ <password>sa</password>
+ </security>
+ </datasource>
+ <datasource jndi-name="java:jboss/datasources/MysqlDS" enabled="${mysql.enabled}" use-java-context="true" pool-name="MysqlDS">
+ <connection-url>jdbc:mysql://${env.OPENSHIFT_DB_HOST}:${env.OPENSHIFT_DB_PORT}/${env.OPENSHIFT_APP_NAME}</connection-url>
+ <driver>mysql</driver>
+ <security>
+ <user-name>${env.OPENSHIFT_DB_USERNAME}</user-name>
+ <password>${env.OPENSHIFT_DB_PASSWORD}</password>
+ </security>
+ </datasource>
+ <datasource jndi-name="java:jboss/datasources/PostgreSQLDS" enabled="${postgresql.enabled}" use-java-context="true" pool-name="PostgreSQLDS" use-ccm="true">
+ <connection-url>jdbc:postgresql://${env.OPENSHIFT_DB_HOST}:${env.OPENSHIFT_DB_PORT}/${env.OPENSHIFT_APP_NAME}</connection-url>
+ <driver>postgresql</driver>
+ <security>
+ <user-name>${env.OPENSHIFT_DB_USERNAME}</user-name>
+ <password>${env.OPENSHIFT_DB_PASSWORD}</password>
+ </security>
+ </datasource>
+ <drivers>
+ <driver name="h2" module="com.h2database.h2">
+ <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
+ </driver>
+ <driver name="mysql" module="com.mysql.jdbc">
+ <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
+ </driver>
+ <driver name="postgresql" module="org.postgresql.jdbc">
+ <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
+ </driver>
+ </drivers>
+ </datasources>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">
+ <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000"/>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:ee:1.0"/>
+ <subsystem xmlns="urn:jboss:domain:ejb3:1.2">
+ <session-bean>
+ <stateless>
+ <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>
+ </stateless>
+ <stateful default-access-timeout="5000" cache-ref="simple"/>
+ <singleton default-access-timeout="5000"/>
+ </session-bean>
+ <mdb>
+ <resource-adapter-ref resource-adapter-name="hornetq-ra"/>
+ <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
+ </mdb>
+ <pools>
+ <bean-instance-pools>
+ <strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
+ <strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>
+ </bean-instance-pools>
+ </pools>
+ <caches>
+ <cache name="simple" aliases="NoPassivationCache"/>
+ <cache name="passivating" passivation-store-ref="file" aliases="SimpleStatefulCache"/>
+ </caches>
+ <passivation-stores>
+ <file-passivation-store name="file"/>
+ </passivation-stores>
+ <async thread-pool-name="default"/>
+ <timer-service thread-pool-name="default">
+ <data-store path="timer-service-data" relative-to="jboss.server.data.dir"/>
+ </timer-service>
+ <!--remote connector-ref="remoting-connector" thread-pool-name="default"/-->
+ <thread-pools>
+ <thread-pool name="default">
+ <max-threads count="10"/>
+ <keepalive-time time="100" unit="milliseconds"/>
+ </thread-pool>
+ </thread-pools>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:infinispan:1.1" default-cache-container="hibernate">
+ <cache-container name="hibernate" default-cache="local-query">
+ <local-cache name="entity">
+ <transaction mode="NON_XA"/>
+ <eviction strategy="LRU" max-entries="10000"/>
+ <expiration max-idle="100000"/>
+ </local-cache>
+ <local-cache name="local-query">
+ <transaction mode="NONE"/>
+ <eviction strategy="LRU" max-entries="10000"/>
+ <expiration max-idle="100000"/>
+ </local-cache>
+ <local-cache name="timestamps">
+ <transaction mode="NONE"/>
+ <eviction strategy="NONE"/>
+ </local-cache>
+ </cache-container>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>
+ <subsystem xmlns="urn:jboss:domain:jca:1.1">
+ <archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/>
+ <bean-validation enabled="false"/>
+ <default-workmanager>
+ <short-running-threads>
+ <core-threads count="10"/>
+ <queue-length count="10" />
+ <max-threads count="10" />
+ <keepalive-time time="10" unit="seconds"/>
+ </short-running-threads>
+ <long-running-threads>
+ <core-threads count="10"/>
+ <queue-length count="10" />
+ <max-threads count="10" />
+ <keepalive-time time="10" unit="seconds"/>
+ </long-running-threads>
+ </default-workmanager>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:jdr:1.0"/>
+ <subsystem xmlns="urn:jboss:domain:jpa:1.0">
+ <jpa default-datasource=""/>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:mail:1.0">
+ <mail-session jndi-name="java:jboss/mail/Default">
+ <smtp-server outbound-socket-binding-ref="mail-smtp"/>
+ </mail-session>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:naming:1.1"/>
+ <subsystem xmlns="urn:jboss:domain:pojo:1.0"/>
+ <!--subsystem xmlns="urn:jboss:domain:remoting:1.1">
+ <connector name="remoting-connector" socket-binding="remoting" security-realm="ApplicationRealm"/>
+ </subsystem-->
+ <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0"/>
+ <subsystem xmlns="urn:jboss:domain:sar:1.0"/>
+ <subsystem xmlns="urn:jboss:domain:security:1.1">
+ <security-domains>
+ <security-domain name="other" cache-type="default">
+ <authentication>
+ <login-module code="UsersRoles" flag="required"/>
+ </authentication>
+ </security-domain>
+ <security-domain name="jboss-web-policy" cache-type="default">
+ <authorization>
+ <policy-module code="Delegating" flag="required"/>
+ </authorization>
+ </security-domain>
+ <security-domain name="jboss-ejb-policy" cache-type="default">
+ <authorization>
+ <policy-module code="Delegating" flag="required"/>
+ </authorization>
+ </security-domain>
+ </security-domains>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:threads:1.1"/>
+ <subsystem xmlns="urn:jboss:domain:transactions:1.1">
+ <core-environment>
+ <process-id>
+ <uuid/>
+ </process-id>
+ </core-environment>
+ <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
+ <coordinator-environment default-timeout="300"/>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">
+ <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
+ <virtual-server name="default-host" enable-welcome-root="false">
+ <alias name="localhost"/>
+ </virtual-server>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:weld:1.0"/>
+ </profile>
+
+ <interfaces>
+ <interface name="management">
+ <loopback-address value="${env.OPENSHIFT_INTERNAL_IP}"/>
+ </interface>
+ <interface name="public">
+ <loopback-address value="${env.OPENSHIFT_INTERNAL_IP}"/>
+ </interface>
+ </interfaces>
+
+ <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
+ <socket-binding name="http" port="8080"/>
+ <socket-binding name="https" port="8443"/>
+ <!--socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>
+ <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
+ <socket-binding name="remoting" port="4447"/-->
+ <socket-binding name="txn-recovery-environment" port="4712"/>
+ <socket-binding name="txn-status-manager" port="4713"/>
+ <outbound-socket-binding name="mail-smtp">
+ <remote-destination host="localhost" port="25"/>
+ </outbound-socket-binding>
+ </socket-binding-group>
+</server>
@@ -0,0 +1,22 @@
+Run scripts or jobs on a periodic basis
+=======================================
+Any scripts or jobs added to the minutely, hourly, daily, weekly or monthly
+directories will be run on a scheduled basis (frequency is as indicated by the
+name of the directory) using run-parts.
+
+run-parts ignores any files that are hidden or dotfiles (.*) or backup
+files (*~ or *,) or named *.{rpmsave,rpmorig,rpmnew,swp,cfsaved}
+
+The presence of two specially named files jobs.deny and jobs.allow controls
+how run-parts executes your scripts/jobs.
+ jobs.deny ===> Prevents specific scripts or jobs from being executed.
+ jobs.allow ===> Only execute the named scripts or jobs (all other/non-named
+ scripts that exist in this directory are ignored).
+
+The principles of jobs.deny and jobs.allow are the same as those of cron.deny
+and cron.allow and are described in detail at:
+ http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/ch-Automating_System_Tasks.html#s2-autotasks-cron-access
+
+See: man crontab or above link for more details and see the the weekly/
+ directory for an example.
+
No changes.
No changes.
No changes.
No changes.
@@ -0,0 +1,16 @@
+Run scripts or jobs on a weekly basis
+=====================================
+Any scripts or jobs added to this directory will be run on a scheduled basis
+(weekly) using run-parts.
+
+run-parts ignores any files that are hidden or dotfiles (.*) or backup
+files (*~ or *,) or named *.{rpmsave,rpmorig,rpmnew,swp,cfsaved} and handles
+the files named jobs.deny and jobs.allow specially.
+
+In this specific example, the chronograph script is the only script or job file
+executed on a weekly basis (due to white-listing it in jobs.allow). And the
+README and chrono.dat file are ignored either as a result of being black-listed
+in jobs.deny or because they are NOT white-listed in the jobs.allow file.
+
+For more details, please see ../README.cron file.
+
@@ -0,0 +1 @@
+Time And Relative D...n In Execution (Open)Shift!
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+echo "`date`: `cat $(dirname \"$0\")/chrono.dat`"
@@ -0,0 +1,12 @@
+#
+# Script or job files listed in here (one entry per line) will be
+# executed on a weekly-basis.
+#
+# Example: The chronograph script will be executed weekly but the README
+# and chrono.dat files in this directory will be ignored.
+#
+# The README file is actually ignored due to the entry in the
+# jobs.deny which is checked before jobs.allow (this file).
+#
+chronograph
+
@@ -0,0 +1,7 @@
+#
+# Any script or job files listed in here (one entry per line) will NOT be
+# executed (read as ignored by run-parts).
+#
+
+README
+
@@ -0,0 +1,15 @@
+Markers
+===========
+
+Adding marker files to this directory will have the following effects:
+
+enable_jpda - Will enable the JPDA socket based transport on the java virtual
+ machine running the JBoss AS 7 application server. This enables
+ you to remotely debug code running inside the JBoss AS 7
+ application server.
+
+skip_maven_build - Maven build step will be skipped
+
+force_clean_build - Will start the build process by removing all non
+essential Maven dependencies. Any current dependencies specified in
+your pom.xml file will then be re-downloaded.
Oops, something went wrong.

0 comments on commit 4f19cb3

Please sign in to comment.