Posts

Showing posts with the label OSGI

OSGI + PAX CDI + Drools + Karaf

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....

PAX CDI + Interceptor

CDI Provides many features like Beans Interceptor Decorator Portable Exception Bean Proxy Interceptor     Interceptors allow you to add functionality to the business methods of a bean without modifying the bean’s method directly. The interceptor is executed before any of the business methods of the bean. Interceptors are defined as part of the Enterprise JavaBeans specification, which can be found at  JSR 318 Define the Binding package com.rest.interceptor; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Retention; import java.lang.annotation.Target; import javax.interceptor.InterceptorBinding; @InterceptorBinding @Target({ TYPE, METHOD }) @Retention(RUNTIME) public @interface Log { } Mark the interceptor implementation package com.rest.interceptor; impor...

Apache KARAF + PAX CDI TOC

Apache KARAF + PAX CDI TOC Links to All the Apache Karaf  POST   OSGI Service   OSGI Command to Consume the OSGI Service   CXF + JaxRS + CDI to Consume the OSGI Service using  cxf-jaxrs-integration   PAX-CDI + Interceptor OSGI + PAX-CDI + Drool + Karaf OSGI  + PAX-CDI + Drool + Karaf + Decision Table

Apache Karaf + Pax CDI + OSGI Command and Function

Image
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...