Nov 17

In JBoss Drools you can use Functions to simplify rules and to DRY:

function int monthlyPayment(Money initialMonthlyPayment) {
    return initialMonthlyPayment.times(0.75);
}

We used this technic for some little helpers. We unit test all our rules and everything seems to be fine until our customer did some more monkey testing. He claimed that some rules worked once but fail now. After some root cause analysis we found a very strange bug (JBRULES-2749). Rules won’t fire! Luckily we found this bug before our go live.

Don’t use Drools functions until this issue is solved. Instead use a static method in a helper class.

Drools is really a cool rule engine, please vote for JBRULES-2749.

Tagged with:
Feb 22

On my Ubuntu I’m facing this JVM Bug which suddenly freezes the keyboard of IDEA. Now I’m trying Anils suggestion. Therefore I need to install a Java 7 snapshot:

  1. download self-extracting binary file of java 7 snapshot
  2. run chmod +x jdk-7-ea-bin-b48-linux-i586-19_feb_2009.bin to make it executable
  3. run ./jdk-7-ea-bin-b48-linux-i586-19_feb_2009.bin to extract the archive
  4. run sudo mv ./jdk1.7.0 /usr/lib/jvm to move it to the other JVMs
  5. run update-alternatives --config java to check how many JVMs you already installed
  6. run sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0/jre/bin/java 3
    I got 2 installations, so I need to specify a 3
  7. run sudo update-alternatives --config java to chance your java version.
  8. run java -version to validate everything is fine

To tell IDEA 8.1 to run with Java 7 you need to add -Didea.no.jdk.check=true in idea.vmoptions.

Keep your fingers crossed for me that this will fix that problem;)

Tagged with:
preload preload preload