Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Creating template

  • Loading branch information...
commit c1446b88f05ca5ded04562b56f6de3be677ef84a 0 parents
root authored
Showing with 1,374 additions and 0 deletions.
  1. +1 −0  .gitignore
  2. +5 −0 .openshift/action_hooks/build
  3. +5 −0 .openshift/action_hooks/deploy
  4. +4 −0 .openshift/action_hooks/post_deploy
  5. +14 −0 .openshift/action_hooks/post_start_jbossas-7
  6. +14 −0 .openshift/action_hooks/post_stop_jbossas-7
  7. +5 −0 .openshift/action_hooks/pre_build
  8. +14 −0 .openshift/action_hooks/pre_start_jbossas-7
  9. +14 −0 .openshift/action_hooks/pre_stop_jbossas-7
  10. +3 −0  .openshift/config/modules/README
  11. +529 −0 .openshift/config/standalone.xml
  12. +22 −0 .openshift/cron/README.cron
  13. 0  .openshift/cron/daily/.gitignore
  14. 0  .openshift/cron/hourly/.gitignore
  15. 0  .openshift/cron/minutely/.gitignore
  16. 0  .openshift/cron/monthly/.gitignore
  17. +16 −0 .openshift/cron/weekly/README
  18. +1 −0  .openshift/cron/weekly/chrono.dat
  19. +3 −0  .openshift/cron/weekly/chronograph
  20. +12 −0 .openshift/cron/weekly/jobs.allow
  21. +7 −0 .openshift/cron/weekly/jobs.deny
  22. +22 −0 .openshift/markers/README
  23. 0  .openshift/markers/java7
  24. +153 −0 README
  25. 0  deployments/.gitkeep
  26. +45 −0 pom.xml
  27. 0  src/main/java/.gitkeep
  28. 0  src/main/resources/.gitkeep
  29. +19 −0 src/main/webapp/WEB-INF/web.xml
  30. +1 −0  src/main/webapp/health.jsp
  31. BIN  src/main/webapp/images/jbosscorp_logo.png
  32. +182 −0 src/main/webapp/index.html
  33. +283 −0 src/main/webapp/snoop.jsp
