摘要:
Q:What is the best strategy for loading property and configuration files in Java? A:When you think about how to load an external resource in Java, se... 阅读全文
摘要:
root@hpux# netstat -an |grep FIN ... note processes in FIN_WAIT_2 root@hpux# ndd -get /dev/tcp tcp_fin_wait_2_timeout # record this 0 root@hpux# ndd -set /dev/tcp tcp_fin_wait_2_timeout 30000 # ms? = 30s root@hpux# ndd -get /dev/tcp tcp_fin_wait_2_timeout 30000 root@hpux... 阅读全文
摘要:
在一个web项目中使用Logback作为日志组件,当初以tomcat7作为web容器时,日志可以正常输出,后来把tomcat7换成Jboss As 7之后,找不到系统日志。GOOGLE了一下,找到一个解决办法:在META-INF或WEB-INF文件夹下,创建一个jboss-deployment-structure.xml文件,内容如下:<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.0"> <ear-subdeployments-isolated>false< 阅读全文
摘要:
在Unix-like系统中,有一个内置的用于计算MD5值的程序——md5sum。通过md5sum命令计算md5值,格式:echo -n "Your-String-Here" | md5sumeg:echo -n "admin" | md5sum输出结果:21232f297a57a5a743894a0e4a801fc3 阅读全文
摘要:
在前一篇日志:Java 流行框架(Spring/Struts2/Hibernate/iBatis)都在使用什么日志组件,介绍了当前流行框架 Spring、 Struts2、 Hibernate、iBatis(Mybatis) 分别使用的是什么通用日志组件:Spring 3.0.4:Commons-LoggingStruts 2.2.1:间接的优先支持 Commons-LoggingHibernat... 阅读全文