Search code examples
apijava-8currencybigdecimaljava-money

Is JSR-354 Money API ready for production usage?


Nowadays, i'm doing research about which data type would be proper for money/currency in Java 8.

I've encountered JSR-354 specification for data types and operations on money/currency data. Reference implementation with its API is here: https://github.com/JavaMoney

I've tried to learn the api on version 0.9 through examples on the web. It was cool and easy. But when i updated the version of api to 1.0, then i realized that core builder classes such MonetaryCurrencies, MonetaryAmounts and MonetaryFunctions class that contains monetary functions have been removed completely instead of being marked as Deprecated.

Is it normal to do such huge changes on the API? Has anyone tried JavaMoney Api in production?

What's your recommendations other than BigDecimal and java.util.Currency for representing money/currency data?


Solution

  • I've not tried JSR-354 in production. I've used Money concepts getting inspiration from https://github.com/stephenh/timeandmoney.

    This is a mirror of the code from the Time and Money library from Eric Evans - author of Domain Driven Design