Java Magazine, Mar/Apr 2018
ORACLE COM JAVAMAGAZINE MARCH APRIL 2018 52 microservices and containers public class MyMathImpl extends osgi simulation math impl MyMathImpl The compile script from the Java module sample application needs to be modified slightly to include the updated module source path and the path to the OSGi math bundle file in the classpath javac d out classpath math target jar module source path math src m simulation math The application layer modularity remains the same because its simply loading the Java module wrappers around the OSGi bundles Conclusion Cooperation beats rivalry When combined Java modules and OSGi ofer a more complete and robust modularity solution than either ofers on its own For example without Java modules OSGi cannot support compile time enforcement of dependencies Likewise application level modularity isnt as complete and lifecycle control isnt as robust without OSGi Combining both also helps existing OSGi applications leverage a growing number of Java 9 modules and it ofers a clean integration and possibly migration path to build OSGi bundles and services into Java 9 applications Ill close with a final thought when polarizing concepts arise in computer science for example the OS wars the C versus Java debate and framework diferences its often better to avoid being religious and instead find ways to work together article Eric J Bruno is a lead real time engineer at Perrone Robotics where hes teaching cars to drive themselves He has 25 years experience in the information technology community as an enterprise architect developer and analyst with expertise in large scale distributed software design
You must have JavaScript enabled to view digital editions.