A blog about my daily tech ramblings.

Showing posts with label Apache Karaf. Show all posts
Showing posts with label Apache Karaf. Show all posts

Wednesday, 12 November 2014

Masking Sensitive Information using CXF Logging Interceptor

In this article we'll see how to mask/hide sensitive information when using CXF Logging IN/OUT Interceptor.

The solution was built to run on Apache Karaf / Fuse ESB, but a similar approach can be utilised to run the custom logging interceptor on other environments.


Alternative approach by parsing SOAP XML Payload : Source Code

Wednesday, 5 February 2014

Using jRebel with Apache Karaf / Fuse ESB

February 05, 2014 Posted by Unknown , , No comments
Let's see how to use jRebel in Fuse ESB/Apache Karaf.

1. Download jRebel

2. Unzip/Install jRebel and activate it using the jrebel-activation.jar which can be found at JREBEL_HOME/bin.

 3. Add the javaAgent (rebel.jar) & enable the camel plugin in karaf.sh (Mac/Linux) or karaf.bat (Windows) by adding the following line -
 
%JAVA_OPTS% -javaagent:/path/to/jrebel.jar -Drebel.camel_plugin=true

Note :  -Drebel.camel_plugin=true will enable the jRebel plugin for Apache Camel.

Friday, 9 August 2013

Using External Properties in Apache Karaf [Fuse ESB]

August 09, 2013 Posted by Unknown , , , 5 comments

Introduction

In this example we will see how to use an external property file in Fuse ESB / Apache Karaf.

Creating a configuration file

Create a config file named sample.cfg in FUSE_HOME/etc with the following content.

Spring Configuration


Blueprint 


Note : The default blueprint placeholder syntax (accessing the blueprint properties directly) is ${Key}. Hence, outside the scope of a camelContext element, the placeholder syntax you must use is ${Key}. Whereas, inside the scope of a camelContext element, the placeholder syntax you must use is {{Key}}.


Camel Route

Friday, 2 August 2013

Injecting OSGi Service Registry in Spring Context

August 02, 2013 Posted by Unknown , , , 1 comment

Introduction

In this example we will inject a OSGi service registry inside a Spring Context.

OSGi Service Registry

Let's assume we got a Oracle datasource in our OSGi container with the following service description. (Please see this link)

Spring Configuration

1. Add the OSGi namespace in your Spring context.


2. Using the osgi:reference to get the datasource object.



Oracle Datasource in Fuse ESB / Apache Karaf

August 02, 2013 Posted by Unknown , , , , 1 comment
Creating a Oracle data-source in Fuse ESB [Apache Karaf]


1. Create a blueprint xml file as shown below -


datasource-oracle.xml




2. Installing the Oracle Driver in Karaf console

install -s wrap:mvn:com.oracle/ojdbc6/11.2.0

Note: Please make sure you've got the Oracle Driver in your local/remote maven repository. If you don't have it please install with the following maven command -

mvn install:install-file -Dfile=ojdbc6.jar -DgroupId=com.oracle \
    -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar

2. Deploy it on the Fuse ESB server

Copy the datasource-oracle.xml in the FUSE ESB deploy folder ( e.g. %FUSE_SERVER%/deploy )