Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Note about OFBIZ-6942
Info
titleRMI deactivated since OFBIZ-6942

Because of The infamous Java serialize vulnerability we (PMC) have deactivated RMI hence JNDI (relies on RMI in OFBiz). So if you want to use the DCC mechanism you will need first to uncomment as explained at

Jira
serverASF JIRA
serverId5aa69414-a9e9-3523-82ec-879b028fb15b
keyOFBIZ-6942

 

Distributed Entity Cache Clear (DCC) Mechanism

...

  1. set advisorySupport="false" for the broker (exceptif you want to use advisroy messages)
  2. use transport.soTimeout=60000 and set enableStatusMonitor="true" for Openwire connector

    Code Block
    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.base}/data" destroyApplicationContextOnStop="true" advisorySupport="false">
    ....
    <transportConnector name="openwire" uri="tcp://0.0.0.0:61616?transport.soTimeout=60000" enableStatusMonitor="true"/>
    

A possible pitfall

This issue should be resolved if you use a recent version (say after mid 2011): we have now the proper slf4j jar files in the classpath to redirect logging to log4j.

This section can be bypassed but might help in case of troubles
I first installed ActiveMQ 5.5.0 on my developement machine on XP. When I ran OFBiz I got this non blocking error

Code Block
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

This lead to this tip

*Failed to load class org.slf4j.impl.StaticLoggerBinder*

This error is reported when the org.slf4j.impl.StaticLoggerBinder class could not be loaded into memory. This happens when no appropriate SLF4J binding could be found on the class path. Placing one (and only one) of slf4j-nop.jar, slf4j-simple.jar, slf4j-log4j12.jar, slf4j-jdk14.jar or logback-classic.jar on the class path should solve the problem. As of SLF4J version 1.6, in the absence of a binding, SLF4J will default to a no-operation (NOP) logger implementation. You can download SLF4J bindings from the project download page.

I firts wondered if this was due to ActiveMQ itself or something else in OFBiz which was interacting with activemq JAR. I then thought that, to work with ActiveMQ, it needed a special setting and following the advice I (hastily) installed the last SLF4J version (slf4j-simple-1.6.1.jar) in the framework/base/lib OFBiz directory. I then got a message "Multiple bindings were found on the class path". But as all was working correctly I thought it was only a warning about using a slf4j version in ActiveMQ and another in OFBiz. Later when I began to run the Distributed Cache Clearing Mechanism on the cluster I crossed some issues and began to wonder what was wrong. It took me a moment to realize ''<<SLF4J will default to a no-operation (NOP) logger implementation>>'' sent me the wrong way. Actually I did not need to add any slf4j JAR, pfew...