[jboss-cvs] JBossAS SVN: r64610 - in projects/security/security-jboss-sx/trunk: src/tests/org/jboss/test and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Aug 15 16:08:58 EDT 2007
Author: anil.saldhana at jboss.com
Date: 2007-08-15 16:08:58 -0400 (Wed, 15 Aug 2007)
New Revision: 64610
Added:
projects/security/security-jboss-sx/trunk/src/tests/org/jboss/test/AbstractJBossSXTest.java
projects/security/security-jboss-sx/trunk/src/tests/org/jboss/test/JBossSXTestDelegate.java
projects/security/security-jboss-sx/trunk/src/tests/resources/log4j.xml
Modified:
projects/security/security-jboss-sx/trunk/.classpath
projects/security/security-jboss-sx/trunk/pom.xml
Log:
use JBoss Test and add logging
Modified: projects/security/security-jboss-sx/trunk/.classpath
===================================================================
--- projects/security/security-jboss-sx/trunk/.classpath 2007-08-15 18:37:47 UTC (rev 64609)
+++ projects/security/security-jboss-sx/trunk/.classpath 2007-08-15 20:08:58 UTC (rev 64610)
@@ -12,6 +12,7 @@
<classpathentry kind="var" path="M2_REPO/jboss/jboss-security-spi/2.0.1-SNAPSHOT/jboss-security-spi-2.0.1-SNAPSHOT.jar"/>
<classpathentry kind="var" path="M2_REPO/jboss/jboss-javaee/5.0.0-SNAPSHOT/jboss-javaee-5.0.0-SNAPSHOT.jar"/>
<classpathentry kind="var" path="M2_REPO/jboss/jboss-jaspi-api/1.0-SNAPSHOT/jboss-jaspi-api-1.0-SNAPSHOT.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/jboss-test/1.0.3.GA/jboss-test-1.0.3.GA.jar"/>
<classpathentry kind="var" path="M2_REPO/sun-xacml/sunxacml-support/2.0/sunxacml-support-2.0.jar"/>
<classpathentry kind="var" path="M2_REPO/sun-jaf/activation/1.1/activation-1.1.jar"/>
<classpathentry kind="var" path="M2_REPO/junit/junit/3.8.1/junit-3.8.1.jar"/>
Modified: projects/security/security-jboss-sx/trunk/pom.xml
===================================================================
--- projects/security/security-jboss-sx/trunk/pom.xml 2007-08-15 18:37:47 UTC (rev 64609)
+++ projects/security/security-jboss-sx/trunk/pom.xml 2007-08-15 20:08:58 UTC (rev 64610)
@@ -197,11 +197,13 @@
<groupId>jboss</groupId>
<artifactId>jboss-common-core</artifactId>
<version>2.2.0-SNAPSHOT</version>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>jboss</groupId>
<artifactId>jboss-logging-spi</artifactId>
<version>2.0.2.GA</version>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>jboss</groupId>
@@ -213,52 +215,67 @@
<groupId>jboss</groupId>
<artifactId>jboss-security-spi</artifactId>
<version>2.0.1-SNAPSHOT</version>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jbossxb</artifactId>
<version>2.0.0-SNAPSHOT</version>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.4.GA</version>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>apache-log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>sun-xacml</groupId>
<artifactId>sun-xacml</artifactId>
<version>2.0</version>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>sun-xacml</groupId>
<artifactId>sunxacml-support</artifactId>
<version>2.0</version>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4</version>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>apache-xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.7.1</version>
<scope>test</scope>
- </dependency>
+ </dependency>
+ <dependency>
+ <groupId>jboss</groupId>
+ <artifactId>jboss-test</artifactId>
+ <version>1.0.3.GA</version>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
Added: projects/security/security-jboss-sx/trunk/src/tests/org/jboss/test/AbstractJBossSXTest.java
===================================================================
--- projects/security/security-jboss-sx/trunk/src/tests/org/jboss/test/AbstractJBossSXTest.java (rev 0)
+++ projects/security/security-jboss-sx/trunk/src/tests/org/jboss/test/AbstractJBossSXTest.java 2007-08-15 20:08:58 UTC (rev 64610)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test;
+
+//$Id$
+
+/**
+ * Abstract JBossSX Test Base
+ * making use of the JBoss Test Setup
+ * @author Anil.Saldhana at redhat.com
+ * @since Aug 15, 2007
+ * @version $Revision$
+ */
+public class AbstractJBossSXTest extends AbstractTestCaseWithSetup
+{
+ public AbstractJBossSXTest(String name)
+ {
+ super(name);
+ }
+
+ public static AbstractTestDelegate getDelegate(Class clazz) throws Exception
+ {
+ return new JBossSXTestDelegate(clazz);
+ }
+
+ protected void setUp() throws Exception
+ {
+ super.setUp();
+ configureLogging();
+ }
+}
Added: projects/security/security-jboss-sx/trunk/src/tests/org/jboss/test/JBossSXTestDelegate.java
===================================================================
--- projects/security/security-jboss-sx/trunk/src/tests/org/jboss/test/JBossSXTestDelegate.java (rev 0)
+++ projects/security/security-jboss-sx/trunk/src/tests/org/jboss/test/JBossSXTestDelegate.java 2007-08-15 20:08:58 UTC (rev 64610)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test;
+
+//$Id$
+
+/**
+ * JBossSXTestDelegate
+ * @author Anil.Saldhana at redhat.com
+ * @since Aug 15, 2007
+ * @version $Revision$
+ */
+public class JBossSXTestDelegate extends AbstractTestDelegate
+{
+ public JBossSXTestDelegate(Class clazz)
+ {
+ super(clazz);
+ }
+}
Added: projects/security/security-jboss-sx/trunk/src/tests/resources/log4j.xml
===================================================================
--- projects/security/security-jboss-sx/trunk/src/tests/resources/log4j.xml (rev 0)
+++ projects/security/security-jboss-sx/trunk/src/tests/resources/log4j.xml 2007-08-15 20:08:58 UTC (rev 64610)
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!-- -->
+<!-- Log4j Configuration -->
+<!-- -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml 34717 2005-08-08 18:15:31Z adrian $ -->
+
+<!--
+ | For more configuration infromation and examples see the Jakarta Log4j
+ | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <!-- ================================= -->
+ <!-- Preserve messages in a local file -->
+ <!-- ================================= -->
+
+ <!-- A time/date based rolling appender -->
+ <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
+ <param name="File" value="${basedir}/target/test.log"/>
+ <param name="Append" value="true"/>
+
+ <!-- Rollover at midnight each day -->
+ <param name="DatePattern" value="'.'yyyy-MM-dd"/>
+
+ <!-- Rollover at the top of each hour
+ <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
+ -->
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+
+ <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
+ <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
+ -->
+ </layout>
+ </appender>
+
+ <!-- ============================== -->
+ <!-- Append messages to the console -->
+ <!-- ============================== -->
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <param name="Threshold" value="FATAL"/>
+ <param name="Target" value="System.out"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+ </layout>
+ </appender>
+
+
+ <!-- ====================== -->
+ <!-- More Appender examples -->
+ <!-- ====================== -->
+
+ <!-- Buffer events and log them asynchronously
+ <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
+ <appender-ref ref="FILE"/>
+ <appender-ref ref="CONSOLE"/>
+ </appender>
+ -->
+
+ <!-- EMail events to an administrator
+ <appender name="SMTP" class="org.apache.log4j.net.SMTPAppender">
+ <param name="Threshold" value="ERROR"/>
+ <param name="To" value="admin at myhost.domain.com"/>
+ <param name="From" value="nobody at myhost.domain.com"/>
+ <param name="Subject" value="JBoss Sever Errors"/>
+ <param name="SMTPHost" value="localhost"/>
+ <param name="BufferSize" value="10"/>
+ </appender>
+ -->
+
+ <!-- Syslog events
+ <appender name="SYSLOG" class="org.apache.log4j.net.SyslogAppender">
+ <param name="Facility" value="LOCAL7"/>
+ <param name="FacilityPrinting" value="true"/>
+ <param name="SyslogHost" value="localhost"/>
+ </appender>
+ -->
+
+ <!-- Log events to JMS (requires a topic to be created)
+ <appender name="JMS" class="org.apache.log4j.net.JMSAppender">
+ <param name="Threshold" value="ERROR"/>
+ <param name="TopicConnectionFactoryBindingName" value="java:/ConnectionFactory"/>
+ <param name="TopicBindingName" value="topic/MyErrorsTopic"/>
+ </appender>
+ -->
+
+ <!-- ================ -->
+ <!-- Limit categories -->
+ <!-- ================ -->
+
+ <!-- Limit JBoss categories to INFO
+ <category name="org.jboss">
+ <priority value="INFO" class="org.jboss.logging.XLevel"/>
+ </category>
+ -->
+
+ <!-- Increase the priority threshold for the DefaultDS category
+ <category name="DefaultDS">
+ <priority value="FATAL"/>
+ </category>
+ -->
+
+ <!-- Decrease the priority threshold for the org.jboss.varia category
+ <category name="org.jboss.varia">
+ <priority value="DEBUG"/>
+ </category>
+ -->
+
+ <!--
+ | An example of enabling the custom TRACE level priority that is used
+ | by the JBoss internals to diagnose low level details. This example
+ | turns on TRACE level msgs for the org.jboss.ejb.plugins package and its
+ | subpackages. This will produce A LOT of logging output.
+ <category name="org.jboss.system">
+ <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+ </category>
+ -->
+
+ <!--category name="org.jboss.tm">
+ <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+ </category-->
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root>
+ <appender-ref ref="CONSOLE"/>
+ <appender-ref ref="FILE"/>
+ </root>
+
+</log4j:configuration>
More information about the jboss-cvs-commits
mailing list