RSS feed [root] /weblog /hack and faq



title search:


Fri Nov 19 01:06:58 AEDT 2021

hack and faq

(google search) (amazon search)
download zip of files only

Mon Jan 07 18:52:55 AEDT 2008 From /weblog/hack+and+faq


If you do not have permission to create RMI client, like setting RMISecurityManager, instead of throwing SecurityException, RmiProxyFactoryBean of spring will just return NULL to client... -

And there is an issue before spring 2.0rc4, The toString() method of bean will be called after bean created (finished constructor call) and before setting properties (call setter to press beans to properties). If any methods of those properties called at the toString() method, you will get NullPointerException -

Blog about session scope -

refresh config without restarting -

Possible multi-thread issue -[..]te/archive/2006/09/are_your_beans_1.html , basically this just mentioned the fact that most spring base injection is through setter, which make the object mutable, and you need to take care about that

spring mvc web framework tutorial -[..]-spring-aspect-oriented-programming-aop/

testing with spring -[..]akes-unit-testing-easy-with-annotations/

if need to use hibernate with jdbc directly, need to flush hibernate session first -[..]rnate-session-includes-tse-example-code/

(google search) (amazon search)

Sat Dec 08 18:19:15 AEDT 2007 From /weblog/hack+and+faq


Browsing the signature to get the idea of the code -

(google search) (amazon search)

Thu Nov 29 06:52:35 AEDT 2007 From /weblog/hack+and+faq


On 9/27/07, Carfield Yim wrote:

How to get instance fo nsIDownloader using javaxpcom?

It's not too difficult. The JavaScript code you pointed to has this line:

var nsIDownloader = Components.classes["@;1"].createInstance();

The "Components" object is a helper object in Mozilla JavaScript, so we need to do things differently in JavaXPCOM.

We need to use the nsIComponentManager interface ([..]com/components/nsIComponentManager.idl), which has a createInstance() method. So something like this:

nsIComponentManager compMgr = Mozilla.getInstance().getComponentManager();

nsIDownloader createInstance = (nsIDownloader) compMgr

.createInstance( "@;1", null,


(google search) (amazon search)

Fri Jul 06 12:00:49 AEST 2007 From /weblog/hack+and+faq


Some info of solaris threading

(google search) (amazon search)

Thu Mar 01 18:22:50 AEDT 2007 From /weblog/hack+and+faq


IE don't press cookies to iframe, thus some webapplication fail in this case. To fix that we need to disable cookie but use URL rewrite. In order to do that we need to config webcontainer differencely:

Tomcat -[..]/disabling-session-cookie-in-tomcat.html
Jetty -[..]6/11/disabling_session_cookies_in_jetty/
Resin -[..]com/thread.jspa?threadID=731779&tstart=0

By the way, if you get "java.lang.OutOfMemoryError: PermGen space", may be this blog can help -[..]try=preventing_java_s_java_lang#comments

Adding load balancing with just mod_proxy and mod_rewrite -

(google search) (amazon search)

Wed Dec 20 14:51:27 AEDT 2006 From /weblog/hack+and+faq


Change log level dynamically -[..]ng-log4j-logging-levels-dynamically.aspx

(google search) (amazon search)

Tue Dec 05 23:22:56 AEDT 2006 From /weblog/hack+and+faq


If you have problem of connecting to CVS through ssh and non-standard port, please refer to

cvs -d co MyProject
But this results in the following error:
CVSROOT port specification is only valid for gserver, kserver, and pserver connection methods.
According to this posting
it seems, that it is necessary to define an ssh-Alias by adding the following lines to ~/.ssh/config:
Host SomeCvsServer
Port 12345
Then the following command will be rewarded with success:
cvs -d :ext:michi@SomeCvsServer:/opt/cvs co MyProject

(google search) (amazon search)

Fri Oct 20 13:43:23 AEST 2006 From /weblog/hack+and+faq


decimal problem -[..]hneller?entry=mysql_5_0_decimals_queried

(google search) (amazon search)

Thu Sep 21 15:37:19 AEST 2006 From /weblog/hack+and+faq

sun application server

If you try to connect to jndi lookup service and get the connection refuse message to localhost:3700 , but you really like to try connect to host , you need to set java system properties like follow

-Dorg.omg.CORBA.ORBInitialHost= -Dorg.omg.CORBA.ORBInitialPort=12074

(google search) (amazon search)

Thu Sep 21 13:15:54 AEST 2006 From /weblog/hack+and+faq

sun web server

If you have multiple start-* file under server_root/https-admserv directory, sun web server will pick the wrong one and assume it is start-jvm script

(google search) (amazon search)