1 Reply Latest reply on Dec 8, 2008 4:49 AM by Krzysztof Baranski

    Using TCLFilter with JBoss 4.2.2

    Krzysztof Baranski Newbie

      I'm trying to configure log4j appender with org.jboss.logging.filter.TCLFilter. My appender definition looks like that:

       <appender name="FILE2" class="org.jboss.logging.appender.DailyRollingFileAppender">
       <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
       <param name="File" value="${jboss.server.log.dir}/server2.log"/>
       <param name="Append" value="false"/>
       <param name="DatePattern" value="'.'yyyy-MM-dd"/>
       <layout class="org.apache.log4j.PatternLayout">
       <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
       </layout>
      
       <filter class="org.jboss.logging.filter.TCLFilter">
       <param name="AcceptOnMatch" value="true"/>
       <param name="DeployURL" value="appname1.ear"/>
       </filter>
       </appender>
      
       <appender name="FILE3" class="org.jboss.logging.appender.DailyRollingFileAppender">
       <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
       <param name="File" value="${jboss.server.log.dir}/server3.log"/>
       <param name="Append" value="false"/>
       <param name="DatePattern" value="'.'yyyy-MM-dd"/>
       <layout class="org.apache.log4j.PatternLayout">
       <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
       </layout>
      
       <filter class="org.jboss.logging.filter.TCLFilter">
       <param name="AcceptOnMatch" value="true"/>
       <param name="DeployURL" value="appname2.ear"/>
       </filter>
       </appender>
      

      I also tried adding and changing DeployUrl to appnameX.


      I have two JBoss Seam apps: in ${JBOSS_HOME}/server/default/deploy/appname1.ear and ${JBOSS_HOME}/server/default/deploy/appname2.ear, both contains the following:
      lib
      META-INF
      jboss-seam.jar
      appnameX.jar
      appnameX.war

      Content of my jboss-app.xml:
      <jboss-app>
       <loader-repository>
       seam.jboss.org:loader=appnameX
       </loader-repository>
      </jboss-app>
      

      (I also tried appnameX:loader=appnameX)
      I tried to change false in ear-deployer.xml, but has no result.

      I use true in jboss-service.xml

      Unfortunatelly nothing works as I expected. Could anybody tell me, what is wrong im my configuration?

        • 1. Re: Using TCLFilter with JBoss 4.2.2
          Krzysztof Baranski Newbie

          Few lines where badly formated:

          (after first code block)
          I also tried adding

          <filter class="org.apache.log4j.varia.DenyAllFilter"></filter>
          and changing DeployUrl to appnameX.

          (after second code block)
          I tried to change
          <attribute name="Isolated">false</attribute>
          in ear-deployer.xml, but has no result.
          I use
          <attribute name="UseJBossWebLoader">true</attribute>
          in jboss-service.xml