Tagged: java

Nov 29

Change all Amounts to Big Decimal

Today I found out that all my currencies have to be BigDecimal. BigDecimal helps with rounding etc. Double has all sorts of quirks and cannot be relied on, especially when dividing by 3.

The downside is that there is a whole lot of legacy code that needs to be changed. Could use this as an excuse to rewriting the application.

0
comments

Aug 27

Java Security

I tried it out today. The details of Java Policy which controls what each program can and cannot do.
However there were a some grey areas which I thought I needed to jot down for further reference.

  1. It is best to put the policies in ${user.home}/.java.policy
  2. If 1 is not possible then the confusion lies as to where to put the policy
    1. You could put it in any file as long as you add it to the ${java.home}/lib/security/java.security file.
    2. The entry to be made is policy.url.3=file:/D:/JavaTest/mypolicy (windows)
    3. This works for applet viewer but not mozilla
    4. Java usually downloads the latest version of JRE and installs it. Mozilla uses the latest version so. For Mozilla it is not enough to change ${java.home}/lib/security/java.security file but the /lib/security/java.security of the latest version of JRE.

0
comments

Mar 06

Implementing Quartz in Spring

Today I went about trying to implement quartz in my application. With spring the integration is very simple. Spring has implemented all that is required to get quartz up a running. Setting a Quartz Job is a 3 Step process. I will go through each process.

( Read more )

0
comments