Tag cloud

JBoss (16) Fedora (5) Linux (4) Red Hat (4) JON (3) command line (3) 4.3 (2) JEE (2) JVM (2) Java (2) KVM (2) Oracle (2) Portal (2) Weblogic (2) installation (2) vs (2) /boot partition (1) Add-ons (1) Apache (1) Bundles (1) Business model (1) Byteman (1) CLASSPATH (1) EAP (1) EPP (1) Eclipse (1) Failover (1) Gnome (1) JAVA_OPTS (1) JBDS (1) JBoss Tools (1) JBossON (1) JConsole (1) JDK (1) JMS (1) JVM options (1) KDE (1) MBean (1) Network (1) Open Source (1) RHQ (1) Red Hat subscription (1) Thunderbird (1) Troubleshooting (1) Virtulization (1) WS (1) Webservices (1) Wireshark (1) classloading (1) clustering (1) comparison (1) debug (1) deployment (1) disable SELinux (1) disksize (1) error (1) fun (1) jboss.org (1) log (1) log4j (1) lvm (1) messaging (1) multiple WARs (1) patent FOSS (1) performance tuning (1) provisionning (1) scripting (1) services (1) switch (1) troll (1) upgrade (1) video (1) war (1) webapp (1) yum (1)
Showing posts with label JBoss. Show all posts
Showing posts with label JBoss. Show all posts

01 March 2011

JBoss and JMS



Over the years the JMS providers have changed within JBoss, here an overview:

JBoss JMS Messaging
Community project
(newest on top)
Latest
version
Enterprise
JBoss versions
Latest supported
enterprise version
JBoss HornetQ
(standalone)
HornetQ2.1.2
(2010-08-17)
EAP 5.2+
EAP 5.2 (n/a yet)
JBoss Messaging
(standalone)
JBM1.4.5
(2009-09-30)
EAP4.3 -
EAP5.1
EAP 5.1 (1.4.6.GA-SP1)
JbossMQ
(only with JBossAS)
JBoss4.2.3
(2008-07-18)
Until JbossAS4.0.5
JbossAS4.0.5
End of life
Note that all cited versions are compliant to the JMS specification 1.1 !
The enterprise version was renamed in 2006 from JBossAS to EAP ! 

Clustering JMS :
For JBoss Messaging follow http://community.jboss.org/wiki/JBMCluster.
JMS redelivery
JBoss transaction exist from JbossMQ on. But the idea of DLQ (Dead Letter Queue) only exist from JBoss Messaging on. The idea is that after a couple of unsuccessful deliveries of a message (meaning that message is non-acknoleged and client session timed out) the message will be put in a special queue (DLQ) and won't be delivered again. You can set the number of tries with the parameter DefaultMaxDeliveryAttempts which defaults to 10. You can also retry to send the message by delaying it with DefaultRedeliveryDelay (defaults to 0).
JMS transaction
- local transactions
- distributed transactions XA













http://www.javaworld.com/javaworld/jw-02-2002/jw-0315-jms.html

10 January 2011

Howto install JBoss Tools to Eclipse

