Spring Data MongoDB GridFS 3.4

Oct 17, 2018

This article shows a typical usage of MongoDB GridFS with Spring Data MongoDB. This is for MongoDB java driver v3.4 and Spring Data MongoDB v1.10.x. Note that Spring Data MongoDB v2.X introduces breaking changes with the MongoDB java driver 3.6+. Thi... Read more

Handle Non-encoded Request URL

Oct 14, 2018

Normally we need to encode the request URL from the client before sending a request to the server, but there may be just one time that you really can't enforce the client to encode their request URL and sometimes it contains special characters that w... Read more

Tomcat Invalid Character in Request

Oct 10, 2018

8.5 Tomcat throws an `IllegalArgumentException` when processing request URL that has non-encoded illegal special characters. This article shows two workarounds.... Read more

Spring Data Repository Query Precedence Tricks

Oct 10, 2018

Spring Data repository method is very handy but it also comes with its limitation, especially when composed with condition precedence. This article shows one way to work with it and its caveats.... Read more

Entity Graphs for Lazy Loading

Oct 10, 2018

*Entity Graphs* are templates for persistence query. One common problem it solves is *Lazy Loading*. This article introduces the basics of *Entity Graphs* and how to use *Entity Graphs* with *JPA* and *Spring Data* to solve the *Lazy Loading*.... Read more

PostgreSQL and Hibernate CLOB

Oct 10, 2018

When you need a SQL data type that can hold more than 255 characters, you are likely to use some large character data type such as CLOB, BLOB. It is easy to find the right type if you know what exactly the database you will stick to. However, when we... Read more

Entity Mapping with Inheritance in Hibernate

Oct 10, 2018

Inheritance could be enabled in Hibernate with the `@MappedSuperclass` annotation. This annotation could greatly reduce the boilerplate in our entity mapping.... Read more

Exception Handling in WebMethods

Oct 10, 2018

`Try-Catch` block is commonly used to try a risky operation and catch the exception it may raise. This article shows the trick to do the similar thing without writing java code in a flow service with WebMethods.... Read more

Batch Patterns in WebMethods

Oct 10, 2018

Having been working with WebMethods Integration Platform from Software AG for about a year now on a large integration project with many vendor components such as SAP, CityWorks, ArcGIS Server, from knowing nothing about WebMethods to building reliabl... Read more

Building an Efficient Cache

Sep 26, 2018

To build a cache could be as simple as to just to use a key-value pair kind data structure. It works sufficient most of the time in a single-threaded application. However, when there are many clients access the same cache while the computation being ... Read more