RSS feed [root] /weblog /hack and faq




login:

password:

title search:




 


Fri Nov 19 01:06:58 AEDT 2021

hack and faq



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

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

spring


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... - http://java.sun.com/docs/books/tutorial/rmi/client.html

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 - http://forum.springframework.org/showthread.php?p=78557#post78557

Blog about session scope - http://www.memestorm.com/blog/session-scoped-beans-in-spring-20/

refresh config without restarting - http://jroller.com/page/Solomon?entry=spring_2_0_4_servlet

Possible multi-thread issue - http://blog.xebia.com/2007/03/01/spring-and-visibility-problems/ http://weblogs.java.net[..]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 - http://spring.javabeat.net[..]-spring-aspect-oriented-programming-aop/

testing with spring - http://www.mularien.com[..]akes-unit-testing-easy-with-annotations/

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

(google search) (amazon search)


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

general


Browsing the signature to get the idea of the code - http://c2.com/doc/SignatureSurvey/

(google search) (amazon search)


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

xul


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["@ mozilla.org/network/downloader;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 ( http://mxr.mozilla.org[..]com/components/nsIComponentManager.idl), which has a createInstance() method. So something like this:



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

nsIDownloader createInstance = (nsIDownloader) compMgr

.createInstance( "@ mozilla.org/network/downloader;1", null,

nsIDownloader.NS_IDOWNLOADER_IID );

(google search) (amazon search)



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

solaris


Some info of solaris threading

http://developers.sun.com/Solaris/articles/alt_thread_lib.html
http://www.sun.com/software/whitepapers/solaris9/multithread.pdf

(google search) (amazon search)


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

container


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 - http://jf.omnis.ch[..]/disabling-session-cookie-in-tomcat.html
Jetty - http://www.mojavelinux.com[..]6/11/disabling_session_cookies_in_jetty/
Resin - http://bbs.chinajavaworld.com[..]com/thread.jspa?threadID=731779&tstart=0


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


Adding load balancing with just mod_proxy and mod_rewrite - http://wiki.apache.org/cocoon/LoadBalancingWithModProxy

(google search) (amazon search)


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

log4j


Change log level dynamically - http://blogs.averconsulting.com[..]ng-log4j-logging-levels-dynamically.aspx

(google search) (amazon search)


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

cvs


If you have problem of connecting to CVS through ssh and non-standard port, please refer to http://michi.knallgrau.at/blog/month?date=200511

cvs -d :ext:michi@cvs.some.server.com:12345/opt/cvs 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
-> http://lists.gnu.org/archive/html/info-cvs/2004-10/msg00291.html
it seems, that it is necessary to define an ssh-Alias by adding the following lines to ~/.ssh/config:
Host SomeCvsServer
HostKeyAlias cvs.some.server.com
Hostname cvs.some.server.com
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

mysql


decimal problem - http://jroller.com[..]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 172.19.100.60:12074 , you need to set java system properties like follow

-Dorg.omg.CORBA.ORBInitialHost=172.19.100.60 -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

http://sunsolve.sun.com/search/document.do?assetkey=1-9-67993-1

(google search) (amazon search)