Monthly Archives: December 2014

Hibernate Logging (e.g. JBOSS logging)

I was getting the following debug logging, even though my logging config said info and above. During my research, I learned that Hibernate is logged via JBoss Logging. It used to require a properties file that denoted which logging implementation … Continue reading

Posted in hibernate, hibernate logging, jboss, jboss logging, jcl-over-slf4j, log4j-over-slf4j, logback, Logging, slf4j | Tagged , , , , , , , , | 1 Comment

Logback log filtering

We wanted to default logging of all messages to warning and above for libraries that we used. We wanted our code to be logged at the info level and above. There was one specific library class that was logging a … Continue reading

Posted in appender, appender configuration, logback, Logging, Logging configuration, slf4j | Tagged , , , , , | Leave a comment

Spring C-notation

In a previous post, I talked about¬†Spring P-notation. ¬†In this blog post, I will give an example of the Spring C-notation for constructor arguments. The C-notation namespace needs to be added to your configuration file. All that is left is … Continue reading

Posted in Java | Tagged , , , , , , , , , | Leave a comment

Random Number Generator provider abstract class

I had a need to support multiple hardware random number generators (RNG) in a project. I started with an RngProvider abstract class. This class defines the functionality that will be the same and defines a method that will contain the … Continue reading

Posted in Java | Tagged , , , , , , , , , , | Leave a comment

Filling a queue asynchronously via a thread

I was working with a hardware random number generator (RNG) and what it came down to was we needed a cache of numbers that were available, but also needed the fill the numbers without slowing the process of giving out … Continue reading

Posted in Java | Tagged , , , , , , | Leave a comment

Apache HttpClient 4 byte handling

After I wrote my own HttpClient ResponseHandler in Apache HttpClient 4 Custom Bytes ResponseHandler, I discovered that there might be a better way. I had used the following utility to get the bytes. I found that one of their classes … Continue reading

Posted in Java | Tagged , , , , | Leave a comment

Apache HttpClient 4 Custom Bytes ResponseHandler

An interesting thing I needed was to retrieve an image from a URL. HttpClient provides a BasicResponseHandler, which returns a String. I needed bytes in order to accomplish this, I had to implement my own response handler.

Posted in Java | Tagged , , , , , | 1 Comment