[jboss-cvs] JBossAS SVN: r90822 - in projects/ejb-book/trunk: ch07-envinfo and 18 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sun Jul 5 18:56:34 EDT 2009
Author: ALRubinger
Date: 2009-07-05 18:56:34 -0400 (Sun, 05 Jul 2009)
New Revision: 90822
Added:
projects/ejb-book/trunk/ch07-envinfo/
projects/ejb-book/trunk/ch07-envinfo/pom.xml
projects/ejb-book/trunk/ch07-envinfo/src/
projects/ejb-book/trunk/ch07-envinfo/src/main/
projects/ejb-book/trunk/ch07-envinfo/src/main/java/
projects/ejb-book/trunk/ch07-envinfo/src/main/java/org/
projects/ejb-book/trunk/ch07-envinfo/src/main/java/org/jboss/
projects/ejb-book/trunk/ch07-envinfo/src/main/java/org/jboss/ejb3/
projects/ejb-book/trunk/ch07-envinfo/src/main/java/org/jboss/ejb3/examples/
projects/ejb-book/trunk/ch07-envinfo/src/main/java/org/jboss/ejb3/examples/ch06/
projects/ejb-book/trunk/ch07-envinfo/src/main/java/org/jboss/ejb3/examples/ch06/envinfo/
projects/ejb-book/trunk/ch07-envinfo/src/main/java/org/jboss/ejb3/examples/ch06/envinfo/EnvironmentInformationBean.java
projects/ejb-book/trunk/ch07-envinfo/src/main/java/org/jboss/ejb3/examples/ch06/envinfo/EnvironmentInformationCommonBusiness.java
projects/ejb-book/trunk/ch07-envinfo/src/main/resources/
projects/ejb-book/trunk/ch07-envinfo/src/test/
projects/ejb-book/trunk/ch07-envinfo/src/test/java/
projects/ejb-book/trunk/ch07-envinfo/src/test/java/org/
projects/ejb-book/trunk/ch07-envinfo/src/test/java/org/jboss/
projects/ejb-book/trunk/ch07-envinfo/src/test/java/org/jboss/ejb3/
projects/ejb-book/trunk/ch07-envinfo/src/test/java/org/jboss/ejb3/examples/
projects/ejb-book/trunk/ch07-envinfo/src/test/java/org/jboss/ejb3/examples/ch07/
projects/ejb-book/trunk/ch07-envinfo/src/test/java/org/jboss/ejb3/examples/ch07/envinfo/
projects/ejb-book/trunk/ch07-envinfo/src/test/java/org/jboss/ejb3/examples/ch07/envinfo/EnvironmentInformationTestCaseBase.java
projects/ejb-book/trunk/ch07-envinfo/src/test/java/org/jboss/ejb3/examples/ch07/envinfo/EnvironmentInformationUnitTestCase.java
projects/ejb-book/trunk/ch07-envinfo/src/test/resources/
projects/ejb-book/trunk/ch07-envinfo/src/test/resources/jndi.properties
projects/ejb-book/trunk/ch07-envinfo/src/test/resources/log4j.xml
Modified:
projects/ejb-book/trunk/pom.xml
Log:
[EJBBOOK-9] Start of @Singleton examples
Property changes on: projects/ejb-book/trunk/ch07-envinfo
___________________________________________________________________
Name: svn:ignore
+ target
.settings
.classpath
.project
Added: projects/ejb-book/trunk/ch07-envinfo/pom.xml
===================================================================
--- projects/ejb-book/trunk/ch07-envinfo/pom.xml (rev 0)
+++ projects/ejb-book/trunk/ch07-envinfo/pom.xml 2009-07-05 22:56:34 UTC (rev 90822)
@@ -0,0 +1,179 @@
+<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">
+
+ <!-- Parent Information -->
+ <parent>
+ <groupId>org.jboss.ejb3.examples</groupId>
+ <artifactId>jboss-ejb3-examples-build</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <!-- Model Version -->
+ <modelVersion>4.0.0</modelVersion>
+
+ <!-- Artifact Information -->
+ <artifactId>jboss-ejb3-examples-ch07-envinfo</artifactId>
+ <name>JBoss EJB 3.x Examples - Chapter 7: EnvironmentInfo EJBs</name>
+ <description>Example to accompany O'Reilly "Enterprise Java Beans 6th Edition" Chapter 7</description>
+
+ <!-- Build -->
+ <build>
+ </build>
+
+
+ <!-- Properties -->
+ <properties>
+
+ <!-- Versioning -->
+
+ </properties>
+
+ <!-- Dependencies -->
+ <dependencies>
+
+ <dependency>
+ <groupId>org.jboss.ejb3</groupId>
+ <artifactId>jboss-ejb3-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-log4j</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ </dependency>
+
+ </dependencies>
+
+ <profiles>
+
+ <profile>
+
+ <!-- Declare the "Integration Test" Profile -->
+ <id>it</id>
+
+ <build>
+
+ <plugins>
+
+ <!--
+
+ Configure Surefire to run in integration-test phase
+ -->
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>surefire-it</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skip>false</skip>
+ <!-- Include jbossall-client.jar on the CP -->
+ <additionalClasspathElements>
+ <additionalClasspathElement>${jboss.home}/client/jbossall-client.jar</additionalClasspathElement>
+ </additionalClasspathElements>
+ <redirectTestOutputToFile>true</redirectTestOutputToFile>
+ <printSummary>true</printSummary>
+ <forkMode>always</forkMode>
+ <includes>
+ <include>**/*IntegrationTestCase.java</include>
+ </includes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <!--
+
+ Define the JBossAS Maven Control Plugin
+ -->
+ <plugin>
+
+ <groupId>org.jboss.maven.plugins.jbossas</groupId>
+ <artifactId>maven-jboss-as-control-plugin</artifactId>
+ <version>0.1.2-SNAPSHOT</version>
+
+ <!-- Executions -->
+ <executions>
+
+ <!--
+
+ Start JBossAS with our new configuration
+ -->
+ <execution>
+ <id>start-jbossas</id>
+ <goals>
+ <goal>start</goal>
+ </goals>
+ <phase>pre-integration-test</phase>
+ <configuration>
+ <jvmArgs>
+ <jvmArg>-Xmx512M</jvmArg>
+ </jvmArgs>
+ <serverConfigName>default</serverConfigName>
+ <jboss.test.run>true</jboss.test.run>
+ </configuration>
+ </execution>
+
+ <!--
+ Deploy into our custom JBossAS Configuration
+ -->
+ <execution>
+ <id>deploy-test-slsb</id>
+ <goals>
+ <goal>deploy</goal>
+ </goals>
+ <phase>pre-integration-test</phase>
+ <configuration>
+ <serverConfigName>default</serverConfigName>
+ <files>${project.build.directory}/lib/ftplet-api.jar,
+ ${project.build.directory}/lib/ftpserver-core.jar,
+ ${project.build.directory}/lib/mina-core.jar,
+ ${project.build.directory}/lib/slf4j-api.jar,
+ ${project.build.directory}/lib/commons-net.jar,
+ ${project.build.directory}/${project.build.finalName}.${project.packaging}</files>
+ <jboss.test.run>true</jboss.test.run>
+ </configuration>
+ </execution>
+
+ <!--
+
+ Stop JBossAS
+ -->
+ <execution>
+ <id>stop-jbossas</id>
+ <goals>
+ <goal>stop</goal>
+ </goals>
+ <phase>post-integration-test</phase>
+ <configuration>
+ <serverConfigName>default</serverConfigName>
+ <jboss.test.run>true</jboss.test.run>
+ </configuration>
+ </execution>
+
+ </executions>
+
+ </plugin>
+
+ </plugins>
+
+ </build>
+
+ </profile>
+
+ </profiles>
+
+</project>
Property changes on: projects/ejb-book/trunk/ch07-envinfo/pom.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: projects/ejb-book/trunk/ch07-envinfo/src/main/java/org/jboss/ejb3/examples/ch06/envinfo/EnvironmentInformationBean.java
===================================================================
--- projects/ejb-book/trunk/ch07-envinfo/src/main/java/org/jboss/ejb3/examples/ch06/envinfo/EnvironmentInformationBean.java (rev 0)
+++ projects/ejb-book/trunk/ch07-envinfo/src/main/java/org/jboss/ejb3/examples/ch06/envinfo/EnvironmentInformationBean.java 2009-07-05 22:56:34 UTC (rev 90822)
@@ -0,0 +1,113 @@
+package org.jboss.ejb3.examples.ch06.envinfo;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.Properties;
+
+import javax.annotation.PostConstruct;
+import javax.ejb.Remote;
+import javax.ejb.Singleton;
+import javax.ejb.Startup;
+
+import org.jboss.logging.Logger;
+
+/**
+ * EnvironmentInformationBean
+ *
+ * Singleton EJB, to be eagerly instanciated upon application deployment,
+ * exposing information about the runtime environment.
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+ at Singleton
+ at Startup
+ at Remote(EnvironmentInformationCommonBusiness.class)
+public class EnvironmentInformationBean implements EnvironmentInformationCommonBusiness
+{
+
+ //-------------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Logger
+ */
+ private static final Logger log = Logger.getLogger(EnvironmentInformationBean.class);
+
+ /**
+ * System property denoting the Java Version
+ */
+ private static final String SYS_PROP_JAVA_VERSION = "java.version";
+
+ /**
+ * System property denoting the Operating System Name
+ */
+ private static final String SYS_PROP_OS_NAME = "os.name";
+
+ //-------------------------------------------------------------------------------------||
+ // Instance Members -------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Holds the JDK Version
+ */
+ private String jdkVersion;
+
+ /**
+ * Holds the operating system name
+ */
+ private String osName;
+
+ //-------------------------------------------------------------------------------------||
+ // Required Implementations -----------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.ejb3.examples.ch06.envinfo.EnvironmentInformationCommonBusiness#getJdkVersion()
+ */
+ @Override
+ public String getJdkVersion()
+ {
+ return jdkVersion;
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.ejb3.examples.ch06.envinfo.EnvironmentInformationCommonBusiness#getOsName()
+ */
+ @Override
+ public String getOsName()
+ {
+ return osName;
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Functional Methods -----------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Initializes all properties such that we're not querying them directly
+ * during invocation
+ */
+ @PostConstruct
+ public void initialize()
+ {
+ // Get system properties in a secure fashion
+ final Properties props = AccessController.doPrivileged(new PrivilegedAction<Properties>()
+ {
+ @Override
+ public Properties run()
+ {
+ return System.getProperties();
+ }
+ });
+
+ // Eagerly initialize all information
+ jdkVersion = props.getProperty(SYS_PROP_JAVA_VERSION);
+ osName = props.getProperty(SYS_PROP_OS_NAME);
+
+ // Log
+ log.info("Initialized: " + this);
+ }
+}
Added: projects/ejb-book/trunk/ch07-envinfo/src/main/java/org/jboss/ejb3/examples/ch06/envinfo/EnvironmentInformationCommonBusiness.java
===================================================================
--- projects/ejb-book/trunk/ch07-envinfo/src/main/java/org/jboss/ejb3/examples/ch06/envinfo/EnvironmentInformationCommonBusiness.java (rev 0)
+++ projects/ejb-book/trunk/ch07-envinfo/src/main/java/org/jboss/ejb3/examples/ch06/envinfo/EnvironmentInformationCommonBusiness.java 2009-07-05 22:56:34 UTC (rev 90822)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.examples.ch06.envinfo;
+
+/**
+ * EnvironmentInformationCommonBusiness
+ *
+ * Common business interface for beans exposing information
+ * about the current runtime environment (ie. the EJB Container)
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface EnvironmentInformationCommonBusiness
+{
+ // ---------------------------------------------------------------------------||
+ // Contracts -----------------------------------------------------------------||
+ // ---------------------------------------------------------------------------||
+
+ /**
+ * Returns the JDK version of the current runtime
+ */
+ String getJdkVersion();
+
+ /**
+ * Returns the name of the operating system upon which this runtime is hosted
+ *
+ * @return
+ */
+ String getOsName();
+}
Added: projects/ejb-book/trunk/ch07-envinfo/src/test/java/org/jboss/ejb3/examples/ch07/envinfo/EnvironmentInformationTestCaseBase.java
===================================================================
--- projects/ejb-book/trunk/ch07-envinfo/src/test/java/org/jboss/ejb3/examples/ch07/envinfo/EnvironmentInformationTestCaseBase.java (rev 0)
+++ projects/ejb-book/trunk/ch07-envinfo/src/test/java/org/jboss/ejb3/examples/ch07/envinfo/EnvironmentInformationTestCaseBase.java 2009-07-05 22:56:34 UTC (rev 90822)
@@ -0,0 +1,93 @@
+package org.jboss.ejb3.examples.ch07.envinfo;
+
+import junit.framework.Assert;
+
+import org.jboss.ejb3.examples.ch06.envinfo.EnvironmentInformationCommonBusiness;
+import org.jboss.logging.Logger;
+import org.junit.Test;
+
+/**
+ * EnvironmentInformationTestCaseBase
+ *
+ * Base tests for the enviromment information @Singleton
+ * test classes, may be extended either from unit or
+ * integration tests.
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public abstract class EnvironmentInformationTestCaseBase
+{
+
+ //-------------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ private static final Logger log = Logger.getLogger(EnvironmentInformationTestCaseBase.class);
+
+ //-------------------------------------------------------------------------------------||
+ // Instance Members -------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ //-------------------------------------------------------------------------------------||
+ // Lifecycle --------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ //-------------------------------------------------------------------------------------||
+ // Tests ------------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Ensures the JDK Version has been initialized and is available
+ */
+ @Test
+ public void testJdkVersion() throws Exception
+ {
+ // Log
+ log.info("testJdkVersion");
+
+ // Get the environment information bean
+ final EnvironmentInformationCommonBusiness envInfo = this.getEnvInfoBean();
+
+ // Get the JDK Version
+ final String jdkVersion = envInfo.getJdkVersion();
+ log.info("Got JDK Version: " + jdkVersion);
+
+ // Ensure it's been specified/initialized
+ Assert.assertNotNull("JDK Version was either not initialized or is returning null", jdkVersion);
+ }
+
+ /**
+ * Ensures the OS Name has been initialized and is available
+ */
+ @Test
+ public void testOperatingSystemName() throws Exception
+ {
+ // Log
+ log.info("testOperatingSystemName");
+
+ // Get the environment information bean
+ final EnvironmentInformationCommonBusiness envInfo = this.getEnvInfoBean();
+
+ // Get the OS Name
+ final String osName = envInfo.getOsName();
+ log.info("Got OS Name: " + osName);
+
+ // Ensure it's been specified/initialized
+ Assert.assertNotNull("OS Name was either not initialized or is returning null", osName);
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Contracts --------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Obtains the environment information bean to be used for this test
+ */
+ protected abstract EnvironmentInformationCommonBusiness getEnvInfoBean();
+
+ //-------------------------------------------------------------------------------------||
+ // Internal Helper Methods ------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+}
Added: projects/ejb-book/trunk/ch07-envinfo/src/test/java/org/jboss/ejb3/examples/ch07/envinfo/EnvironmentInformationUnitTestCase.java
===================================================================
--- projects/ejb-book/trunk/ch07-envinfo/src/test/java/org/jboss/ejb3/examples/ch07/envinfo/EnvironmentInformationUnitTestCase.java (rev 0)
+++ projects/ejb-book/trunk/ch07-envinfo/src/test/java/org/jboss/ejb3/examples/ch07/envinfo/EnvironmentInformationUnitTestCase.java 2009-07-05 22:56:34 UTC (rev 90822)
@@ -0,0 +1,99 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ejb3.examples.ch07.envinfo;
+
+import org.jboss.ejb3.examples.ch06.envinfo.EnvironmentInformationBean;
+import org.jboss.ejb3.examples.ch06.envinfo.EnvironmentInformationCommonBusiness;
+import org.jboss.logging.Logger;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+
+/**
+ * EnvironmentInformationUnitTestCase
+ *
+ * Unit Tests for the EnvironmentInformationEJB classes,
+ * used as a POJO outside the context of the EJB container
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class EnvironmentInformationUnitTestCase extends EnvironmentInformationTestCaseBase
+{
+
+ //-------------------------------------------------------------------------------------||
+ // Class Members ----------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Logger
+ */
+ private static final Logger log = Logger.getLogger(EnvironmentInformationUnitTestCase.class);
+
+ /**
+ * The bean (POJO) instance to test, mocking a @Singleton EJB
+ */
+ private static EnvironmentInformationCommonBusiness bean;
+
+ //-------------------------------------------------------------------------------------||
+ // Lifecycle --------------------------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /**
+ * Creates a POJO instance to mock the real Container EJB @Singleton
+ * before any tests are run
+ */
+ @BeforeClass
+ public static void createPojo()
+ {
+ // Instanciate and set
+ final EnvironmentInformationBean bean = new EnvironmentInformationBean();
+ EnvironmentInformationUnitTestCase.bean = bean;
+ log.info("Created POJO instance: " + bean);
+
+ // Mock container initialization
+ bean.initialize();
+ }
+
+ /**
+ * Resets the POJO instance to null after all tests are run
+ */
+ @AfterClass
+ public static void clearPojo()
+ {
+ // Set to null so we don't ever leak instances between test runs
+ bean = null;
+ }
+
+ //-------------------------------------------------------------------------------------||
+ // Required Implementations -----------------------------------------------------------||
+ //-------------------------------------------------------------------------------------||
+
+ /* (non-Javadoc)
+ * @see org.jboss.ejb3.examples.ch07.envinfo.EnvironmentInformationTestCaseBase#getEnvInfoBean()
+ */
+ @Override
+ protected EnvironmentInformationCommonBusiness getEnvInfoBean()
+ {
+ return bean;
+ }
+
+}
Added: projects/ejb-book/trunk/ch07-envinfo/src/test/resources/jndi.properties
===================================================================
--- projects/ejb-book/trunk/ch07-envinfo/src/test/resources/jndi.properties (rev 0)
+++ projects/ejb-book/trunk/ch07-envinfo/src/test/resources/jndi.properties 2009-07-05 22:56:34 UTC (rev 90822)
@@ -0,0 +1,4 @@
+# JNDI Properties for Remote interaction with JBoss Application Server Naming Service
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+java.naming.provider.url=jnp://localhost:1099
\ No newline at end of file
Property changes on: projects/ejb-book/trunk/ch07-envinfo/src/test/resources/jndi.properties
___________________________________________________________________
Name: svn:executable
+ *
Added: projects/ejb-book/trunk/ch07-envinfo/src/test/resources/log4j.xml
===================================================================
--- projects/ejb-book/trunk/ch07-envinfo/src/test/resources/log4j.xml (rev 0)
+++ projects/ejb-book/trunk/ch07-envinfo/src/test/resources/log4j.xml 2009-07-05 22:56:34 UTC (rev 90822)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!-- Log4j Configuration -->
+<!-- ===================================================================== -->
+
+<!--
+ | For more configuration infromation and examples see the Jakarta Log4j
+ | website: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <!-- ============================== -->
+ <!-- Append messages to the console -->
+ <!-- ============================== -->
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out"/>
+ <param name="Threshold" value="INFO"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
+ </layout>
+ </appender>
+
+
+ <!-- ================ -->
+ <!-- Limit categories -->
+ <!-- ================ -->
+
+ <category name="org.jboss.ejb3.examples">
+ <priority value="ALL"/>
+ </category>
+
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root>
+ <appender-ref ref="CONSOLE"/>
+ </root>
+
+</log4j:configuration>
Property changes on: projects/ejb-book/trunk/ch07-envinfo/src/test/resources/log4j.xml
___________________________________________________________________
Name: svn:executable
+ *
Modified: projects/ejb-book/trunk/pom.xml
===================================================================
--- projects/ejb-book/trunk/pom.xml 2009-07-05 19:14:17 UTC (rev 90821)
+++ projects/ejb-book/trunk/pom.xml 2009-07-05 22:56:34 UTC (rev 90822)
@@ -18,6 +18,7 @@
<module>ch04-firstejb</module>
<module>ch05-encryption</module>
<module>ch06-filetransfer</module>
+ <module>ch07-envinfo</module>
</modules>
</project>
More information about the jboss-cvs-commits
mailing list