15. OSGi and Scala

Suppose that we want to implement the loan calculation so that it can execute in a highly concurrent environment. Scala is a functional language that excels in helping you create programs that run in a high concurrent environment. Let’s see how to do this.

The goal at this point is to replace the Java implementation of calc-impl.jar with a Scala implementation.

15.1. Getting Started

Just as refactoring our modules to OSGi didn’t require any coding changes, replacing calc-impl.jar will not require modifying our existing system. We did a good job creating Cohesive Modules with a Default Implementation. Independent Deployment was also a strength of our design. So, now that we want to create the Scala1 module, we only need to write ...

Get Java Application Architecture: Modularity Patterns with Examples Using OSGi now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.