If you want to use the ESB / BPEL, etc. features of Red Hat JBoss within your Eclipse, just add the following URL to your Eclipse software repositories:
http://download.jboss.org/jbosstools/updates/JBossTools-x.x.x.GA
(check on http://download.jboss.org/jbosstools/updates to find latest stable version)
Help --> Install new software ... Add after "Work with:" the URL above and hit Enter...




















Than you can choose the JBoss developpment tools you want to install.

To get the nightly build versions of JBoss Tools do the following :
Goto http://download.jboss.org/jbosstools/builds/nightly/trunk/latestBuild.html
--> all --> repo --> copy the URL from your browser -->
http://download.jboss.org/jbosstools/builds/nightly/trunk/20xx-xx-xx_xx-xx-xx-xxxxx/all/repo/
Paste it into "Work with:" and you can start installing...

03 January 2011

Howto add JVM options to JBoss

There are two useful files to add JVM options to JBoss.

1. <JBOSS>/bin/run.sh (when you need to reference the JBoss path)
Add this after line 12 GREP="grep" in the run.sh file for JBoss 4.3
JAVA_OPTS="-javaagent:$DIRNAME/../server/all/deploy/jboss-aop-jboss5.deployer/pluggable-instrumentor.jar"
or  this for JBoss 5
JAVA_OPTS="-javaagent:$DIRNAME/../server/all/deployers/jboss-aop-jboss5.deployer/pluggable-instrumentor.jar"
In this example I needed to specify the complete path of the JBoss instance using the $DIRNAME variable which points to the directory of the run.sh file. You see in 2. that via the run.conf file you will not be able to do this.

2. <JBOSS>/bin/run.conf (when no path is needed)
# Add this at the end of the file: Enables the jconsole agent locally
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote"

01 December 2010

Byteman JBoss scripting

Summary:
When your HA system crashes with JEE application running on JBoss you might want to try JBoss Byteman, an bytecode injection tool that lets you add logging without touching the application itself.

Main post:

The steps to debug an application using
1. Download byteman-1.0.3.CP02 (for JDK5) or byteman-1.3 (for JDK6)
2. Extract the zip into $BYTEMAN_HOME
3. Modify your JBoss startup configuration by adding the following 3 lines at the end of $JBOSS_HOME/jboss-as/bin/run.conf:
# Adding extra logging to standard output (BYTEMAN_HOME needs to be addapted)
BYTEMAN_HOME="/tmp/byteman-1.x.x"
JAVA_OPTS="$JAVA_OPTS -javaagent:$BYTEMAN_HOME/lib/byteman.jar=script:$BYTEMAN_HOME/script.txt"

4. For JDK5 add the file $BYTEMAN_HOME/script.txt :
RULE trace RepositoryClassLoader.loadClassImpl entry
CLASS RepositoryClassLoader
METHOD loadClassImpl
AT ENTRY
IF TRUE
DO traceln("*** " + $0 + ".loadClassImpl(" + $1 + ", " + $2 + ", " + $3
+ ") ENTRY in " + Thread.currentThread())
ENDRULE

RULE trace RepositoryClassLoader.loadClassImpl exit
CLASS RepositoryClassLoader
METHOD loadClassImpl
AT EXIT
IF TRUE
DO traceln("*** " + $0 + ".loadClassImpl(" + $1 + ", " + $2 + ", " + $3
+ ") EXIT in " + Thread.currentThread())
ENDRULE

RULE trace RepositoryClassLoader.loadClassImpl CALL wait
CLASS RepositoryClassLoader
METHOD loadClassImpl
AT INVOKE Object.wait()
IF TRUE
DO traceln("*** " + $0 + ".loadClassImpl(" + $1 + ", " + $2 + ", " + $3
+ ") CALL wait in " + Thread.currentThread())
ENDRULE

RULE trace RepositoryClassLoader.loadClassImpl CALL notifyAll
CLASS RepositoryClassLoader
METHOD loadClassImpl
AT INVOKE Object.notifyAll()
IF TRUE
DO traceln("*** " + $0 + ".loadClassImpl(" + $1 + ", " + $2 + ", " + $3
+ ") CALL wait in " + Thread.currentThread())
ENDRULE


5. For JDK6 add the file $BYTEMAN_HOME/script.txt :
RULE trace RepositoryClassLoader.loadClassImpl entry
CLASS RepositoryClassLoader
METHOD loadClassImpl
AT ENTRY
IF TRUE
DO traceln("*** " + $0 + ".loadClassImpl(" + $1 + ", " + $2 + ", " + $3
+ ") ENTRY in " + Thread.currentThread())
ENDRULE

RULE trace RepositoryClassLoader.loadClassImpl exit
CLASS RepositoryClassLoader
METHOD loadClassImpl
AT EXIT
IF TRUE
DO traceln("*** " + $0 + ".loadClassImpl(" + $1 + ", " + $2 + ", " + $3
+ ") EXIT in " + Thread.currentThread())
ENDRULE

RULE trace RepositoryClassLoader.loadClassImpl CALL wait
CLASS RepositoryClassLoader
METHOD loadClassImpl
AT CALL wait ALL
IF TRUE
DO traceln("*** " + $0 + ".loadClassImpl(" + $1 + ", " + $2 + ", " + $3
+ ") CALL wait in " + Thread.currentThread())
ENDRULE

RULE trace RepositoryClassLoader.loadClassImpl CALL notifyAll
CLASS RepositoryClassLoader
METHOD loadClassImpl
AT CALL notifyAll ALL
IF TRUE
DO traceln("*** " + $0 + ".loadClassImpl(" + $1 + ", " + $2 + ", " + $3
+ ") CALL wait in " + Thread.currentThread())
ENDRULE


6. After having starting your JBoss you should see in the standard out a lot of logging...
7. That should help you to find memory leaks, deadlocks ...

12 October 2010

Howto write JBoss Java MBeans to expose to a JMX Client

Summary:
Sometime you will find yourself in the situation of wanting to monitor your application, but no monitoring capability is given. So you will have to write your own Java MBean that will expose information of your JBoss application to a JMX Client.

Main post:
Examples: jboss-eap-4.3_CP08/jboss-as/docs/examples/jmx/logging-monitor
From the JBoss SVN you can get sample MBean classes:
/svn_jboss_org/trunk/varia/src/main/java/org/jboss/jmx/examples/configuration/

Have your MBean interface extend the org.jboss.system.Service and org.jboss.system.ServiceMBean interface.
org.jboss.system.Service and org.jboss.system.ServiceMBean can be found in:  
jboss-eap-4.3_CP08/jboss-as/server/all/deploy/management/console-mgr.sar/web-console.war/applet.jar


  • Add the classes















  • You can see two MBean that are almost the same (up to the fact that one extends the org.jboss.system.ServiceMBean class)
    1. 
    Attributes: JndiName
    Operations: start / stop
    2. 
    Extents the class org.jboss.system.ServiceMBean -- you can see that this class gives you out of the 
    Attributes: Name / JndiName / StateString / State
    Operations: destroy / start / stop /create / jbossInternalLifecycle
    Notificaitons

    Explanation on standard Java MBean like RuntimeMXBean, ThreadMXBean, MemoryPoolMXBean, ... can be found here: http://download.oracle.com/javase/1.5.0/docs/guide/management/overview.html

    Jacorb to be found in:
    eap43CP08/jboss-as/server/all/lib/jacorb.jar
    org.jacorb.util.threadpool.ThreadPool.class (here we have to get the information on the thread pool counter.
    In class ThreadPool within method createNewThread() the following line:
    localThread.setName(this.namePrefix + this.threadCount++);


    Jacorb example:
    http://www.jpackage.org/browser/rpm.php?jppversion=6.0&id=7709

    Set up environment:
    jboss-log4j.xml

    11 October 2010

    Troubleshooting JBoss Portal 4.3

    Problems that might occure while working with JBoss Portal:

    - Admin link is not visible (between Dashboard and Logout)







    That occurs when the admin is not in upper case in the LDAP. See the example of two *.ldif files. One works, the other does not.
    Does not work:
    dn: cn=admin,ou=Roles,o=rbrackma,dc=redhat,dc=com
    objectClass: top
    objectClass: groupOfNames
    cn: admin
    description: Administrators
    member: uid=admin,ou=People,o=rbrackma,dc=redhat,dc=com


    Works:
    dn: cn=Admin,ou=Roles,o=rbrackma,dc=redhat,dc=com
    objectClass: top
    objectClass: groupOfNames
    cn: Admin
    description: Administrators
    member: uid=admin,ou=People,o=rbrackma,dc=redhat,dc=com












    In the EPP logs you might also find another error:


    - ERROR [LDAPUserProfileModuleImpl] No such attribute ('title') in entry: uid=admin,ou=People,o=example,dc=jboss,dc=com
    LDAP is looking for the attribute title, but does not find it within the RHDS LDAP. Does not cause any problem within the system, but is annoying.

    07 October 2010

    Howto setup LDAP with Red Hat EPP (JBoss Portal / GateIn)

    Description:
    When you first start with Red Hat's Enterprise Portal Platform you will be able to connect to the portal with admin/admin or user/user. The credentials will be checked against the default users within the portals in-memory database HSQL. Mostly you would want the credentials to be checked against your companies LDAP.
    This post will cover setting up an LDAP and configuring EPP4.3 to use it.
    - Install LDAP
    - Start LDAP services
    - Setup LDAP
    - Install EPP4.3
    - Setup EPP4.3 to use LDAP for credentials
    - Connect to the portal http://localhost:8080/portal

    Main post:
    Install LDAP
    Before starting be aware that the only supported LDAP servers are:
    Red Hat Directory Server, OpenDS and OpenLDAP.

    Within this post the open source LDAP server "Red Hat Directory Server" will be used.
    Installing it is pretty straight forward.
    First install the software :
    sudo yum install 389-ds
    sudo yum install fedora-idm-console

    Then configure the RHDS with this document:
    http://www.scribd.com/doc/20555511/Fedora-Directory-LDAP-Server-Setup-Configuration-on-Linux-HowTo-v1-0
    If the document is not available call the following command line and follow the install instructions which are pretty straight forward
    # setup-ds-admin.pl

    At the End you should remember:
    Directory Manager: cn=Directory Manager
    Password: your_password
    Admin port: 9830
    LDAP port: 389

    Start LDAP services

    sudo service dirsrv start
    sudo service dirsrv-admin start
    sudo service httpd start

    Setup LDAP

    Run the earlier installed LDAP browser fedora-idm-console (you can use any other LDAP browser)
    $ fedora-idm-console

    Choose the Directory Server (1) and choose Open (2).










    Then you just have to choose 'Import Databases' and import a *.ldif (save the following text into a test.ldif file). After that you should be able to browse you LDAP tree in the Directory tab...


    dn: o=your_host,dc=your_domain,dc=com
    objectclass: top
    objectclass: dcObject
    objectclass: organization
    o: your_host
    dc: your_host
    dn: ou=People,o=your_host,dc=your_domain,dc=com
    objectclass: top
    objectclass: organizationalUnit
    ou: People
    dn: uid=admin,ou=People,o=your_host,dc=your_domain,dc=com
    objectclass: top
    objectclass: inetOrgPerson
    objectclass: person
    uid: admin
    cn: Administrator
    sn: Duke
    userPassword: admin
    mail: admin@your_host.your_domain.com
    dn: uid=user,ou=People,o=your_host,dc=your_domain,dc=com
    objectclass: top
    objectclass: inetOrgPerson
    objectclass: person
    uid: user
    cn: User
    sn: Sample
    userPassword: user
    mail: user@your_host.your_domain.com
    dn: uid=jduke,ou=People,o=your_host,dc=your_domain,dc=com
    objectclass: top
    objectclass: inetOrgPerson
    objectclass: person
    uid: jduke
    cn: Java
    sn: Duke
    userPassword: theduke
    mail: jduke@your_host.your_domain.com
    dn: ou=Roles,o=your_host,dc=your_domain,dc=com
    objectclass: top
    objectclass: organizationalUnit
    ou: Roles
    dn: cn=Admin,ou=Roles,o=your_host,dc=your_domain,dc=com
    objectClass: top
    objectClass: groupOfNames
    cn: Admin
    description: Administrators
    member: uid=admin,ou=People,o=your_host,dc=your_domain,dc=com
    dn: cn=User,ou=Roles,o=your_host,dc=your_domain,dc=com
    objectClass: top
    objectClass: groupOfNames
    cn: User
    description: Users
    member: uid=admin,ou=People,o=your_host,dc=your_domain,dc=com
    member: uid=user,ou=People,o=your_host,dc=your_domain,dc=com
    member: uid=jduke,ou=People,o=your_host,dc=your_domain,dc=com


    Install EPP4.3
    The installation of EPP4.3 is extremly simple.
    First download the jboss-epp-4.3.GA_CP0X-src.zip here. You will need a Red Hat login and a valid subscription to download, if you don't know why: I covered it in an earlier post.
    Then extract the zip file into the directory jboss-epp-4.3. That's it.


    Setup EPP4.3 to use LDAP for credentials
    You will have to change the following files in red to make LDAP work.






















    1. Within jboss-epp-4.3/jboss-as/server/default/deploy/jboss-portal.sar/META-INF/jboss-service.xml
    change

          conf/identity/identity-config.xml
    to
          conf/identity/ldap_identity-config.xml

    2. Within jboss-epp-4.3/jboss-as/server/default/deploy/jboss-portal.sar/conf/identity/ldap_identity-config.xml
    adapt the value tags that are linked to the following tags:
    host
    port
    adminPassword
    userCtxDN
    roleCtxDN
    (the be sure to choose the right value for userCtxDN and roleCtxDN connect to your LDAP browser and check the values)


    3. Within jboss-epp-4.3/jboss-as/server/default/deploy/jboss-portal.sar/conf/identity/standardidentity-config.xml

    adapt the value tags that are linked to the 5 tags seen in the section above.

    4. Within jboss-epp-4.3/jboss-as/server/default/deploy/jboss-portal.sar/conf/login-config.xml
    comment (do not use)
    login-module code="org.jboss.portal.identity.auth.IdentityLoginModule"
    uncomment (use)
    login-module code="org.jboss.portal.identity.auth.SynchronizingLDAPExtLoginModule"
    and adapt the variable to your configuration.
    Connect to the portal
    Now you should be able to connect to the portal:
    http://localhost:8080/portal
    with the user admin and password admin.
    The default HSQL database users that come with the portal out of the box are admin and user. After migrating to LDAP they will only work if you have configured your portal properly. For example you have the possibility to authenticate users against LDAP + DB or only against LDAP. In this post users are only authenicated against LDAP! And 3 users available are the ones imported into the LDAP with the *.ldif file: admin, user, jduke.


    If you still have problems check out the section "Troubleshooting JBoss Portal"

    19 August 2010

    Classloading JBoss

    Title : Web app is using embedded jars that exist already within JBoss

    Summary:
    First of all w
    JBoss class loading
    A college of mine has written a good article on class loading :
    The translated Noel Rocher

    Main post
        jboss-app.xml         <?xml version="1.0" encoding="utf-8"?>
            <jboss-app>
                <loader-repository>
                TestClassloaderJBossLR:loader=TestClassloaderJBoss.ear
                <loader-repository-config>java2ParentDelegation=true</loader-repository-config>
                </loader-repository>
            </jboss-app>   
        jboss-web.xml

            <?xml version="1.0" encoding="utf-8"?>
            <jboss-web>
                <!-- Mettre toute l'application soit dans le meme classloader (J2EE) -->
                <class-loading java2ClassLoadingCompliance="true"/>
            </jboss-web>
     

    Ever since version 4.0.2, JBoss is configured according to the J2EE specification, meaning that the default isolation of applications is the research in priority classes in the ClassLoader of the application.

    Specifying in the 2-descriptors jboss and jboss-web.xml app.xml attributes and java2ClassLoadingCompliance java2ParentDelegation = true = "true, you change this default behavior and return to as it was in JBoss 3.2, namely the use of a unified ClassLoader taking priority classes loaded first, so in your case those server applications.

    fsfdf

    16 August 2010

    Webservices within JBoss

    Summary:
    Web services give you the possibility of loosely coupling your different IT-systems. At least on the paper it seems that you can interchange either the client or server easily.
    Only after having changed either part for the first time you might realize that a new Web service implementation on one side means redeveloping also the other.

    Main post:
    When working with the Webservice stack of JBoss you will have to check on the version you are using, as there has been some changes over the years :

    http://community.jboss.org/wiki/WebServiceStacks


    Name File JBoss Version Status Supported
    API
    Based on
    JbossWS-3.x JbossWS Native
    3.1.2.SP3-patch-02
    jbossws.sar
    5.0+

    JEE 6 JAX-WS
    Apache CXF (not shipped with EAP)
    3.1.2.SP3
    5.0+ Supported JEE 6 (1) JAX-WS
    GlassFish Metro (not shipped with EAP) 5.0+

    JEE 6 JAX-WS
    JBossWS-2.x
    sources
    binaries
    jbossws.sar
    (2.0.1.SP2_CPxx)
    EAP 4.3 CPxx ??? JEE 5 JAX-WS
    JBossWS-1.x jbossws.sar
    (1.2.1.GA_CPxx+)
    EAP 4.2 CPxx ??? JEE 5 JAX-WS (2)
    JBossWS4EE jboss-ws4ee.sar < 4.0.4 Maintenance Only J2EE 1.4 Axis
    JBoss.NET jboss-net.sar 3.2.x End of Life Proprietary Axis


    (1) JDK 1.6 incorporates the JAXB reference implementation. However, it incorporates an old version of the RI. CXF does not support this version. As of 1.6_04, this is easy to deal with: you must put the versions of JAXB RI (the 'impl' and 'xjc' jars) that we include with CXF in your classpath. As of this writing, these are version 2.1.6.
    (2) Yes, JAXWS ... are supported all together starting from JBossWS-1.2.0.GA. Link








    11 August 2010

    Adding CLASSPATH or JAVA_OPTS to JBoss


    Summary:
    This post shows howto add a new Java library (e.g. patched class) or a new Java startup option
    to JBoss running under Linux


    Main post:
    Adding Java library
    edit ./run.sh and add JBOSS_CLASSPATH="./lib/mypatchedJar.jar;$JBOSS_CLASSPATH"



    Adding Java startup option

    edit ./run.sh and add JAVA_OPTS="-D32 $JAVA_OPTS"

    05 August 2010

    Clustering JBoss: mod_jk VS mod_jk2 VS mod_proxy


    Load balancing – JBoss Application Servers

    Web Connectors
    Apache version
    JBoss platforms
    Tomcat
    mod_jk 1.2.x
    Apache 2.
    EAP4.3


    mod_jk2
    JBoss EAP 4.2
    P2


    mod_proxy
    Apache 2.x (included in 2.2+)
    EAP3.x


    mod_cluster
    Apache 2.2.10+
    EAP 5.0.0+ & EWS 1.0+
    EAP 3 + 4 (not certified)
    Not certified











    Parralel deployment in JBoss

    Summary:
    Howto hot-deploy a new version V2 of an application V1 without having a downtime of the application.

    Main article:


    References:
    Weblogic

    03 August 2010

    Separating log4j logging having the same WAR multiple times on one JBoss EAP 4.3

    Summary:
    This post will explain how to separate your log4j logs when having the same WARs deployed multiple times (packaged in an EAR) on the same JBoss.
    For example myApp1.war and myApp1_copy.war.
    This post is for JBoss EAP 4.3 ! For EAP 5.0.0 it does not work ! For EAP 5.1 you will not need this as it becomes simpler DeployURL equals the specific war name. (see end of post)

    Main article:
    While looking for a solution you will most likely find the wiki entry on jboss.org: http://community.jboss.org/wiki/SeparatingApplicationLogs
    Unfortunately it does not cover the need to separate logging when having multiple equivalent WARs that log via the same class --> example1 (or that use a common .jar that does the logging --> example2)

    example1.ear
    ├── myApp1.war
    ├── myApp1_copy.war
    └── META-INF
        ├── application.xml
        └── jboss-app.xml

    example2.ear
    ├── myApp1.war
    ├── myApp1_copy.war
    ├── loggingJar.jar
    └── META-INF
        ├── application.xml
        └── jboss-app.xml


    The log that you would want to see is:
    JBOSS/server/<profile>/log/myApp1.log
    JBOSS/server/<profile>/log/myApp1_copy.log


    Adapting your log4J within JBoss

    JBoss logging gives you the possibility to add filters within the jboss-log4j.xml file via the TCLFilter class. For the following DeployURL parameter it is usually sufficient to add a sub string of the deployed WAR name "myApp1-exp.war" (found in your JBOSS/server/<profile>/tmp/deploy directory). For our scenario this is not sufficient, we have to add /WEB-INF at the end of the string. If we do not add /WEB-INF we will get logs in both log files! The reason is that the TCLFilter class compares the value of DeployURL with the repositories of the Classloader ...
    By the way if you want that JBoss takes changes of your jboss-log4j.xml into account immediately you'll want to set

    The filter of your appender should look like this :

    <filter class="org.jboss.logging.filter.TCLFilter">
        <param name="AcceptOnMatch" value="true"/>
        <param name="DeployURL" value="myApp1-exp.war/WEB-INF"/>
    </filter>

    To make sure that
    myApp1.war logs into JBOSS/server/<profile>/log/myApp1.log
    and 
    myApp1_copy.log logs into JBOSS/server/<profile>/log/myApp1_copy.log
    add the following into your jboss-log4j.xml:
    <appender name="APPENDER-1" class="org.jboss.logging.appender.FileAppender">
            <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
            <param name="File"        value="${jboss.server.home.dir}/log/web1.log"/>
            <param name="Append"      value="false"/>
            <param name="DatePattern" value="'.'yyyy-MM-dd"/>
            <layout class="org.apache.log4j.PatternLayout">
                <param name="ConversionPattern" value=" %r [%t] %-5p %c %x - %m%n"/>
            </layout>
            <filter class="org.jboss.logging.filter.TCLFilter">
                <param name="AcceptOnMatch" value="true"/>
                <param name="DeployURL" value="myApp1-exp.war/WEB-INF"/>
            </filter>
            <filter class="org.apache.log4j.varia.DenyAllFilter"></filter>        
       </appender>


    <appender name="APPENDER-2" class="org.jboss.logging.appender.FileAppender">
            <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
            <param name="File"        value="${jboss.server.home.dir}/log/web2.log"/>
            <param name="Append"      value="false"/>
            <param name="DatePattern" value="'.'yyyy-MM-dd"/>
            <layout class="org.apache.log4j.PatternLayout">
                <param name="ConversionPattern" value=" %r [%t] %-5p %c %x - %m%n"/>
                <!--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="
    myApp1_copy-exp.war/WEB-INF"/>
              </filter>
            <filter class="org.apache.log4j.varia.DenyAllFilter"></filter>

    </appender>

    <category name="com.your.package"> 
                <priority value="DEBUG" /> 
                <appender-ref ref="APPENDER-1"/>
                <appender-ref ref="APPENDER-2"/>
    </category>



    The different JBoss EAP versions differ as the deployment process changes from each version:
    EAP4.3:
    <param name="DeployURL" value="myApp1-exp.war"/>
    EAP5.0.0:
    TCLFilter does not work at all here is the issue : https://issues.jboss.org/browse/JBAS-6532
    EAP5.1: the TCLFilter can be set up with the name of the war
    <param name="DeployURL" value="myApp1.war"/>

    21 July 2010

    Clustering JBoss vs Clustering Weblogic

    Summary:
    This article describes two things
    1. Howto set up a JBoss cluster with an Apache as load-balancer
    2. Howto set up a Weblogic cluster with an Apache as load-balancer


    Architecture schema:
    1.
    2.


    Main post:
    1.
    - Install Apache
    - Install JBoss jboss.org or redhat.com   (find out the difference in an earlier post)
    First
    http://community.jboss.org/wiki/usingmodjk12withjboss


    JBoss
    Cluster 
    jboss
    /jboss-5.1.0.GA/server/all/deploy/cluster
    /jboss-eap-4.3/jboss-as/server/production/deploy/jboss-web-cluster.sar/
    /jboss-eap-4.3/jboss-as/server/all/deploy/jboss-web-cluster.sar/




    http://docs.jboss.org/jbossas/jboss4guide/r4/html/jbosscache.chapt.html

     Howto configure JBoss with Apache using mod_jk

    20 July 2010

    Howto migrate Oracle Weblogic to Red Hat JBoss

    This post describes on a very technical level howto migrate Oracle Weblogic to Red Hat JBoss.

    Situation :
    Many decision takers in IT departments have not appreciated Oracle buying BEA in late 2008. Most bigger companies have Weblogic servers parks and see themselfs in a position where more and more of their IT infrastructure comes from Oracle.
    To try to avoid paying monopoly prices decision takers start looking for alternatives application servers.

    Step by step migration :
    1. Using automatic tool to migrate weblogic.xml to jboss-web.xml

    http://www.jboss.org/mass/MAT.html