Jen-Ming Chung

Using Amazon S3 as a Private Maven Repository

This article is a quick tutorial to setup a private maven repository using Amazon S3 instead of Nexus or Artifactory.

Read More

Apache Shiro NullPointerException after Logout on GlassFish 4.1

GlassFish  stuffed fish (Photo Credit - Michael Coté) (Photo via Michael Coté, CC License)

Read More

Integrating Apache Shiro with CAS Authentication via LDAP

In this post I want to share how to setup SSO with CAS and LDAP authentication, and then demonstrate how to integrate Apache Shiro with CAS in the web application.

Read More

How to Customise the Jackson JSON ObjectMapper in Java EE Enterprise Application

Assume we have a naive User POJO class with a BSON Type ObjectId field, i.e., id.

Read More

Convert ObjectId to String in MongoDB Asynchronous Java Driver

Here’s quick share of converting the ObjectId to String in MongoDB Asynchronous Java Driver:

Read More

Map-Reduce with MongoDB and Morphia

Just a note to record the usage of Map-Reduce with MongoDB and Morphia. Firstly, add the Morphia dependency.

Read More

Using the MongoDB Aggregation Framework via MongoDB Asynchronous Java Driver

I often use Morphia in projects for mapping Java objects to/from MongoDB and it’s Query API instead of building the complex DBObject query. However, the current version (v. 0.105) without aggregate command support. Fortunately, the MongoDB Asynchronous Java Driver provides the aggregate builder to construct complex pipelines of operators in fluent way. As usual, the following paragraphs will express some basic usages of mongodb-async-driver in aggregation pipeline framework through an example.

Read More

Integrating Swagger into JAX-RS with Java EE 6 specification

Swagger is an awesome framework we often used to describe, consume and visualize our RESTful web services. Typically, we use Tomcat with Jersey as a servlet, then specify the Swagger package and Swagger Configuration class into web.xml, finally annotate the resources, methods and models to complete the configurations. Our team recently built a Java EE 7 application for a RESTful web service. The goal of this article is to share our experiences of configuring Swagger in Glassfish 4 without a web.xml.

Read More

How to solve jsoup does not get complete HTML document

massive-bytes-content

Read More

CentOS: Installing Apache Portable Runtime (APR) for Tomcat

In Tomcat, the default HTTP Connector is BIO (Blocking I/O) connector with stability, low concurrency characteristics. To boost the Tomcat performance, the alternative ways either adapt NIO (Non-Blocking I/O) or APR (Apache Portable Runtime) connector. Especially, the APR performance is generally better than others when using SSL protocol. For more details on performance among these connectors can reference the Mike Noordermeer’s comparison.

Read More