- 博客(27)
- 资源 (1)
- 收藏
- 关注
原创 nginx502超时错误
问题:一个复杂逻辑的请求,请求处理时间较长,做了session共享,session会丢失(报ngnix502 bad gateway) 问题。解决:location节点增加相关参数 proxy_connect_timeout 300; #默认60秒 proxy_send_timeout 300; #默认60秒 proxy_read_timeout ...
2012-09-03 22:28:32
298
原创 Linux Command: source
NAMEsource - Evaluate a file or resource as a Tcl script SYNOPSISsource fileNamesource -rsrc resourceName ?fileName?source -rsrcid resourceId ?fileName?DESCRIPTIONThis command tak...
2012-08-25 22:22:30
140
原创 转:Shallow and retained sizes
Shallow and retained sizesYourKit Java Profiler is capable of measuring shallow and retained sizes of objects.Shallow size of an object is the amount of memory allocated to store the object itself...
2012-08-06 18:42:54
161
原创 spring mvc redirect
public class RequestMappingHandlerAdapter extends AbstractHandlerMethodAdapter implements BeanFactoryAware, InitializingBean {.....protected final ModelAndView handleInternal(HttpServletRe...
2012-07-30 23:10:19
111
原创 spring 多工程加载多属性集配置问题
<bean id="propertyConfigurerJdbc" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="order" value="1" /> <property nam
2012-07-23 14:54:21
73
原创 struts2配置文件路径
请求时报以下异常:com.opensymphony.xwork2.inject.ContainerImpl$MissingDependencyException: No mapping found for dependency [type=com.opensymphony.xwork2.ObjectFactory, name='default'] in public void com.open...
2012-07-12 18:57:20
64
原创 spring web配置
比较诡异的一个问题,最近将项目移植到maven上管理,打包后发布到服务器上竟然报业务类没有定义:org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'xxx' is defined 在移植之前一切正常,移植后只是将依赖交由maven来管理,配置文件什么的都没有内容上的变更。最后找出的原...
2012-07-10 18:13:08
67
原创 执行mvn 命令出现的duplicated in the reactor问题
maven组合项目中,运行mvn clean,报以下错误: [INFO] Scanning for projects...[INFO] ------------------------------------------------------------------------[ERROR] BUILD FAILURE[INFO] -----------------------...
2012-07-10 18:00:48
958
原创 VM虚拟机Bridge模式VMnet0网卡无法启动问题
之前通过qq管家优化了系统服务之后,VM怎么也连不上网络,后来把相关关闭的服务都开启,还是无法联网。无意中在VM的message log中看到这个日志:The network bridge on device VMnet0 is temporarily down because the bridged Ethernet interface is down 在VMWARE的Virtual...
2012-07-05 23:08:01
441
原创 原:hibernate延迟加载延伸的一个问题
hibernate配置延迟加载报:failed to lazily initialize a collection of role: com.ln.jtf.biz.dal.dao.pojos.Customer.cusaccounts, no session or session was closed。原因是web上get子表时session已经关闭。针对这个问题spring提供了解决方案,有两种方...
2012-06-30 14:31:47
105
原创 oracle:rank
Term: RANKDefinition:In Oracle PL/SQL, RANK function is a built in analytic function which is used to rank a record within a group of rows. Its return type is number and serves for both aggregat...
2012-06-26 13:27:17
66
原创 freemarker中文乱码
<!-- 设置 ViewResolver --> <bean id="freemarkerConfiguration" class="org.springframework.ui.freemarker.FreeMarkerConfigurationFactoryBean"> <property name="templateLoaderPath"...
2012-06-23 22:05:59
73
原创 nginx内置变量
$args, 请求中的参数;$content_length, HTTP请求信息里的"Content-Length";$content_type, 请求信息里的"Content-Type";$document_root, 针对当前请求的根路径设置值;$document_uri, 与$uri相同;$host, 请求信息中的"Host",如果请求中没有Host行,则等于设置的服...
2012-06-19 18:24:15
55
原创 转:Nginx使用Linux内存加速静态文件访问
转自:http://blog.prosight.me/index.php/2012/02/889Nginx是一个非常出色的静态资源web服务器。如果你嫌它还不够快,可以把放在磁盘中的文件,映射到内存中,减少高并发下的磁盘IO。先做几个假设。nginx.conf中所配置站点的路径是/home/wwwroot/res,站点所对应文件原始存储路径:/opt/web/resshe...
2012-06-19 17:52:19
149
原创 转:oracle驱动版本
转自:http://elf8848.iteye.com/blog/811037 classes12.jar,ojdbc14.jar,ojdbc5.jar和ojdbc6.jar的区别,之间的差异 在使用Oracle JDBC驱动时,有些问题你是不是通过替换不同版本的Oracle JDBC驱动来解决的?最常使用的ojdbc14.jar有多个版本,classes12.jar有...
2012-06-19 16:46:04
112
原创 转:java.sql.SQLException: 违反协议异常的一种解释
转:java.sql.SQLException: 违反协议异常的一种解释 转自:http://willam2004.iteye.com/blog/900077 一次做应用升级出现了一个问题,描述如下: 升级分为两块,一块是数据库结构变更(表结构增加新字段);一块是应用程序的升级。 应用环境为:jboss4.0.5 + ibatis + spring 数据源在jbos...
2012-06-19 15:30:25
839
原创 转:maven Package-specific Lifecycles
The specific goals bound to each phase default to a set of goals specific to a project’s packaging. A project with packaging jar has a different set of default goals from a project with a packaging...
2012-05-21 11:16:50
80
原创 java volatile
volatile is a keyword.When member variables are marked with this keyword, it changes the runtime behavior in a way that is noticeable when multiple threads access these variables. Without the volati...
2012-05-15 22:22:40
83
原创 java native
native is a java keyword.It marks a method, that it will be implemented in other languages, not in Java. It works together with JNI(Java Native Interface)Syntax:[public|protected|private] native...
2012-05-15 22:20:24
59
原创 java transient
transient is a Java keyword which marks a member variable not to be serialized when it is persisted to streams of bytes. When an object is transferred through the network, the object needs to be 'seri...
2012-05-15 22:18:38
72
原:nginx请求转发问题
这段时间系统上出现一个很怪异现象,即生成很多重复订单,从生成时间上看,有同一时间的,也有相隔几分钟的。开始怀疑是程序上的问题,排查程序,没有找到问题原因。进而怀疑是nginx的配置问题,那么先需要证明这个怀疑。要证明这个怀疑就得找到--通过nginx的http请求与生成订单的关联,即客户端的一个请求,在nginx上被处理了两次。 办法:加日志。 1. nginx日志:加上客户端IP...
2012-05-06 21:07:25
430
原创 转:Enabling HTTP request response logging on JBoss 4.2
Enabling HTTP request response logging on JBoss 4.2转自:http://blog.leenarts.net/2010/08/26/http-request-response-logging-jboss-4-2/Today I had a bit of a fiddle with JBoss 4.2 due to IE7/...
2012-05-01 22:54:45
113
原创 原:nginx系统访问权限造成http响应慢的问题
在说问题前,先扫下盲,关于linux下的nobody用户: nobody是系统用户,是一个不能登陆的帐号,一个特殊用途的用户 ID ,一些服务进程如apache,aquid等都采用一些特殊的帐号来运行,比如nobody,news,games等等。一般来说 uid < 500 的都是系统 ID 。Linux 系统为了安全,很多操作和服务的运行都不是运行在 root 用户下面的,而是...
2012-05-01 22:45:43
715
原创 转:NGINX Log Customization
转自:http://wiki.zimbra.com/wiki/NGINX_Log_CustomizationYou can customize Nginx logs in order to get more detailed information. For example, in order to get session cookie information on nginx.acce...
2012-04-26 13:30:44
172
原创 转:Multiple Component Instances with OSGi Declarative Services
Multiple Component Instances with OSGi Declarative ServicesWhen we define a component using OSGi Declarative Services (DS), by default we are defining a singleton. For example using the Bnd annot...
2012-04-22 20:48:33
94
原创 转:我在Facebook的十点经验分享 - 非反人类文字版
转:我在Facebook的十点经验分享 - 非反人类文字版本文转自http://blog.sina.com.cn/hwang123我是2007年初加入Facebook, 那时大概150人; 2011年9月底离开, 当时3200多人. 经历了很多稀奇古怪但影响很大的项目, 像Application Platform, Social Ads, News Feed, Gift Shop, F...
2012-04-21 13:34:25
174
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人