1  .gitignore
@@ -0,0 +1 @@
+target
5 .openshift/action_hooks/build
@@ -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.
5 .openshift/action_hooks/deploy
@@ -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.
4 .openshift/action_hooks/post_deploy
@@ -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.
14 .openshift/action_hooks/post_start_jbossas-7
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+# The pre_start_cartridge and pre_stop_cartridge hooks are *SOURCED*
+# immediately before (re)starting or stopping the specified cartridge.
+# They are able to make any desired environment variable changes as
+# well as other adjustments to the application environment.
+
+# The post_start_cartridge and post_stop_cartridge hooks are executed
+# immediately after (re)starting or stopping the specified cartridge.
+
+# Exercise caution when adding commands to these hooks. They can
+# prevent your application from stopping cleanly or starting at all.
+# Application start and stop is subject to different timeouts
+# throughout the system.
14 .openshift/action_hooks/post_stop_jbossas-7
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+# The pre_start_cartridge and pre_stop_cartridge hooks are *SOURCED*
+# immediately before (re)starting or stopping the specified cartridge.
+# They are able to make any desired environment variable changes as
+# well as other adjustments to the application environment.
+
+# The post_start_cartridge and post_stop_cartridge hooks are executed
+# immediately after (re)starting or stopping the specified cartridge.
+
+# Exercise caution when adding commands to these hooks. They can
+# prevent your application from stopping cleanly or starting at all.
+# Application start and stop is subject to different timeouts
+# throughout the system.
5 .openshift/action_hooks/pre_build
@@ -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.
14 .openshift/action_hooks/pre_start_jbossas-7
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+# The pre_start_cartridge and pre_stop_cartridge hooks are *SOURCED*
+# immediately before (re)starting or stopping the specified cartridge.
+# They are able to make any desired environment variable changes as
+# well as other adjustments to the application environment.
+
+# The post_start_cartridge and post_stop_cartridge hooks are executed
+# immediately after (re)starting or stopping the specified cartridge.
+
+# Exercise caution when adding commands to these hooks. They can
+# prevent your application from stopping cleanly or starting at all.
+# Application start and stop is subject to different timeouts
+# throughout the system.
14 .openshift/action_hooks/pre_stop_jbossas-7
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+# The pre_start_cartridge and pre_stop_cartridge hooks are *SOURCED*
+# immediately before (re)starting or stopping the specified cartridge.
+# They are able to make any desired environment variable changes as
+# well as other adjustments to the application environment.
+
+# The post_start_cartridge and post_stop_cartridge hooks are executed
+# immediately after (re)starting or stopping the specified cartridge.
+
+# Exercise caution when adding commands to these hooks. They can
+# prevent your application from stopping cleanly or starting at all.
+# Application start and stop is subject to different timeouts
+# throughout the system.
3  .openshift/config/modules/README
@@ -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.
529 .openshift/config/standalone.xml
@@ -0,0 +1,529 @@
+<?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.clustering.jgroups"/>
+ <extension module="org.jboss.as.cmp"/>
+ <extension module="org.jboss.as.configadmin"/>
+ <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.jacorb"/>
+ <extension module="org.jboss.as.jaxr"/>
+ <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.jsr77"/>
+ <extension module="org.jboss.as.logging"/>
+ <extension module="org.jboss.as.mail"/>
+ <extension module="org.jboss.as.messaging"/>
+ <extension module="org.jboss.as.naming"/>
+ <extension module="org.jboss.as.osgi"/>
+ <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.webservices"/>
+ <extension module="org.jboss.as.weld"/>
+ </extensions>
+
+ <management>
+ <management-interfaces>
+ <native-interface>
+ <socket-binding native="management-native"/>
+ </native-interface>
+ <http-interface>
+ <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:cmp:1.0"/>
+ <subsystem xmlns="urn:jboss:domain:configadmin:1.0"/>
+ <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>
+ <validation>
+ <check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
+ </validation>
+ </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>
+ <validation>
+ <check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
+ </validation>
+ </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" deployment-timeout="300"/>
+ </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" clustered-cache-ref="clustered"/>
+ <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"/>
+ <cache name="clustered" passivation-store-ref="infinispan" aliases="StatefulTreeCache"/>
+ </caches>
+ <passivation-stores>
+ <file-passivation-store name="file"/>
+ <cluster-passivation-store name="infinispan" cache-container="ejb"/>
+ </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>
+ <!--iiop enable-by-default="false" use-qualified-name="false"/-->
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:infinispan:1.1" default-cache-container="cluster">
+ <cache-container name="cluster" aliases="ha-partition" default-cache="default">
+ <transport lock-timeout="60000"/>
+ <replicated-cache name="default" mode="SYNC" batching="true">
+ <locking isolation="REPEATABLE_READ"/>
+ </replicated-cache>
+ </cache-container>
+ <cache-container name="web" aliases="standard-session-cache" default-cache="repl">
+ <transport lock-timeout="60000"/>
+ <replicated-cache name="repl" mode="ASYNC" batching="true">
+ <file-store/>
+ </replicated-cache>
+ <replicated-cache name="sso" mode="SYNC" batching="true"/>
+ <distributed-cache name="dist" mode="ASYNC" batching="true">
+ <file-store/>
+ </distributed-cache>
+ </cache-container>
+ <cache-container name="ejb" aliases="sfsb sfsb-cache" default-cache="repl">
+ <transport lock-timeout="60000"/>
+ <replicated-cache name="repl" mode="ASYNC" batching="true">
+ <eviction strategy="LRU"/>
+ <file-store/>
+ </replicated-cache>
+ <!-- Clustered cache used internally by EJB subsytem for managing the client-mapping(s) of
+ the socketbinding referenced by the EJB remoting connector -->
+ <replicated-cache name="remote-connector-client-mappings" mode="SYNC" batching="true"/>
+ <distributed-cache name="dist" mode="ASYNC" batching="true">
+ <eviction strategy="LRU"/>
+ <file-store/>
+ </distributed-cache>
+ </cache-container>
+ <cache-container name="hibernate" default-cache="local-query">
+ <transport lock-timeout="60000"/>
+ <local-cache name="local-query">
+ <transaction mode="NONE"/>
+ <eviction strategy="LRU" max-entries="10000"/>
+ <expiration max-idle="100000"/>
+ </local-cache>
+ <invalidation-cache name="entity" mode="SYNC">
+ <transaction mode="NON_XA"/>
+ <eviction strategy="LRU" max-entries="10000"/>
+ <expiration max-idle="100000"/>
+ </invalidation-cache>
+ <replicated-cache name="timestamps" mode="ASYNC">
+ <transaction mode="NONE"/>
+ <eviction strategy="NONE"/>
+ </replicated-cache>
+ </cache-container>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:jacorb:1.1">
+ <orb>
+ <initializers transactions="spec" security="on"/>
+ </orb>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:jaxr:1.0">
+ <connection-factory jndi-name="java:jboss/jaxr/ConnectionFactory"/>
+ <juddi-server publish-url="http://${env.OPENSHIFT_INTERNAL_IP}:8080/juddi/publish" query-url="http://${env.OPENSHIFT_INTERNAL_IP}:8080/juddi/query"/>
+ </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:jgroups:1.0" default-stack="tcp">
+ <stack name="tcp">
+ <transport type="TCP" socket-binding="jgroups-tcp">
+ <property name="external_addr">${env.OPENSHIFT_GEAR_DNS}</property>
+ <property name="external_port">${env.OPENSHIFT_JBOSS_CLUSTER_PROXY_PORT}</property>
+ <property name="bind_port">7600</property>
+ <property name="bind_addr">${env.OPENSHIFT_INTERNAL_IP}</property>
+ </transport>
+ <protocol type="TCPPING">
+ <property name="timeout">30000</property>
+ <property name="initial_hosts">${env.OPENSHIFT_JBOSS_CLUSTER}</property>
+ <property name="port_range">0</property>
+ <property name="num_initial_members">1</property>
+ </protocol>
+ <protocol type="MERGE2"/>
+ <protocol type="FD"/>
+ <protocol type="VERIFY_SUSPECT"/>
+ <protocol type="BARRIER"/>
+ <protocol type="pbcast.NAKACK"/>
+ <protocol type="UNICAST2"/>
+ <protocol type="pbcast.STABLE"/>
+ <protocol type="pbcast.GMS"/>
+ <protocol type="UFC"/>
+ <protocol type="MFC"/>
+ <protocol type="FRAG2"/>
+ <protocol type="AUTH">
+ <property name="auth_class">org.jgroups.auth.MD5Token</property>
+ <property name="token_hash">SHA</property>
+ <property name="auth_value">${env.OPENSHIFT_JBOSS_CLUSTER}</property>
+ </protocol>
+ <!--protocol type="pbcast.STATE_TRANSFER"/>
+ <protocol type="pbcast.FLUSH"/-->
+ </stack>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:jmx:1.1">
+ <show-model value="true"/>
+ <remoting-connector/>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:jpa:1.0">
+ <jpa default-datasource=""/>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:jsr77:1.0"/>
+ <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:messaging:1.1">
+ <hornetq-server>
+ <clustered>true</clustered>
+ <persistence-enabled>true</persistence-enabled>
+ <!--security-domain>messaging</security-domain-->
+ <security-enabled>false</security-enabled>
+ <journal-file-size>102400</journal-file-size>
+ <journal-min-files>2</journal-min-files>
+
+ <connectors>
+ <netty-connector name="netty" socket-binding="messaging"/>
+ <netty-connector name="netty-throughput" socket-binding="messaging-throughput">
+ <param key="batch-delay" value="50"/>
+ </netty-connector>
+ <in-vm-connector name="in-vm" server-id="0"/>
+ </connectors>
+
+ <acceptors>
+ <netty-acceptor name="netty" socket-binding="messaging"/>
+ <netty-acceptor name="netty-throughput" socket-binding="messaging-throughput">
+ <param key="batch-delay" value="50"/>
+ <param key="direct-deliver" value="false"/>
+ </netty-acceptor>
+ <in-vm-acceptor name="in-vm" server-id="0"/>
+ </acceptors>
+
+ <!--broadcast-groups>
+ <broadcast-group name="bg-group1">
+ <group-address>231.7.7.7</group-address>
+ <group-port>9876</group-port>
+ <broadcast-period>5000</broadcast-period>
+ <connector-ref>
+ netty
+ </connector-ref>
+ </broadcast-group>
+ </broadcast-groups>
+
+ <discovery-groups>
+ <discovery-group name="dg-group1">
+ <group-address>231.7.7.7</group-address>
+ <group-port>9876</group-port>
+ <refresh-timeout>10000</refresh-timeout>
+ </discovery-group>
+ </discovery-groups>
+
+ <cluster-connections>
+ <cluster-connection name="my-cluster">
+ <address>jms</address>
+ <connector-ref>netty</connector-ref>
+ <discovery-group-ref discovery-group-name="dg-group1"/>
+ </cluster-connection>
+ </cluster-connections-->
+
+ <!--security-settings>
+ <security-setting match="#">
+ <permission type="send" roles="guest"/>
+ <permission type="consume" roles="guest"/>
+ <permission type="createNonDurableQueue" roles="guest"/>
+ <permission type="deleteNonDurableQueue" roles="guest"/>
+ </security-setting>
+ </security-settings-->
+
+ <address-settings>
+ <address-setting match="#">
+ <dead-letter-address>jms.queue.DLQ</dead-letter-address>
+ <expiry-address>jms.queue.ExpiryQueue</expiry-address>
+ <redelivery-delay>0</redelivery-delay>
+ <max-size-bytes>10485760</max-size-bytes>
+ <address-full-policy>BLOCK</address-full-policy>
+ <message-counter-history-day-limit>10</message-counter-history-day-limit>
+ <redistribution-delay>1000</redistribution-delay>
+ </address-setting>
+ </address-settings>
+
+ <jms-connection-factories>
+ <connection-factory name="InVmConnectionFactory">
+ <connectors>
+ <connector-ref connector-name="in-vm"/>
+ </connectors>
+ <entries>
+ <entry name="java:/ConnectionFactory"/>
+ </entries>
+ </connection-factory>
+ <connection-factory name="RemoteConnectionFactory">
+ <connectors>
+ <connector-ref connector-name="netty"/>
+ </connectors>
+ <entries>
+ <entry name="RemoteConnectionFactory"/>
+ <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/>
+ </entries>
+ </connection-factory>
+ <pooled-connection-factory name="hornetq-ra">
+ <transaction mode="xa"/>
+ <connectors>
+ <connector-ref connector-name="in-vm"/>
+ </connectors>
+ <entries>
+ <entry name="java:/JmsXA"/>
+ </entries>
+ </pooled-connection-factory>
+ </jms-connection-factories>
+
+ <jms-destinations>
+ <jms-queue name="testQueue">
+ <entry name="queue/test"/>
+ <entry name="java:jboss/exported/jms/queue/test"/>
+ </jms-queue>
+ <jms-topic name="testTopic">
+ <entry name="topic/test"/>
+ <entry name="java:jboss/exported/jms/topic/test"/>
+ </jms-topic>
+ </jms-destinations>
+ </hornetq-server>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:naming:1.1"/>
+ <subsystem xmlns="urn:jboss:domain:osgi:1.2" activation="lazy">
+ <properties>
+ <!-- Specifies the beginning start level of the framework -->
+ <property name="org.osgi.framework.startlevel.beginning">1</property>
+ </properties>
+ <capabilities>
+ <!-- modules registered with the OSGi layer on startup -->
+ <capability name="javax.servlet.api:v25"/>
+ <capability name="javax.transaction.api"/>
+ <!-- bundles started in startlevel 1 -->
+ <capability name="org.apache.felix.log" startlevel="1"/>
+ <capability name="org.jboss.osgi.logging" startlevel="1"/>
+ <capability name="org.apache.felix.configadmin" startlevel="1"/>
+ <capability name="org.jboss.as.osgi.configadmin" startlevel="1"/>
+ </capabilities>
+ </subsystem>
+ <subsystem xmlns="urn:jboss:domain:pojo:1.0"/>
+ <subsystem xmlns="urn:jboss:domain:remoting:1.1">
+ <connector name="remoting-connector" socket-binding="remoting"/>
+ </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-domain name="messaging" cache-type="default">
+ <authentication>
+ <login-module code="UsersRoles" flag="required">
+ <module-option name="usersProperties" value="${jboss.server.config.dir}/application-users.properties"/>
+ <module-option name="rolesProperties" value="${jboss.server.config.dir}/application-roles.properties"/>
+ </login-module>
+ </authentication>
+ </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:webservices:1.1">
+ <modify-wsdl-address>true</modify-wsdl-address>
+ <wsdl-host>${env.OPENSHIFT_INTERNAL_IP}</wsdl-host>
+ <endpoint-config name="Standard-Endpoint-Config"/>
+ <endpoint-config name="Recording-Endpoint-Config">
+ <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
+ <handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
+ </pre-handler-chain>
+ </endpoint-config>
+ </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>
+ <interface name="unsecure">
+ <!-- Used for IIOP sockets in the standarad configuration.
+ To secure JacORB you need to setup SSL -->
+ <loopback-address value="${env.OPENSHIFT_INTERNAL_IP}"/>
+ </interface>
+ </interfaces>
+
+ <socket-binding-group name="standard-sockets" default-interface="public" port-offset="0">
+ <socket-binding name="http" port="8080"/>
+ <socket-binding name="https" port="8443"/>
+ <socket-binding name="jacorb" interface="unsecure" port="3528"/>
+ <socket-binding name="jacorb-ssl" interface="unsecure" port="3529"/>
+ <socket-binding name="jgroups-tcp" port="7600"/>
+ <socket-binding name="management-native" interface="management" port="9999"/>
+ <socket-binding name="management-http" interface="management" port="9990"/>
+ <socket-binding name="messaging" port="5445"/>
+ <socket-binding name="messaging-throughput" port="5455"/>
+ <socket-binding name="osgi-http" interface="management" port="8090"/>
+ <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>
22 .openshift/cron/README.cron
@@ -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.
+
0  .openshift/cron/daily/.gitignore
No changes.
0  .openshift/cron/hourly/.gitignore
No changes.
0  .openshift/cron/minutely/.gitignore
No changes.
0  .openshift/cron/monthly/.gitignore
No changes.
16 .openshift/cron/weekly/README
@@ -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.
+
1  .openshift/cron/weekly/chrono.dat
@@ -0,0 +1 @@
+Time And Relative D...n In Execution (Open)Shift!
3  .openshift/cron/weekly/chronograph
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+echo "`date`: `cat $(dirname \"$0\")/chrono.dat`"
12 .openshift/cron/weekly/jobs.allow
@@ -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
+
7 .openshift/cron/weekly/jobs.deny
@@ -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
+
22 .openshift/markers/README
@@ -0,0 +1,22 @@
+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.
+
+hot_deploy - Will prevent a JBoss container restart during build/deployment.
+ Newly build archives will be re-deployed automatically by the
+ JBoss HDScanner component.
+
+java7 - Will run JBoss AS7 with Java7 if present. If no marker is present then the
+ baseline Java version will be used (currently Java6)
0  .openshift/markers/java7
No changes.
153 README
@@ -0,0 +1,153 @@
+Repo layout
+===========
+deployments/ - location for built wars (Details below)
+src/ - Maven src structure
+pom.xml - Maven build file
+.openshift/ - location for openshift specific files
+.openshift/config/ - location for configuration files such as standalone.xml (used to modify jboss config such as datasources)
+.openshift/action_hooks/pre_build - Script that gets run every git push before the build (on the CI system if available)
+.openshift/action_hooks/build - Script that gets run every git push as part of the build process (on the CI system if available)
+.openshift/action_hooks/deploy - Script that gets run every git push after build but before the app is restarted
+.openshift/action_hooks/post_deploy - Script that gets run every git push after the app is restarted
+
+Notes about layout
+==================
+Note: Every time you push, everything in your remote repo dir gets recreated
+ please store long term items (like an sqlite database) in the OpenShift
+ data directory, which will persist between pushes of your repo.
+ The OpenShift data directory is accessible relative to the remote repo
+ directory (../data) or via an environment variable OPENSHIFT_DATA_DIR.
+
+
+Details about layout and deployment options
+==================
+There are two options for deploying content to the JBoss Application Server within OpenShift:
+
+1) (Preferred) You can upload your content in a Maven src structure as is this sample project and on
+git push have the application built and deployed. For this to work you'll need your pom.xml at the
+root of your repository and a maven-war-plugin like in this sample to move the output from the build
+to the deployments directory. By default the warName is ROOT within pom.xml. This will cause the
+webapp contents to be rendered at http://app_name-namespace.rhcloud.com/. If you change the warName in
+pom.xml to app_name, your base url would then become http://app_name-namespace.rhcloud.com/app_name.
+
+Note: If you are building locally you'll also want to add any output wars/ears under deployments
+from the build to your .gitignore file.
+
+or
+
+2) You can git push prebuilt wars (with the corresponding .dodeploy file for exploded wars) into deployments/. To do this
+with the default repo you'll want to first run 'git rm -r src/ pom.xml' from the root of your repo.
+
+Basic workflows for deploying prebuilt content (each operation will require associated git add/commit/push operations to take effect):
+
+A) Add new zipped content and deploy it:
+
+1. cp target/example.war deployments/
+
+B) Add new unzipped content and deploy it:
+
+1. cp -r target/example.war/ deployments/
+2. touch deployments/example.war.dodeploy
+
+C) Undeploy currently deployed content:
+
+1. git rm deployments/example.war.dodeploy deployments/example.war
+
+D) Replace currently deployed zipped content with a new version and deploy it:
+
+1. cp target/example.war deployments/
+
+E) Replace currently deployed unzipped content with a new version and deploy it:
+
+1. git rm -rf deployments/example.war/
+2. cp -r target/example.war/ deployments/
+3. touch deployments/example.war.dodeploy
+
+WARNING: If you go with option 2) there are a couple issues to keep in mind with both prebuilt and exploded
+wars. With exploded wars the main issue is with committing binaries (class and jar files) can make merge
+conflicts tedious. With prebuilt wars the main issue is each time you modify the war and git push, it
+takes up the size of the war file away from your OpenShift file system quota. One alternative to this
+(other then using Maven from option 1) is to use rsync to push your war into the deployments folder. You
+would have to do this after each git push followed by 'rhc app restart -a appname'. Example:
+
+rsync -avz localdir/deployments/ app_uuid@appname-namespace.rhcloud.com:~/appname/repo/deployments/
+
+Note: You can get the information in the uri above from running 'rhc domain show'
+
+If you have already committed large files to your git repo, you rewrite or reset the history of those files in git
+to an earlier point in time and then 'git push --force' to apply those changes on the remote OpenShift server. A
+git gc on the remote OpenShift repo can be forced with (Note: tidy also does other cleanup including clearing log
+files and tmp dirs):
+
+rhc app tidy -a appname
+
+
+Whether you choose option 1) or 2) the end result will be the application
+deployed into the deployments directory. The deployments directory in the
+JBoss Application Server distribution is the location end users can place
+their deployment content (e.g. war, ear, jar, sar files) to have it
+automatically deployed into the server runtime.
+
+The filesystem deployment scanner in AS 7 and later works differently from
+previous JBoss AS releases. The scanner will no longer attempt to directly
+monitor the deployment content and decide if or when the end user wishes
+the content to be deployed. Instead, the scanner relies on a system of marker
+files, with the user's addition or removal of a marker file serving as a sort
+of command telling the scanner to deploy, undeploy or redeploy content.
+
+The marker files always have the same name as the deployment content to which
+they relate, but with an additional file suffix appended. For example, the
+marker file to indicate the example.war should be deployed is named
+example.war.dodeploy. Different marker file suffixes have different meanings.
+
+The relevant marker file types are:
+
+.dodeploy -- Placed by the user to indicate that the given content should
+ be deployed into the runtime (or redeployed if already
+ deployed in the runtime.)
+
+.deploying -- Placed by the deployment scanner service to indicate that it
+ has noticed a .dodeploy file and is in the process of
+ deploying the content. This marker file will be deleted when
+ the deployment process completes.
+
+.deployed -- Placed by the deployment scanner service to indicate that the
+ given content has been deployed into the runtime. If an end
+ user deletes this file, the content will be undeployed.
+
+.faileddeploy -- Placed by the deployment scanner service to indicate that the
+ given content failed to deploy into the runtime. The content
+ of the file will include some information about the cause of
+ the failure.
+
+.undeploying -- Placed by the deployment scanner service to indicate that it
+ has noticed a .deployed file has been deleted and the
+ content is being undeployed. This marker file will be deleted
+ when the undeployment process completes.
+
+.undeployed -- Placed by the deployment scanner service to indicate that the
+ given content has been undeployed from the runtime. If an end
+ user deletes this file, it has no impact.
+
+
+Environment Variables
+=====================
+
+OpenShift provides several environment variables to reference for ease
+of use. The following list are some common variables but far from exhaustive:
+
+ System.getenv("OPENSHIFT_GEAR_NAME") - Application name
+ System.getenv("OPENSHIFT_GEAR_DIR") - Application dir
+ System.getenv("OPENSHIFT_DATA_DIR") - For persistent storage (between pushes)
+ System.getenv("OPENSHIFT_TMP_DIR") - Temp storage (unmodified files deleted after 10 days)
+
+When embedding a database using 'rhc app cartridge add', you can reference environment
+variables for username, host and password:
+
+ System.getenv("OPENSHIFT_DB_HOST") - DB host
+ System.getenv("OPENSHIFT_DB_PORT") - DB Port
+ System.getenv("OPENSHIFT_DB_USERNAME") - DB Username
+ System.getenv("OPENSHIFT_DB_PASSWORD") - DB Password
+
+To get a full list of environment variables, simply add a line in your
+.openshift/action_hooks/build script that says "export" and push.
0  deployments/.gitkeep
No changes.
45 pom.xml
@@ -0,0 +1,45 @@
+<project 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/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>booksite</groupId>
+ <artifactId>booksite</artifactId>
+ <packaging>war</packaging>
+ <version>1.0</version>
+ <name>booksite</name>
+ <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>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.spec</groupId>
+ <artifactId>jboss-javaee-6.0</artifactId>
+ <version>1.0.0.Final</version>
+ <type>pom</type>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+ <profiles>
+ <profile>
+ <!-- When built in OpenShift the 'openshift' profile will be used when invoking mvn. -->
+ <!-- Use this profile for any OpenShift specific customization your app will need. -->
+ <!-- By default that is to put the resulting archive into the 'deployments' folder. -->
+ <!-- http://maven.apache.org/guides/mini/guide-building-for-different-environments.html -->
+ <id>openshift</id>
+ <build>
+ <finalName>booksite</finalName>
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.1.1</version>
+ <configuration>
+ <outputDirectory>deployments</outputDirectory>
+ <warName>ROOT</warName>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
0  src/main/java/.gitkeep
No changes.
0  src/main/resources/.gitkeep
No changes.
19 src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="3.0"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
+ metadata-complete="false">
+
+ <servlet>
+ <servlet-name>health</servlet-name>
+ <jsp-file>/health.jsp</jsp-file>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>health</servlet-name>
+ <url-pattern>/health</url-pattern>
+ </servlet-mapping>
+
+</web-app>
+
1  src/main/webapp/health.jsp
@@ -0,0 +1 @@
+1
BIN  src/main/webapp/images/jbosscorp_logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
182 src/main/webapp/index.html
@@ -0,0 +1,182 @@
+<!doctype html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <title>Welcome to OpenShift</title>
+ <style>
+ html {
+ background: black;
+ }
+ body {
+ background: #333;
+ background: -webkit-linear-gradient(top, black, #666);
+ background: -o-linear-gradient(top, black, #666);
+ background: -moz-linear-gradient(top, black, #666);
+ background: linear-gradient(top, black, #666);
+ color: white;
+ font-family: "Helvetica Neue",Helvetica,"Liberation Sans",Arial,sans-serif;
+ width: 40em;
+ margin: 0 auto;
+ padding: 3em;
+ }
+ a {
+ color: white;
+ }
+
+ h1 {
+ text-transform: capitalize;
+ -moz-text-shadow: -1px -1px 0 black;
+ -webkit-text-shadow: 2px 2px 2px black;
+ text-shadow: -1px -1px 0 black;
+ box-shadow: 1px 2px 2px rgba(0, 0, 0, 0.5);
+ background: #CC0000;
+ width: 22.5em;
+ margin: 1em -2em;
+ padding: .3em 0 .3em 1.5em;
+ position: relative;
+ }
+ h1:before {
+ content: '';
+ width: 0;
+ height: 0;
+ border: .5em solid #91010B;
+ border-left-color: transparent;
+ border-bottom-color: transparent;
+ position: absolute;
+ bottom: -1em;
+ left: 0;
+ z-index: -1000;
+ }
+ h1:after {
+ content: '';
+ width: 0;
+ height: 0;
+ border: .5em solid #91010B;
+ border-right-color: transparent;
+ border-bottom-color: transparent;
+ position: absolute;
+ bottom: -1em;
+ right: 0;
+ z-index: -1000;
+ }
+ h2 {
+ margin: 2em 0 .5em;
+ border-bottom: 1px solid #999;
+ }
+
+ pre {
+ background: black;
+ padding: 1em 0 0;
+ -webkit-border-radius: 1em;
+ -moz-border-radius: 1em;
+ border-radius: 1em;
+ color: #9cf;
+ }
+
+ ul {
+ margin: 0;
+ padding: 0;
+ }
+ li {
+ list-style-type: none;
+ padding: .5em 0;
+ }
+
+ .brand {
+ display: block;
+ text-decoration: none;
+ }
+ .brand .brand-image {
+ float: left;
+ border: none;
+ }
+ .brand .brand-text {
+ float: left;
+ font-size: 24px;
+ line-height: 24px;
+ padding: 4px 0;
+ color: white;
+ text-transform: uppercase;
+ }
+ .brand:hover,
+ .brand:active {
+ text-decoration: underline;
+ }
+
+ .brand:before,
+ .brand:after {
+ content: ' ';
+ display: table;
+ }
+ .brand:after {
+ clear: both;
+ }
+ </style>
+</head>
+<body>
+ <a href="http://openshift.com" class="brand">
+ <img class="brand-image"
+ alt="OpenShift logo"
+ src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAgCAYAAABU1PscAAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAARHgAAER4B27UUrQAABUhJREFUWMPFWFlsVGUU/s5/70zbaSltA7RQpJ2lC9CFkQkWIgSJxkAhRA0JCYFq4hPG6JsoGKNCtPigxqhvGlPAuGIaE4igNaElbIW2yNL2tkOtTYGWCqWF2e79fCh7p1Bmpnge/3vuOef7z/nPJiTxMHS6pMRuu6YqFNTTAJYSyAU4GZB0AH2AGCANAfc5Qrba6T3HrmECScYLwCioSIcV2AjidQDZ45Q/LJRaWrLV03X89P8GwHB5XwG4DcDkGPWEBKimNrzN094efGQAzjm9GWHFr4R4LiHKgFaSL3r8zYcmHEBbkW+KFo7UEyhKsNeHlMgyV8eJo4kQpqId9ub6HCoc+XWcxl8lcBTATwDax8GfZtHa054/f/bNg8ZcnyOhHjBc834E8MJ9/vML8aYZQX1hd1PP3WFXkhMRfYkIlpOoGomc0WRRTnch+XAQWG2KTNJNLbuy68C/cQMwXOWrAKkdgz8A8kMdg9X5fn/gQcI7POXLaMk3AGbe/P8SbF0D1KcGRGXpIJJpIQkWBHhnsf/Ie3GF0DmnMxmQT8bg7RellXr8ze+Ox3gAcBvNf+iUUhH5FODLSvScAerDGpiVxTAyGUYKzICA34nCwbhDyHB7N4L8PAofhVzh9jfvjffR/ZZTnupIsR8G0C9EjW7Tfnii/dBgrPL0u83kmjHy33Z3Z/zG97uKi7xpWA8GHZpE1mcZRne8MvXblfbxqQAWR+Fp+mdW5hZPjAqu5JVlhrTwOgrXi2ABbjjchF4FYGvi0qhprgagjYod4OeldXWRWBUEtdBjEH4mwIJ7vF2V4Dqgot0+NEFdPAqmdZ5tAXA8Slx6LrpKsxMHQJge5ft1v0oe2OOu+PZ39+LCOFqImqiXo8JzAeBkXlnmnoKK9LgACJl2R9gELsHW1saUwKCpnbIoa8UMTokVgGXJmSjHkfNWUlWDy9d6USVdyoiEF8b1iElxQKHuPG1D/bCtVEBhCiykMQQFgCK2mN2sSx+tkdcbhGq7wKSkK9RnmsCG2xVSLsflAR1S6eloWhawtF8yGJGskSJDBdQR8pIjZMXcfFmm1gOg2lRaSRdT1AD1PBPQbCAyxcRMifCpc41HEtILNbh9s8SSvYTUmBp2LDGOdCOB1OD0XbeByWliwY5bugc9nU2T4wqhCx7PNAV9bSGwARp3TzVaP0j09GQUzJubLUgefY3SEHMh63MVr4FIlYL+7C1AlCwAmxM+/plYy6hhgN2xp1HBawAr72krnH3uoicTaXyHx7uIwKZoT0QhUhszAAI7x7ivL0a60/jp77yyTFrWt6N6rxE99c7OkxdiBhC2y/cAorXHpama/aNG8dkOO32b6p3zTzXmeysfPu4LkkKafA3IrGjfCfPtuGfiPlfx+xBsuWtwpa3zIuy2YaoZ5o0eSQc5TVnb53aeeAuk9eBtRvkqUH0MoTsqA7nL429eFzeA3lyfQ08eaiNgCrjTYNozQ1S+WyUfQCosTLqZ+oiDUNwhggPujpZTuCMXGwUV6cJgKYnNIJffR3df2NLLZ5871puQrUR//pzpU7rOnAfJP53eDELrsoPpk4RIGRn5xqIBAAdBOCAoBjBjPJsJUdZSt9HSOGFrld5cn2M4KbwfkIUJzqYhQlYWdJ7YN2FrFQCY3nPsmk61AuSuRNYyUdaiRBk/7tViR37Zcir1JYC8WNshgjWWPfhq0dmzVx/5bhQAWnLKU1Md8gZHOsjxAgmD2GEKq4s6m1sxASQPu16HiBh53goqPg9ac0TEcwNQEOBlQAZEcMgC94dDZt2c7r8GMIH0H43ZRDC51RVCAAAAAElFTkSuQmCC">
+ <div class="brand-text"><strong>Open</strong>Shift</div>
+ </a>
+ <h1>
+ Welcome to OpenShift, JBossAS7 Cartridge
+ </h1>
+ <p>
+ Place your application here
+ </p>
+ <p>
+ In order to commit to your new project, go to your projects git repo (created with the rhc app create command) directory.
+ </p>
+ <p>
+ For example, if you named your application myfirstapp (by passing in -a myfirstapp to the rhc app create command),
+ you would find the contents of this app located under myfirstapp/src/main/webapp. You can edit that and push your
+ changes from the myfirstapp directory by running:
+ </p>
+ <pre>
+ git commit -a -m 'Some commit message'
+ git push
+ </pre>
+ <p>
+ Then reload this page.
+ </p>
+ <p>See the myfirstapp/README file for more information on the options for deploying applications.</p>
+
+
+<h2>Sample Applications</h2>
+<p>To get started you can either modify the default war or try one of these samples:
+ <ul>
+ <li><a href="https://github.com/openshift/kitchensink-example">https://github.com/openshift/kitchensink-example</a> this quickstart showcases some of the exciting Java EE6 features available on JBoss AS 7.1.</li>
+ <li><a href="https://github.com/openshift/kitchensink-html5-mobile-example">https://github.com/openshift/kitchensink-html5-mobile-example</a> based on kitchensink (above), but with an HTML5 client that displays great on a PC or mobile device.</li>
+ <li><a href="https://github.com/openshift/tweetstream-example">https://github.com/openshift/tweetstream-example</a> a TweetStream example</li>
+ </ul>
+
+ <h4>Example usage:</h4>
+ <pre>
+ cd kitchensink
+ git remote add upstream -m master git://github.com/openshift/kitchensink-example.git
+ git pull -s recursive -X theirs upstream master
+ </pre>
+</p>
+
+<h2>Debugging</h2>
+<p>View debugging information about the server environment including memory pools by loading this JSP page: <a href="snoop.jsp">Debug</a></p>
+
+ <h2>
+ What's next?
+ </h2>
+ <ul>
+ <li>
+ Why not visit us at <a href="http://openshift.redhat.com">http://openshift.redhat.com</a>, or
+ </li>
+ <li>
+ You could get help in the <a href="http://www.redhat.com/openshift">OpenShift forums</a>, or
+ </li>
+ <li>
+ You're welcome to come chat with us in our IRC channel at #openshift on freenode.net
+ </li>
+ </ul>
+</body>
+</html>
283 src/main/webapp/snoop.jsp
@@ -0,0 +1,283 @@
+<HTML>
+<HEAD>
+ <TITLE>JBossAS7 JSP snoop page</TITLE>
+ <%@ page import="javax.servlet.http.HttpUtils,java.util.Enumeration" %>
+ <%@ page import="java.lang.management.*" %>
+ <%@ page import="java.util.*" %>
+</HEAD>
+<BODY>
+
+<H1>WebApp JSP Snoop page</H1>
+<img src="images/jbosscorp_logo.png">
+
+<h2>JVM Memory Monitor</h2>
+
+
+<table border="0" width="100%">
+
+<tbody>
+<tr>
+<td colspan="2" align="center">
+<h3>Memory MXBean</h3>
+</td>
+</tr>
+
+<tr>
+<td width="200">Heap Memory Usage</td>
+<td>
+<%=ManagementFactory.getMemoryMXBean().getHeapMemoryUsage()%>
+</td>
+</tr>
+
+<tr>
+<td>Non-Heap Memory Usage</td>
+<td>
+<%=ManagementFactory.getMemoryMXBean().getNonHeapMemoryUsage()%>
+</td>
+</tr>
+
+<tr>
+<td colspan="2"> </td>
+</tr>
+
+<tr>
+<td colspan="2" align="center">
+<h3>Memory Pool MXBeans</h3>
+</td>
+</tr>
+
+</tbody>
+</table>
+<%
+Iterator iter = ManagementFactory.getMemoryPoolMXBeans().iterator();
+while (iter.hasNext()) {
+MemoryPoolMXBean item = (MemoryPoolMXBean) iter.next();
+%>
+
+<table style="border: 1px #98AAB1 solid;" border="0" width="100%">
+
+<tbody>
+<tr>
+<td colspan="2" align="center"><strong><%= item.getName() %></strong></td>
+</tr>
+
+<tr>
+<td width="200">Type</td>
+<td><%= item.getType() %></td>
+</tr>
+
+<tr>
+<td>Usage</td>
+<td><%= item.getUsage() %></td>
+</tr>
+
+<tr>
+<td>Peak Usage</td>
+<td><%= item.getPeakUsage() %></td>
+</tr>
+
+<tr>
+<td>Collection Usage</td>
+<td><%= item.getCollectionUsage() %></td>
+</tr>
+
+</tbody>
+</table>
+
+
+<%
+}
+%>
+
+<H2>Request information</H2>
+
+<TABLE>
+<TR>
+ <TH align=right>Requested URL:</TH>
+ <TD><%= HttpUtils.getRequestURL(request) %></TD>
+</TR>
+<TR>
+ <TH align=right>Request method:</TH>
+ <TD><%= request.getMethod() %></TD>
+</TR>
+<TR>
+ <TH align=right>Request URI:</TH>
+ <TD><%= request.getRequestURI() %></TD>
+</TR>
+<TR>
+ <TH align=right>Request protocol:</TH>
+ <TD><%= request.getProtocol() %></TD>
+</TR>
+<TR>
+ <TH align=right>Servlet path:</TH>
+ <TD><%= request.getServletPath() %></TD>
+</TR>
+<TR>
+ <TH align=right>Path info:</TH>
+ <TD><%= request.getPathInfo() %></TD>
+</TR>
+<TR>
+ <TH align=right>Path translated:</TH>
+ <TD><%= request.getPathTranslated() %></TD>
+</TR>
+<TR>
+ <TH align=right>Query string:</TH>
+ <TD><% if(request.getQueryString()!=null) out.write(request.getQueryString().replaceAll("<", "&lt;").replaceAll(">","&gt;")); %></TD>
+</TR>
+<TR>
+ <TH align=right>Content length:</TH>
+ <TD><%= request.getContentLength() %></TD>
+</TR>
+<TR>
+ <TH align=right>Content type:</TH>
+ <TD><%= request.getContentType() %></TD>
+<TR>
+<TR>
+ <TH align=right>Server name:</TH>
+ <TD><%= request.getServerName() %></TD>
+<TR>
+<TR>
+ <TH align=right>Server port:</TH>
+ <TD><%= request.getServerPort() %></TD>
+<TR>
+<TR>
+ <TH align=right>Remote user:</TH>
+ <TD><%= request.getRemoteUser() %></TD>
+<TR>
+<TR>
+ <TH align=right>Remote address:</TH>
+ <TD><%= request.getRemoteAddr() %></TD>
+<TR>
+<TR>
+ <TH align=right>Remote host:</TH>
+ <TD><%= request.getRemoteHost() %></TD>
+<TR>
+<TR>
+ <TH align=right>Authorization scheme:</TH>
+ <TD><%= request.getAuthType() %></TD>
+<TR>
+</TABLE>
+
+<%
+ Enumeration e = request.getHeaderNames();
+ if(e != null && e.hasMoreElements()) {
+%>
+<H2>Request headers</H2>
+
+<TABLE>
+<TR>
+ <TH align=left>Header:</TH>
+ <TH align=left>Value:</TH>
+</TR>
+<%
+ while(e.hasMoreElements()) {
+ String k = (String) e.nextElement();
+%>
+<TR>
+ <TD><%= k %></TD>
+ <TD><%= request.getHeader(k) %></TD>
+</TR>
+<%
+ }
+%>
+</TABLE>
+<%
+ }
+%>
+
+
+<%
+ e = request.getParameterNames();
+ if(e != null && e.hasMoreElements()) {
+%>
+<H2>Request parameters</H2>
+<TABLE>
+<TR valign=top>
+ <TH align=left>Parameter:</TH>
+ <TH align=left>Value:</TH>
+ <TH align=left>Multiple values:</TH>
+</TR>
+<%
+ while(e.hasMoreElements()) {
+ String k = (String) e.nextElement();
+ String val = request.getParameter(k);
+ String vals[] = request.getParameterValues(k);
+%>
+<TR valign=top>
+ <TD><%= k.replaceAll("<", "&lt;").replaceAll(">","&gt;") %></TD>
+ <TD><%= val.replaceAll("<", "&lt;").replaceAll(">","&gt;") %></TD>
+ <TD><%
+ for(int i = 0; i < vals.length; i++) {
+ if(i > 0)
+ out.print("<BR>");
+ out.print(vals[i].replaceAll("<", "&lt;").replaceAll(">","&gt;"));
+ }
+ %></TD>
+</TR>
+<%
+ }
+%>
+</TABLE>
+<%
+ }
+%>
+
+
+<%
+ e = request.getAttributeNames();
+ if(e != null && e.hasMoreElements()) {
+%>
+<H2>Request Attributes</H2>
+<TABLE>
+<TR valign=top>
+ <TH align=left>Attribute:</TH>
+ <TH align=left>Value:</TH>
+</TR>
+<%
+ while(e.hasMoreElements()) {
+ String k = (String) e.nextElement();
+ Object val = request.getAttribute(k);
+%>
+<TR valign=top>
+ <TD><%= k.replaceAll("<", "&lt;").replaceAll(">","&gt;") %></TD>
+ <TD><%= val.toString().replaceAll("<", "&lt;").replaceAll(">","&gt;") %></TD>
+</TR>
+<%
+ }
+%>
+</TABLE>
+<%
+ }
+%>
+
+
+<%
+ e = getServletConfig().getInitParameterNames();
+ if(e != null && e.hasMoreElements()) {
+%>
+<H2>Init parameters</H2>
+<TABLE>
+<TR valign=top>
+ <TH align=left>Parameter:</TH>
+ <TH align=left>Value:</TH>
+</TR>
+<%
+ while(e.hasMoreElements()) {
+ String k = (String) e.nextElement();
+ String val = getServletConfig().getInitParameter(k);
+%>
+<TR valign=top>
+ <TD><%= k %></TD>
+ <TD><%= val %></TD>
+</TR>
+<%
+ }
+%>
+</TABLE>
+<%
+ }
+%>
+
+</BODY>
+</HTML>
+
Please sign in to comment.
Something went wrong with that request. Please try again.