Displaying posts filed under

configuration

Feb
17
2011

Lucene IndexWriter optimize() behavior change since version 3.0.3

Lucene is a powerful full-text index and search development tool written in JAVA. Over more than ten years, Lucene has evolved to version 3 (stable version).
Recently, I upgraded Lucene library (the core jar file) from version 3.0.2 to version 3.0.3 (which was released in December 2010) in my project. The purpose of the upgrading is [...]

Dec
6
2010

OpenJPA Auto Detach Configuration and Memory Issues

When I was doing some work with OpenJPA, I found there is a possible memory leaking issue when OpenJPA is used for data access without the proper configuration of the parameter of auto detach (openjpa.AutoDetach).
The scenario that the memory issue may happen:

One EntityManagerFactory and One EntityManager are used throughout the whole session;
The session contains [...]

Jun
9
2010

How to Configure Spring beans.xml File: The Use of PropertyPlaceholderConfigurer

The file “beans.xml” used for you application is already a kind of configuration file. However, this file is designed for the developer who can quickly customize the application with less coding changes. It is not recommended for an end user to change the file.
For example, you can, of course, define the database connection properties in [...]

Jun
7
2010

How to Configure Spring beans.xml File: Collection properties and EntityManagerFactory Examples

Java beans in Spring can also have their collection properties populated in the beans.xml file. The collection properties here mean things like List, Map and Array.
For example, if you want to create a JPA EntityManagerFactory with a set of connection properties, these properties can be configured in beans.xml like this:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" [...]

May
18
2010

How to Configure Spring beans.xml File: Basic Usage

how to configure spring beans.xml file with more flexibility
Spring is a very flexible java framework. In spring, beans are the main building bricks of an application while the bean configuration file (mostly beans.xml) acts as cement that glues the beans together.

The file beans.xml also allows beans to be initialized with particular values. For example, you [...]