Skip to content

Commit

Permalink
added testbed module
Browse files Browse the repository at this point in the history
  • Loading branch information
ar committed Jul 20, 2015
1 parent a5a60d5 commit aa282d8
Show file tree
Hide file tree
Showing 7 changed files with 134 additions and 0 deletions.
26 changes: 26 additions & 0 deletions modules/testbed/src/dist/cfg/db.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#
# jPOS Project [http://jpos.org]
# Copyright (C) 2000-2012 Alejandro P. Revilla
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

hibernate.connection.username=sa
hibernate.connection.password=
# hibernate.hbm2ddl.auto=update
#
hibernate.connection.url=jdbc:h2:./data/jposee;LOCK_TIMEOUT=5000
hibernate.connection.driver_class=org.h2.Driver
hibernate.dialect=org.hibernate.dialect.H2Dialect
#
12 changes: 12 additions & 0 deletions modules/testbed/src/dist/cfg/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<configuration scan="true" scanPeriod="30 seconds">
<!-- 'Q2' Appender -->
<appender name="Q2" class="org.jpos.logging.logback.LogbackAppender"/>

<!-- By default all messages at level ERROR will go to the 'Q2' appender -->
<root level="ERROR">
<appender-ref ref="Q2"/>
</root>
<contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator">
<resetJUL>true</resetJUL>
</contextListener>
</configuration>
41 changes: 41 additions & 0 deletions modules/testbed/src/dist/deploy/00_logger.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
~ jPOS Project [http://jpos.org]
~ Copyright (C) 2000-2012 Alejandro P. Revilla
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU Affero General Public License as
~ published by the Free Software Foundation, either version 3 of the
~ License, or (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU Affero General Public License for more details.
~
~ You should have received a copy of the GNU Affero General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->

<logger name="Q2" class="org.jpos.q2.qbean.LoggerAdaptor">
<!--
<log-listener class="org.jpos.util.ProtectedLogListener">
<property name="protect" value="2 14 35 45" />
<property name="wipe" value="52 55 120" />
</log-listener>
<log-listener class="org.jpos.util.STLogListener">
<property name="path" value="cfg" />
<property name="skin" value="jpos.stg" />
</log-listener>
-->
<log-listener class="org.jpos.util.SimpleLogListener" />

<log-listener class="org.jpos.util.RotateLogListener">
<property name="file" value="log/q2.log" />
<property name="window" value="86400" />
<property name="copies" value="90" />
<property name="maxsize" value="100000000" />
</log-listener>
</logger>

21 changes: 21 additions & 0 deletions modules/testbed/src/dist/deploy/02_logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!--
~ jPOS Project [http://jpos.org]
~ Copyright (C) 2000-2012 Alejandro P. Revilla
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU Affero General Public License as
~ published by the Free Software Foundation, either version 3 of the
~ License, or (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU Affero General Public License for more details.
~
~ You should have received a copy of the GNU Affero General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->

<logback name="logback-config" class="org.jpos.logging.logback.LogbackConfigurator">
<property name="config-resource" value="file:cfg/logback.xml"/>
</logback>
2 changes: 2 additions & 0 deletions modules/testbed/src/dist/deploy/90_testbed.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<qbean name='testbed' logger='Q2' class='org.jpos.testbed.Test' />

23 changes: 23 additions & 0 deletions modules/testbed/src/dist/deploy/99_sysmon.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!--
~ jPOS Project [http://jpos.org]
~ Copyright (C) 2000-2012 Alejandro P. Revilla
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU Affero General Public License as
~ published by the Free Software Foundation, either version 3 of the
~ License, or (at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU Affero General Public License for more details.
~
~ You should have received a copy of the GNU Affero General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->

<sysmon logger="Q2">
<attr name="sleepTime" type="java.lang.Long">3600000</attr>
<attr name="detailRequired" type="java.lang.Boolean">true</attr>
</sysmon>

9 changes: 9 additions & 0 deletions modules/testbed/src/main/java/org/jpos/testbed/Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package org.jpos.testbed;

import org.jpos.q2.QBeanSupport;

public class Test extends QBeanSupport {
@Override
protected void startService() {
}
}

0 comments on commit aa282d8

Please sign in to comment.