Posts
70 entriesDisabling the cache when testing MariaDB queries
When tuning queries, run this first to see uncached results.
calling a spring jpa namedQuery directly
As in Test.java, you can execute a NamedQuery defined in orm.xml directly with the EntityManager..
spring redis integration
Integrating Redis with Spring using spring-data-redis, from the dependency through configuration and the result.
Switching Flume's default logging from log4j to logback
These turned out to be bigger downsides than expected, so I made a simple sink project.
Splitting log files by time + size in logback
With logback, the file rolls over when the day passes or the size goes over 100MB.

Flume install and test (mac)
Installing Flume and a basic flume.conf sample, from setting JAVA_HOME to configuring sources, channels and sinks.
building a website with spring + sitemesh
Let's set up sitemesh. There's almost nothing to change in sitemesh.xml (just the decorators.xml file path) Setup is done once you drop in the xml…
spring jpa save
In jpa you save with the repository.save method Like the class, @OneToMany or @ManyToOne fields can be saved together.
Calling c++ (dll) from c# with an LPCTSTR parameter
An example of calling a c++ dll from c#. CallingConvention = CallingConvention.Cdecl and [MarshalAs(UnmanagedType.LPWStr)] are the important parts.
Saving a control to png in WPF (c#)
I was going to use System.Drawing like I did before.. turns out wpf already has this built in..