karaf

How to configure a JDBC Appender for Red Hat Fuse 7 with Karaf

How to configure a JDBC Appender for Red Hat Fuse 7 with Karaf

For some integration projects it is helpful to persist application logs in a relational database instead of a plain log file. In this article, I show how to configure a JDBC appender for Red Hat Fuse 7 running in an Apache Karaf environment. There are instructions that describe how to persist messagess with PostgreSQL. Instead, I will show how to setup a JDBC appender for Oracle Database 11g.

I have tested this procedure with Oracle Database 11g Express Edition. A major difference I found is with the table syntax and the fact that the Oracle Database 11g sequence and trigger were required to auto-generate the primary key. Hence, users of Oracle Database 11g should find this article useful.

Continue reading “How to configure a JDBC Appender for Red Hat Fuse 7 with Karaf”

Share

Enabling Byteman Script with Red Hat JBoss Fuse and AMQ – Part 2

In my previous article, Enabling Byteman Script with Red Hat JBoss Fuse and AMQ – Part 1, we found a basic use-case for Byteman scripts with Red Hat JBoss Fuse or Red Hat JBoss AMQ. However, the log file was generated separately and only limited operations were possible. In this article I will show you how to use a Java helper class. By using Java, we get advanced operations to view or modify the content. Also, using java.util.logging allows us to log the statements to fuse.log, avoiding the creation of any other log file.

Continue reading “Enabling Byteman Script with Red Hat JBoss Fuse and AMQ – Part 2”

Share

Enabling Byteman Script with Red Hat JBoss Fuse and AMQ – Part1

In a production or customer environment it is not always possible to identify issues by looking at logs, nor is it always possible to setup remote debugging using an integrated development environment (IDE) and remote debug port. Often the issues are specific to the environment and can’t be reproduced. Having byteman scripts can help in these situations to identify issues without actual code changes. Whenever certain java class or logic is invoked, byteman scripts will also be invoked as per defined class and method in the byteman script.

Continue reading “Enabling Byteman Script with Red Hat JBoss Fuse and AMQ – Part1”

Share

Securing Fuse 6.3 Fabric Cluster Management Console with SSL/TLS

Introduction

Enabling SSL/TLS in a Fabric is slightly more complex than securing a jetty in a standalone Karaf container. In the following article, we are providing feedback on the overall process. For clarity and simplification, the article will be divided into two parts.

 

Part1: The Management Console

Part2: Securing Web Service:including gateway-http

 

For the purpose of this PoC, the following environment will be used.

Continue reading “Securing Fuse 6.3 Fabric Cluster Management Console with SSL/TLS”

Share

Persistent Custom MDC Logging in Apache Camel

Logging is an ubiquitous need in any production quality application, and one common scenario is to log the active (logged in) username, or to log the user and order IDs for customer order event details. This is typically done to create an audit trail so that issues can be more easily traced should something go wrong, but there are any number of reasons why you might decide to create a custom log.

Mapped Diagnostic Contexts (MDCs) in Apache Camel are great for creating custom logging statements, and will easily meet our needs for these use cases.  MDC is offered by both slf4j and log4j, and is also supported by JBoss Logging. (Apache Camel is a part of the Red Hat JBoss Fuse integration platform.)

In addition, you can use something like GELF to automatically index any MDC, thus allowing them to be easily searched using ElasticSearch (logging configuration is not required for this feature), so there are a few reasons why this might be an appealing solution.

This article will demonstrate how to set up MDC to perform custom logging.

Continue reading “Persistent Custom MDC Logging in Apache Camel”

Share