Seam SVN: r7466 - trunk/ui/src/main/java/org/jboss/seam/ui/facelet.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-02-22 02:52:48 -0500 (Fri, 22 Feb 2008)
New Revision: 7466
Modified:
trunk/ui/src/main/java/org/jboss/seam/ui/facelet/FaceletsJBossLogging.java
Log:
fix build
Modified: trunk/ui/src/main/java/org/jboss/seam/ui/facelet/FaceletsJBossLogging.java
===================================================================
--- trunk/ui/src/main/java/org/jboss/seam/ui/facelet/FaceletsJBossLogging.java 2008-02-22 01:51:38 UTC (rev 7465)
+++ trunk/ui/src/main/java/org/jboss/seam/ui/facelet/FaceletsJBossLogging.java 2008-02-22 07:52:48 UTC (rev 7466)
@@ -14,7 +14,7 @@
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.Startup;
import org.jboss.seam.annotations.intercept.BypassInterceptors;
-import org.jboss.seam.interop.jul.Log4JConversionFilter;
+//import org.jboss.seam.interop.jul.Log4JConversionFilter;
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
import org.jboss.seam.util.Reflections;
@@ -68,10 +68,10 @@
@Create
public void create()
{
- Filter conversionFilter;
+ Filter conversionFilter = null;
try
{
- conversionFilter = new Log4JConversionFilter();
+ //conversionFilter = new Log4JConversionFilter();
}
catch (Exception e)
{
16 years, 10 months
Seam SVN: r7465 - branches/Seam_2_0/doc/Seam_Reference_Guide.
by seam-commits@lists.jboss.org
Author: skittoli(a)redhat.com
Date: 2008-02-21 20:51:38 -0500 (Thu, 21 Feb 2008)
New Revision: 7465
Modified:
branches/Seam_2_0/doc/Seam_Reference_Guide/build.xml
Log:
updates
Modified: branches/Seam_2_0/doc/Seam_Reference_Guide/build.xml
===================================================================
--- branches/Seam_2_0/doc/Seam_Reference_Guide/build.xml 2008-02-22 00:36:53 UTC (rev 7464)
+++ branches/Seam_2_0/doc/Seam_Reference_Guide/build.xml 2008-02-22 01:51:38 UTC (rev 7465)
@@ -39,7 +39,7 @@
description="Compile documentation for all languages and all formats.">
<!-- TRANSLATOR: Duplicate this line for your language -->
- <antcall target="lang.all"><param name="lang" value="en"/></antcall>
+ <antcall target="lang.all"><param name="lang" value="en-US"/></antcall>
</target>
16 years, 10 months
Seam SVN: r7462 - trunk/build.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-02-20 08:34:03 -0500 (Wed, 20 Feb 2008)
New Revision: 7462
Modified:
trunk/build/classpath.tmpl
Log:
Not a binary file
Property changes on: trunk/build/classpath.tmpl
___________________________________________________________________
Name: svn:mime-type
- application/octet-stream
16 years, 10 months
Seam SVN: r7461 - trunk/build.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-02-20 08:32:06 -0500 (Wed, 20 Feb 2008)
New Revision: 7461
Modified:
trunk/build/classpath.tmpl
Log:
oops
Modified: trunk/build/classpath.tmpl
===================================================================
(Binary files differ)
16 years, 10 months
Seam SVN: r7460 - trunk/src/interop.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-02-20 08:28:51 -0500 (Wed, 20 Feb 2008)
New Revision: 7460
Added:
trunk/src/interop/jbas5/
Log:
actuually move interop
Copied: trunk/src/interop/jbas5 (from rev 7392, trunk/src/jbas5)
16 years, 10 months
Seam SVN: r7459 - in trunk: build and 10 other directories.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-02-20 08:03:05 -0500 (Wed, 20 Feb 2008)
New Revision: 7459
Added:
trunk/build/jul.pom.xml
trunk/src/interop/
trunk/src/interop/jul/
trunk/src/interop/jul/org/
trunk/src/interop/jul/org/jboss/
trunk/src/interop/jul/org/jboss/seam/
trunk/src/interop/jul/org/jboss/seam/interop/
trunk/src/interop/jul/org/jboss/seam/interop/jul/
trunk/src/interop/jul/org/jboss/seam/interop/jul/Log4JConversionFilter.java
Removed:
trunk/src/jbas5/
trunk/ui/src/main/java/org/jboss/seam/ui/facelet/Log4JConversionFilter.java
Modified:
trunk/build.xml
trunk/build/build.xml
trunk/build/ci.build.xml
trunk/build/classpath.tmpl
trunk/build/common.build.xml
trunk/build/root.pom.xml
trunk/build/ui.pom.xml
trunk/doc/reference/en/modules/configuration.xml
trunk/ui/src/main/java/org/jboss/seam/ui/facelet/FaceletsJBossLogging.java
Log:
Need our own LoggerConversionFilter as the one in 4.2 needs JBAS-4432 fixed, and move jbas5 to src/interop
Modified: trunk/build/build.xml
===================================================================
--- trunk/build/build.xml 2008-02-20 13:00:55 UTC (rev 7458)
+++ trunk/build/build.xml 2008-02-20 13:03:05 UTC (rev 7459)
@@ -40,7 +40,8 @@
<deployWithSources pom="${pdf.pom}" jar="${lib.dir}/jboss-seam-pdf.jar" repositoryId="offline.repository.jboss.org" srcjar="${lib.dir}/src/jboss-seam-pdf-sources.jar"/>
<deployWithSources pom="${remoting.pom}" jar="${lib.dir}/jboss-seam-remoting.jar" repositoryId="offline.repository.jboss.org" srcjar="${lib.dir}/src/jboss-seam-remoting-sources.jar"/>
<deployWithSources pom="${ui.pom}" jar="${lib.dir}/jboss-seam-ui.jar" repositoryId="offline.repository.jboss.org" srcjar="${lib.dir}/src/jboss-seam-ui-sources.jar"/>
- <deployWithSources pom="${jbas5.pom}" jar="${lib.dir}/jboss-seam-jbas5.jar" repositoryId="offline.repository.jboss.org" srcjar="${lib.dir}/src/jboss-seam-jbas5-sources.jar"/>
+ <deployWithSources pom="${jbas5.pom}" jar="${lib.dir}/interop/jboss-seam-jbas5.jar" repositoryId="offline.repository.jboss.org" srcjar="${lib.dir}/src/interop/jboss-seam-jbas5-sources.jar"/>
+ <deployWithSources pom="${jul.pom}" jar="${lib.dir}/interop/jboss-seam-jul.jar" repositoryId="offline.repository.jboss.org" srcjar="${lib.dir}/src/interop/jboss-seam-jul-sources.jar"/>
<deployExample name="booking" repositoryId="offline.repository.jboss.org"/>
<deployExampleNoDs name="numberguess" repositoryId="offline.repository.jboss.org"/>
<deployExample name="dvd" path="${seam.dir}/examples/dvdstore" repositoryId="offline.repository.jboss.org"/>
Modified: trunk/build/ci.build.xml
===================================================================
--- trunk/build/ci.build.xml 2008-02-20 13:00:55 UTC (rev 7458)
+++ trunk/build/ci.build.xml 2008-02-20 13:03:05 UTC (rev 7459)
@@ -21,6 +21,7 @@
<deploySnapshot pom="${core.pom}" jar="${lib.dir}/jboss-seam.jar" srcjar="${lib.dir}/src/jboss-seam-sources.jar" />
<deploySnapshot pom="${debug.pom}" jar="${lib.dir}/jboss-seam-debug.jar" srcjar="${lib.dir}/src/jboss-seam-debug-sources.jar"/>
<deploySnapshot pom="${jbas5.pom}" jar="${lib.dir}/interop/jboss-seam-jbas5.jar" srcjar="${lib.dir}/interop/src/jboss-seam-jbas5-sources.jar"/>
+ <deploySnapshot pom="${jul.pom}" jar="${lib.dir}/interop/jboss-seam-jul.jar" srcjar="${lib.dir}/interop/src/jboss-seam-jul-sources.jar"/>
<deploySnapshot pom="${wicket.pom}" jar="${lib.dir}/jboss-seam-wicket.jar" srcjar="${lib.dir}/src/jboss-seam-wicket-sources.jar"/>
<deploySnapshot pom="${gen.pom}" jar="${lib.dir}/jboss-seam-gen.jar" srcjar="${lib.dir}/src/jboss-seam-gen-sources.jar"/>
<deploySnapshot pom="${ioc.pom}" jar="${lib.dir}/jboss-seam-ioc.jar" srcjar="${lib.dir}/src/jboss-seam-ioc-sources.jar"/>
Modified: trunk/build/classpath.tmpl
===================================================================
(Binary files differ)
Modified: trunk/build/common.build.xml
===================================================================
--- trunk/build/common.build.xml 2008-02-20 13:00:55 UTC (rev 7458)
+++ trunk/build/common.build.xml 2008-02-20 13:03:05 UTC (rev 7459)
@@ -96,6 +96,7 @@
<pomfile name="debug.pom" value="${build.dir}/debug.pom.xml" />
<pomfile name="wicket.pom" value="${build.dir}/wicket.pom.xml" />
<pomfile name="jbas5.pom" value="${build.dir}/jbas5.pom.xml" />
+ <pomfile name="jul.pom" value="${build.dir}/jul.pom.xml" />
<pomfile name="gen.pom" value="${build.dir}/gen.pom.xml" />
<pomfile name="ioc.pom" value="${build.dir}/ioc.pom.xml" />
<pomfile name="mail.pom" value="${build.dir}/mail.pom.xml" />
@@ -333,6 +334,7 @@
<outputDependencyReport module="ioc" />
<outputDependencyReport module="wicket" />
<outputDependencyReport module="jbas5" />
+ <outputDependencyReport module="jul" />
<echo>Dependency Report written to ${seam.dir}/dependency-report.txt</echo>
</target>
Added: trunk/build/jul.pom.xml
===================================================================
--- trunk/build/jul.pom.xml (rev 0)
+++ trunk/build/jul.pom.xml 2008-02-20 13:03:05 UTC (rev 7459)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-jul</artifactId>
+ <parent>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>parent</artifactId>
+ <version>@seam.version@</version>
+ </parent>
+ <description>JUL -> Log4J conversion filter, used by Seam UI to instrument Facelets Logger</description>
+
+ <!-- See parent pom for notes on how to declare dependencies -->
+
+ <dependencies>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
+ </dependencies>
+
+</project>
\ No newline at end of file
Property changes on: trunk/build/jul.pom.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/build/root.pom.xml
===================================================================
--- trunk/build/root.pom.xml 2008-02-20 13:00:55 UTC (rev 7458)
+++ trunk/build/root.pom.xml 2008-02-20 13:03:05 UTC (rev 7459)
@@ -109,6 +109,12 @@
<artifactId>jboss-seam-debug</artifactId>
<version>@seam.version@</version>
</dependency>
+
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-jul</artifactId>
+ <version>@seam.version@</version>
+ </dependency>
<dependency>
<groupId>javax.servlet</groupId>
Modified: trunk/build/ui.pom.xml
===================================================================
--- trunk/build/ui.pom.xml 2008-02-20 13:00:55 UTC (rev 7458)
+++ trunk/build/ui.pom.xml 2008-02-20 13:03:05 UTC (rev 7459)
@@ -79,6 +79,11 @@
<groupId>org.jboss.seam</groupId>
<artifactId>jboss-seam</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>org.jboss.seam</groupId>
+ <artifactId>jboss-seam-jul</artifactId>
+ </dependency>
<dependency>
<groupId>antlr</groupId>
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2008-02-20 13:00:55 UTC (rev 7458)
+++ trunk/build.xml 2008-02-20 13:03:05 UTC (rev 7459)
@@ -20,6 +20,7 @@
<property name="classes.debug.dir" value="${classes.dir}/debugclasses" />
<property name="classes.wicket.dir" value="${classes.dir}/wicketclasses" />
<property name="classes.jbas5.dir" value="${classes.dir}/jbas5classes" />
+ <property name="classes.jul.dir" value="${classes.dir}/julclasses" />
<property name="classes.remoting.dir" value="${classes.dir}/remotingclasses" />
<property name="classes.gen.dir" value="${classes.dir}/genclasses" />
<property name="classes.test.dir" value="${classes.dir}/testclasses" />
@@ -35,7 +36,8 @@
<property name="src.mail.dir" value="src/mail" />
<property name="src.debug.dir" value="src/debug" />
<property name="src.wicket.dir" value="src/wicket" />
- <property name="src.jbas5.dir" value="src/jbas5" />
+ <property name="src.jbas5.dir" value="src/interop/jbas5" />
+ <property name="src.jul.dir" value="src/interop/jul" />
<property name="src.gen.dir" value="src/gen" />
<property name="src.remoting.dir" value="src/remoting" />
<property name="src.test.dir" value="src/test" />
@@ -67,7 +69,8 @@
<property name="dist.src.mail.dir" value="${dist.dir}/src/mail" />
<property name="dist.src.debug.dir" value="${dist.dir}/src/debug" />
<property name="dist.src.wicket.dir" value="${dist.dir}/src/wicket" />
- <property name="dist.src.jbas5.dir" value="${dist.dir}/src/jbas5" />
+ <property name="dist.src.jbas5.dir" value="${dist.dir}/src/interop/jbas5" />
+ <property name="dist.src.jbas5.dir" value="${dist.dir}/src/interop/jul" />
<property name="dist.src.gen.dir" value="${dist.dir}/src/gen" />
<property name="dist.src.remoting.dir" value="${dist.dir}/src/remoting" />
<property name="dist.src.test.dir" value="${dist.dir}/src/test" />
@@ -156,7 +159,7 @@
<delete dir="${lib.dir}" quiet="${quietclean}" />
</target>
- <target name="build" depends="jarcore,jarpdf,jarioc,jarmail,jarremoting,jardebug,jargen,jarui,jarjbas5,jarwicket" description="Build all distribution .jar files" />
+ <target name="build" depends="jarcore,jarpdf,jarioc,jarmail,jarremoting,jardebug,jargen,jarui,jarjbas5,jarwicket, jarjul" description="Build all distribution .jar files" />
<target name="select-compiler">
<available classname="org.eclipse.jdt.core.JDTCompilerAdapter" property="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter" />
@@ -278,7 +281,21 @@
<target name="jarjbas5" depends="compilejbas5" description="Build the distribution .jar file for the JBAS5 integration package">
<archive classesdir="${classes.jbas5.dir}" module="jboss-seam-jbas5" pom="${jbas5.pom}" srcdir="${src.jbas5.dir}" outputdir="${lib.dir}/interop" />
</target>
+
+ <!-- ########################### JUL TARGETS ###########################-->
+ <target name="initjul" depends="init, jarcore">
+ <init classesdir="${classes.jul.dir}" srcdir="${src.jul.dir}" modulename="jul" pom="${jul.pom}" />
+ </target>
+
+ <target name="compilejul" depends="initjul, select-compiler">
+ <compile classesdir="${classes.jul.dir}" srcdir="${src.jul.dir}" classpath="compile.jul.path" />
+ </target>
+
+ <target name="jarjul" depends="compilejul" description="Build the distribution .jar file for the JUL -> Log4J bridge integration package">
+ <archive classesdir="${classes.jul.dir}" module="jboss-seam-jul" pom="${jul.pom}" srcdir="${src.jul.dir}" outputdir="${lib.dir}/interop" />
+ </target>
+
<!-- ########################### GEN TARGETS ###########################-->
<target name="initgen" depends="init">
@@ -310,7 +327,7 @@
<!-- ########################### UI TARGETS ###########################-->
- <target name="initui" depends="init, jarcore">
+ <target name="initui" depends="init, jarcore, jarjul">
<dependencies id="ui" scope="compile" pom="${ui.pom}" />
</target>
@@ -451,6 +468,7 @@
<copysource destdir="${dist.src.debug.dir}" srcdir="${src.debug.dir}" />
<copysource destdir="${dist.src.wicket.dir}" srcdir="${src.wicket.dir}" />
<copysource destdir="${dist.src.jbas5.dir}" srcdir="${src.jbas5.dir}" />
+ <copysource destdir="${dist.src.jul.dir}" srcdir="${src.jul.dir}" />
<copysource destdir="${dist.src.gen.dir}" srcdir="${src.gen.dir}" />
<copysource destdir="${dist.src.test.dir}" srcdir="${src.test.dir}" />
@@ -927,6 +945,7 @@
<dependenciesWithSources id="debug" scope="compile" pom="${debug.pom}" />
<dependenciesWithSources id="wicket" scope="compile" pom="${wicket.pom}" />
<dependenciesWithSources id="jbas5" scope="compile" pom="${jbas5.pom}" />
+ <dependenciesWithSources id="jul" scope="compile" pom="${jul.pom}" />
<dependenciesWithSources id="gen" scope="compile" pom="${gen.pom}" />
<dependenciesWithSources id="ioc" scope="compile" pom="${ioc.pom}" />
<dependenciesWithSources id="mail" scope="compile" pom="${mail.pom}" />
@@ -956,6 +975,7 @@
<dependencies id="debug" scope="compile" pom="${debug.pom}" />
<dependencies id="wicket" scope="compile" pom="${wicket.pom}" />
<dependencies id="jbas5" scope="compile" pom="${jbas5.pom}" />
+ <dependencies id="jul" scope="compile" pom="${jul.pom}" />
<dependencies id="gen" scope="compile" pom="${gen.pom}" />
<dependencies id="ioc" scope="compile" pom="${ioc.pom}" />
<dependencies id="mail" scope="compile" pom="${mail.pom}" />
@@ -972,6 +992,7 @@
<path refid="compile.remoting.path" />
<path refid="compile.ui.path" />
<path refid="compile.jbas5.path" />
+ <path refid="compile.jul.path" />
<path refid="compile.wicket.path" />
</eclipseClasspath>
</target>
Modified: trunk/doc/reference/en/modules/configuration.xml
===================================================================
--- trunk/doc/reference/en/modules/configuration.xml 2008-02-20 13:00:55 UTC (rev 7458)
+++ trunk/doc/reference/en/modules/configuration.xml 2008-02-20 13:03:05 UTC (rev 7459)
@@ -65,6 +65,15 @@
<param-value>.xhtml</param-value>
</context-param>]]></programlisting>
+ <para>
+ If you are using facelets in JBoss AS, you'll find that facelets
+ logging is broken. Seam provides a bridge to fix this, to use it
+ copy <literal>lib/interop/jboss-seam-jul.jar</literal> to
+ <literal>$JBOSS_HOME/server/default/deploy/jboss-web.deployer/jsf-libs/</literal>
+ and include the <literal>jboss-seam-ui.jar</literal> in the
+ <literal>WEB-INF/lib</literal> of your application.
+ </para>
+
</sect2>
<sect2>
Added: trunk/src/interop/jul/org/jboss/seam/interop/jul/Log4JConversionFilter.java
===================================================================
--- trunk/src/interop/jul/org/jboss/seam/interop/jul/Log4JConversionFilter.java (rev 0)
+++ trunk/src/interop/jul/org/jboss/seam/interop/jul/Log4JConversionFilter.java 2008-02-20 13:03:05 UTC (rev 7459)
@@ -0,0 +1,173 @@
+/*
+ * 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.seam.interop.jul;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.logging.Filter;
+import java.util.logging.Formatter;
+import java.util.logging.Level;
+import java.util.logging.LogRecord;
+import java.util.logging.SimpleFormatter;
+
+import org.apache.log4j.Logger;
+
+/**
+ * This filter is used to convert java.util.logging messages from the JUL
+ * to Log4J messages.
+ *
+ * You need to install it onto any JUL Logger which needs bridging
+ * using logger.setFilter();
+ *
+ * @author Stan Silvert
+ * @author Pete Muir
+ */
+public class Log4JConversionFilter implements Filter
+{
+
+ // cache Logger instances. Logger.getLogger() is known to be slow.
+ // See http://www.qos.ch/logging/thinkAgain.jsp
+ private Map<String, Logger> loggerCache = new HashMap<String, Logger>();
+
+ private Formatter formatter = new SimpleFormatter();
+
+ /**
+ * If the JSF RI message should be logged, convert the JDK 1.4
+ * LogRecord to a Log4J message.
+ *
+ * @return <code>false</code> because JDK 1.4 logging should not happen
+ * for JSF if this filter is active.
+ */
+ public boolean isLoggable(LogRecord record)
+ {
+
+ Logger logger = getLogger(record);
+
+ if (record.getThrown() != null)
+ {
+ logWithThrowable(logger, record);
+ }
+ else
+ {
+ logWithoutThrowable(logger, record);
+ }
+
+ return false;
+ }
+
+ private void logWithThrowable(Logger logger, LogRecord record)
+ {
+ int loggedLevel = record.getLevel().intValue();
+ Object message = formatter.formatMessage(record);
+ Throwable throwable = record.getThrown();
+
+ if (loggedLevel == Level.SEVERE.intValue())
+ {
+ logger.error(message, throwable);
+ return;
+ }
+
+ if (loggedLevel == Level.WARNING.intValue())
+ {
+ logger.warn(message, throwable);
+ return;
+ }
+
+ if ((loggedLevel == Level.INFO.intValue()) ||
+ (loggedLevel == Level.CONFIG.intValue()))
+ {
+ logger.info(message, throwable);
+ return;
+ }
+
+ if (loggedLevel == Level.FINE.intValue())
+ {
+ logger.debug(message, throwable);
+ return;
+ }
+
+ if ((loggedLevel == Level.FINER.intValue()) ||
+ (loggedLevel == Level.FINEST.intValue()))
+ {
+ logger.trace(message, throwable);
+ return;
+ }
+
+ logger.info(message, throwable);
+ }
+
+ private void logWithoutThrowable(Logger logger, LogRecord record)
+ {
+ int loggedLevel = record.getLevel().intValue();
+ Object message = formatter.formatMessage(record);
+
+ if (loggedLevel == Level.SEVERE.intValue())
+ {
+ logger.error(message);
+ return;
+ }
+
+ if (loggedLevel == Level.WARNING.intValue())
+ {
+ logger.warn(message);
+ return;
+ }
+
+ if ((loggedLevel == Level.INFO.intValue()) ||
+ (loggedLevel == Level.CONFIG.intValue()))
+ {
+ logger.info(message);
+ return;
+ }
+
+ if (loggedLevel == Level.FINE.intValue())
+ {
+ logger.debug(message);
+ return;
+ }
+
+ if ((loggedLevel == Level.FINER.intValue()) ||
+ (loggedLevel == Level.FINEST.intValue()))
+ {
+ logger.trace(message);
+ return;
+ }
+
+ logger.info(message);
+ }
+
+ // get the Log4J logger corresponding to the java.util.logger.LogRecord
+ private Logger getLogger(LogRecord record)
+ {
+ String loggerName = record.getLoggerName();
+ Logger logger = loggerCache.get(loggerName);
+ if (logger == null)
+ {
+ logger = Logger.getLogger(loggerName);
+ loggerCache.put(loggerName, logger);
+ }
+
+ return logger;
+ }
+
+}
Property changes on: trunk/src/interop/jul/org/jboss/seam/interop/jul/Log4JConversionFilter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/ui/src/main/java/org/jboss/seam/ui/facelet/FaceletsJBossLogging.java
===================================================================
--- trunk/ui/src/main/java/org/jboss/seam/ui/facelet/FaceletsJBossLogging.java 2008-02-20 13:00:55 UTC (rev 7458)
+++ trunk/ui/src/main/java/org/jboss/seam/ui/facelet/FaceletsJBossLogging.java 2008-02-20 13:03:05 UTC (rev 7459)
@@ -14,6 +14,7 @@
import org.jboss.seam.annotations.Scope;
import org.jboss.seam.annotations.Startup;
import org.jboss.seam.annotations.intercept.BypassInterceptors;
+import org.jboss.seam.interop.jul.Log4JConversionFilter;
import org.jboss.seam.log.LogProvider;
import org.jboss.seam.log.Logging;
import org.jboss.seam.util.Reflections;
@@ -67,9 +68,19 @@
@Create
public void create()
{
+ Filter conversionFilter;
try
{
- Filter conversionFilter = new org.jboss.seam.ui.facelet.Log4JConversionFilter();
+ conversionFilter = new Log4JConversionFilter();
+ }
+ catch (Exception e)
+ {
+ // Filter isn't installed in the container
+ return;
+ }
+ try
+ {
+
java.util.logging.Logger julLogger;
Deleted: trunk/ui/src/main/java/org/jboss/seam/ui/facelet/Log4JConversionFilter.java
===================================================================
--- trunk/ui/src/main/java/org/jboss/seam/ui/facelet/Log4JConversionFilter.java 2008-02-20 13:00:55 UTC (rev 7458)
+++ trunk/ui/src/main/java/org/jboss/seam/ui/facelet/Log4JConversionFilter.java 2008-02-20 13:03:05 UTC (rev 7459)
@@ -1,167 +0,0 @@
-/*
- * 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.seam.ui.facelet;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.logging.Filter;
-import java.util.logging.Formatter;
-import java.util.logging.Level;
-import java.util.logging.LogRecord;
-import java.util.logging.SimpleFormatter;
-import org.jboss.logging.Logger;
-
-/**
- * This filter is used to convert java.util.logging messages to Log4J messages.
- *
- * @author Stan Silvert
- * @author Pete Muir
- */
-public class Log4JConversionFilter implements Filter
-{
-
- // cache Logger instances. Logger.getLogger() is known to be slow.
- // See http://www.qos.ch/logging/thinkAgain.jsp
- private Map<String, Logger> loggerCache = new HashMap<String, Logger>();
-
- private Formatter formatter = new SimpleFormatter();
-
- /**
- * If the message should be logged, convert the JDK 1.4
- * LogRecord to a Log4J message.
- *
- * @return <code>false</code> because JDK 1.4 logging should not happen
- * for JSF if this filter is active.
- */
- public boolean isLoggable(LogRecord record)
- {
- Logger logger = getLogger(record);
-
- if (record.getThrown() != null)
- {
- logWithThrowable(logger, record);
- }
- else
- {
- logWithoutThrowable(logger, record);
- }
-
- return false;
- }
-
- private void logWithThrowable(Logger logger, LogRecord record)
- {
- int loggedLevel = record.getLevel().intValue();
- Object message = formatter.formatMessage(record);
- Throwable throwable = record.getThrown();
-
- if (loggedLevel == Level.SEVERE.intValue())
- {
- logger.error(message, throwable);
- return;
- }
-
- if (loggedLevel == Level.WARNING.intValue())
- {
- logger.warn(message, throwable);
- return;
- }
-
- if ((loggedLevel == Level.INFO.intValue()) ||
- (loggedLevel == Level.CONFIG.intValue()))
- {
- logger.info(message, throwable);
- return;
- }
-
- if (loggedLevel == Level.FINE.intValue())
- {
- logger.debug(message, throwable);
- return;
- }
-
- if ((loggedLevel == Level.FINER.intValue()) ||
- (loggedLevel == Level.FINEST.intValue()))
- {
- logger.trace(message, throwable);
- return;
- }
-
- logger.info(message, throwable);
- }
-
- private void logWithoutThrowable(Logger logger, LogRecord record)
- {
- int loggedLevel = record.getLevel().intValue();
- Object message = formatter.formatMessage(record);
-
- if (loggedLevel == Level.SEVERE.intValue())
- {
- logger.error(message);
- return;
- }
-
- if (loggedLevel == Level.WARNING.intValue())
- {
- logger.warn(message);
- return;
- }
-
- if ((loggedLevel == Level.INFO.intValue()) ||
- (loggedLevel == Level.CONFIG.intValue()))
- {
- logger.info(message);
- return;
- }
-
- if (loggedLevel == Level.FINE.intValue())
- {
- logger.debug(message);
- return;
- }
-
- if ((loggedLevel == Level.FINER.intValue()) ||
- (loggedLevel == Level.FINEST.intValue()))
- {
- logger.trace(message);
- return;
- }
-
- logger.info(message);
- }
-
- // get the Log4J logger corresponding to the java.util.logger.LogRecord
- private Logger getLogger(LogRecord record)
- {
- String loggerName = record.getLoggerName();
- Logger logger = loggerCache.get(loggerName);
- if (logger == null)
- {
- logger = Logger.getLogger(loggerName);
- loggerCache.put(loggerName, logger);
- }
-
- return logger;
- }
-
-}
16 years, 10 months
Seam SVN: r7458 - trunk/examples/ui.
by seam-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2008-02-20 08:00:55 -0500 (Wed, 20 Feb 2008)
New Revision: 7458
Modified:
trunk/examples/ui/
Log:
ignores
Property changes on: trunk/examples/ui
___________________________________________________________________
Name: svn:ignore
+ dist
exploded-archives
16 years, 10 months
Seam SVN: r7457 - in trunk/examples/wiki: view/themes/sfwkorg/mailtemplates and 1 other directory.
by seam-commits@lists.jboss.org
Author: christian.bauer(a)jboss.com
Date: 2008-02-20 04:39:39 -0500 (Wed, 20 Feb 2008)
New Revision: 7457
Modified:
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java
trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java
trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReplyToList.xhtml
trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyTopicToList.xhtml
Log:
JBSEAM-2653, creation time should be persist() time
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java 2008-02-19 23:50:09 UTC (rev 7456)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/DocumentHome.java 2008-02-20 09:39:39 UTC (rev 7457)
@@ -129,9 +129,6 @@
syncFormContentToInstance(getParentNode());
syncLinks();
- // Set createdOn date _now_
- getInstance().setCreatedOn(new Date());
-
// Make a copy
historicalCopy = new WikiDocument();
historicalCopy.flatCopy(getInstance(), true);
Modified: trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java
===================================================================
--- trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java 2008-02-19 23:50:09 UTC (rev 7456)
+++ trunk/examples/wiki/src/main/org/jboss/seam/wiki/core/action/NodeHome.java 2008-02-20 09:39:39 UTC (rev 7457)
@@ -211,13 +211,12 @@
getLog().trace("linking new node with its parent node: " + getParentNode());
getInstance().setParent(getParentNode());
+ // Creation metadata
+ setCreatedMetadata();
+
// Wiki name conversion
setWikiName();
- // Set created by user
- getLog().trace("setting created by user: " + getCurrentUser());
- getInstance().setCreatedBy(getCurrentUser());
-
// Set its area number (if subclass didn't already set it)
if (getInstance().getAreaNumber() == null)
getInstance().setAreaNumber(getInstance().getParent().getAreaNumber());
@@ -241,7 +240,7 @@
if (!prepareUpdate()) return null;
- // Last modified metadata
+ // Modification metadata
setLastModifiedMetadata();
// Wiki name conversion
@@ -328,9 +327,15 @@
getInstance().setWikiname(WikiUtil.convertToWikiName(getInstance().getName()));
}
+ protected void setCreatedMetadata() {
+ getLog().trace("setting created metadata");
+ getInstance().setCreatedBy(getCurrentUser());
+ getInstance().setCreatedOn(new Date());
+ }
+
protected void setLastModifiedMetadata() {
getLog().trace("setting last modified metadata");
- getInstance().setLastModifiedBy(currentUser);
+ getInstance().setLastModifiedBy(getCurrentUser());
getInstance().setLastModifiedOn(new Date());
}
Modified: trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReplyToList.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReplyToList.xhtml 2008-02-19 23:50:09 UTC (rev 7456)
+++ trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyReplyToList.xhtml 2008-02-20 09:39:39 UTC (rev 7457)
@@ -14,7 +14,7 @@
<m:header name="From" value="#{replyHome.instance.createdBy.fullname} <do-not-reply(a)jboss.com>"/>
<m:to name="SeamFramework.org Forums List">#{preferences.get('Forum').notificationMailingList}</m:to>
- <m:subject>[SeamFramework.org Forums] #{replyHome.instance.subject}</m:subject>
+ <m:subject>#{replyHome.instance.subject}</m:subject>
<m:body>
<html>
@@ -38,6 +38,7 @@
<hr/>
<h:outputLink value="#{wikiURLRenderer.renderURL(replyHome.instance)}">Click here</h:outputLink> to reply...
+ <br/>
</body>
</html>
Modified: trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyTopicToList.xhtml
===================================================================
--- trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyTopicToList.xhtml 2008-02-19 23:50:09 UTC (rev 7456)
+++ trunk/examples/wiki/view/themes/sfwkorg/mailtemplates/forumNotifyTopicToList.xhtml 2008-02-20 09:39:39 UTC (rev 7457)
@@ -11,7 +11,7 @@
<m:header name="From" value="#{topicHome.instance.createdBy.fullname} <do-not-reply(a)jboss.com>"/>
<m:to name="SeamFramework.org Forums List">#{preferences.get('Forum').notificationMailingList}</m:to>
- <m:subject>[SeamFramework.org Forums] #{topicHome.instance.name}</m:subject>
+ <m:subject>#{topicHome.instance.name}</m:subject>
<m:body>
<html>
@@ -34,6 +34,7 @@
<hr/>
<h:outputLink value="#{wikiURLRenderer.renderURL(topicHome.instance)}">Click here</h:outputLink> to reply...
+ <br/>
</body>
</html>
16 years, 10 months
Seam SVN: r7456 - trunk/examples.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-02-19 18:50:09 -0500 (Tue, 19 Feb 2008)
New Revision: 7456
Modified:
trunk/examples/build.xml
Log:
remoting lib needed for compile
Modified: trunk/examples/build.xml
===================================================================
--- trunk/examples/build.xml 2008-02-19 23:43:13 UTC (rev 7455)
+++ trunk/examples/build.xml 2008-02-19 23:50:09 UTC (rev 7456)
@@ -436,7 +436,6 @@
<include name="jboss-seam-wicket.jar" />
<exclude name="jboss-seam-debug.jar" />
<exclude name="jboss-seam-ui.jar" />
- <exclude name="jboss-seam-remoting.jar" />
<exclude name="jboss-seam-mail.jar" />
<exclude name="jboss-seam-pdf.jar" />
</fileset>
16 years, 10 months
Seam SVN: r7455 - in trunk/examples/groovybooking: resources and 1 other directories.
by seam-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2008-02-19 18:43:13 -0500 (Tue, 19 Feb 2008)
New Revision: 7455
Removed:
trunk/examples/groovybooking/resources/security.drl
Modified:
trunk/examples/groovybooking/
trunk/examples/groovybooking/resources/WEB-INF/components.xml
Log:
no rules file required
Property changes on: trunk/examples/groovybooking
___________________________________________________________________
Name: svn:ignore
+ dist
exploded-archives
Modified: trunk/examples/groovybooking/resources/WEB-INF/components.xml
===================================================================
--- trunk/examples/groovybooking/resources/WEB-INF/components.xml 2008-02-19 23:39:38 UTC (rev 7454)
+++ trunk/examples/groovybooking/resources/WEB-INF/components.xml 2008-02-19 23:43:13 UTC (rev 7455)
@@ -26,14 +26,9 @@
<persistence:entity-manager-factory name="groovyEntityManagerFactory"
persistence-unit-name="groovy"/>
-
- <drools:rule-base name="securityRules">
- <drools:rule-files><value>/security.drl</value></drools:rule-files>
- </drools:rule-base>
-
+
<security:identity authenticate-method="#{authenticator.authenticate}"
- security-rules="#{securityRules}"
- remember-me="true"/>
+ remember-me="true"/>
<event type="org.jboss.seam.security.notLoggedIn">
<action execute="#{redirect.captureCurrentView}"/>
Deleted: trunk/examples/groovybooking/resources/security.drl
===================================================================
(Binary files differ)
16 years, 10 months