Singleton in Spring by Hongfeng Sun
Follow-up to Singleton in Spring from Oracle/Java/OthersA spring bean default to be singleton. The following class is a Spring beanClass Transform{ private Map errors = new HashMap(); public void...
View Articlerefactoring code by Hongfeng Sun
A utility classpublic class AUtils{ public static void funcationA(){ Map valueA = callMe(); func_A(valueA); } public static void funcationB(){ Map value A = callMe(); func_B(valueB); } }Better to...
View ArticleCommon features of Java Applications by Hongfeng Sun
AgendaDatabase featuresShare knowledgeUsing Java to monitor databaseDatabase FeaturesFirstly I want to outline some common features of Java web application. These features will influence how a DBA...
View ArticleSQL*Net more data from client by Hongfeng Sun
A while ago, OEM report some alert messages to us:Wait class "Network" was consuming significant database time. Wait event "SQL*Net more data from client" in wait class "Network" was consuming...
View ArticleORM tools by Hongfeng Sun
Writing about web page /java/entry/java_connection_pool/Writing about an entry you don't have permission to viewObject Relational Mapping (ORM) Tools provide a slick way of persisting objects (data)...
View ArticleJVM language property by Hongfeng Sun
Use -Duser.language=en to set the lanaugae enviroment in Java application.
View ArticleEffective Java note by Hongfeng Sun
Interface : java.util.Comparator : impose total ordering (more restriction) Interface: java.lang.Comparable: compareTo method is referred to as its natural comparison methodYou must override hashCode...
View ArticleChecklist before release by Hongfeng Sun
Before every release, check the following list:Documentation finished? Checked out all CVS code? Any other changes besides Java code: js, css, configure files (system properties or conf)Check...
View ArticleCountDownLatch by Hongfeng Sun
public static long time(Executor executor, int concurrency, final Runnable action) throws InterruptedException { final CountDownLatch ready = new CountDownLatch(concurrency); final CountDownLatch...
View ArticleChrome Java plugin by Hongfeng Sun
On my ubuntu box, there are two versions of JDK installed: OpenJDK and Sun JDK.The latest version OpenJDK I can get now is openjdk-7-jdk. root> java -version java version "1.7.0_15" OpenJDK Runtime...
View Article