OSGI OSGi (Open Service Gateway Initiative) is a Java framework for developing and deploying modular software programs and libraries. OSGi has two parts. The first part is a specification for modular components called bundles. W hich are commonly referred to as plug-ins Contexts and Dependency Injection for OSGi Applications PAX CDI https://ops4j1.jira.com/wiki/display/PAXCDI/Pax+CDI PAX CDI is a Dependency injection implementation in OSGI Let us a sample for how to implement the OSGI Service How to use @Inject @OsgiService @OsgiServiceProvider etc., Pax CDI API pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> ...
Drools Drools is a powerful rule engine. You define rules using .drl file or .xls as an decision table In this post we will see how Drool is embedded in Karaf as OSGI. Pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.frontend</groupId> <artifactId>frontend-parent</artifactId> <version>1.0</version> </parent> <artifactId>frontend-cmd2</artifactId> <packaging>bundle</packaging> <properties> <runtime.version>6.5.0.Final</runtime.version> <cdi.version>1.1</cdi.version> <weld.version>2.3....
OSGI Command and Function In the Previous post we saw how to implement OSGI Service PAX CDI Implementation http://opensourceappexample.blogspot.ca/2017/06/apache-karaf-pax-cdi-osgi-service.html Let us see how we can use OSGI Command osgi.command.scope osgi.command.function pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>osgi.example</groupId> <artifactId>osgi-example-parent</artifactId> <version>1.0</version> </parent> <artifactId>osgi-example-cmd</artifactId> <packaging>bundle</packaging> <dependencies> <dep...
Comments
Post a Comment