Wednesday, July 30, 2014
Install JDK from command line
jdk-8u11-windows-x64.exe /s ADDLOCAL="ToolsFeature,SourceFeature" INSTALLDIR=D:\Java8\jdk1.8.0_11
Tuesday, July 22, 2014
Quartz job run time overlapped solutioon
normally when we schedule a job,we expected that when job started when at second scheduled time,the first run before this run is not finished,two process will have some time overlapped,this could cause data in db not consistent.
the solution is make job stateful, next run will wait for first run to finished.
public xxxxxJob extends QuartzJobBean implements ApplicationContextAware,StatefulJob{
}
interface StateFulJob is the key here.
the solution is make job stateful, next run will wait for first run to finished.
public xxxxxJob extends QuartzJobBean implements ApplicationContextAware,StatefulJob{
}
interface StateFulJob is the key here.
Friday, June 20, 2014
Adding CBC radio into foobar2000
open foobar2000,from menu file --> add Location.
put following into the address:
http://playerservices.streamtheworld.com/pls/CBC_R1_TOR_H.pls
put following into the address:
http://playerservices.streamtheworld.com/pls/CBC_R1_TOR_H.pls
Tuesday, June 17, 2014
JBOSS WEB ACCESS LOG CONFIG
in Jboss server folder /deploy/jbossweb.sar,file server.xml
find tag valve with following attributes
classname="org.apache.catalina.valves.AccessLogValve"
directory="${jboss.server.log.dir}"
filedateformat="yyyy-MM-dd"
pattern="%{rl_client_ip}i %h %l %u %t "%r" %s %b %D"
prefix="${jboss.server.name}_access."
resolvehosts="false"
suffix=".log" valve
pattern is explained as following:
It is modeled after the apache syntax:
find tag valve with following attributes
classname="org.apache.catalina.valves.AccessLogValve"
directory="${jboss.server.log.dir}"
filedateformat="yyyy-MM-dd"
pattern="%{rl_client_ip}i %h %l %u %t "%r" %s %b %D"
prefix="${jboss.server.name}_access."
resolvehosts="false"
suffix=".log" valve
pattern is explained as following:
- %a - Remote IP address
- %A - Local IP address
- %b - Bytes sent, excluding HTTP headers, or '-' if no bytes were sent
- %B - Bytes sent, excluding HTTP headers
- %h - Remote host name
- %H - Request protocol
- %l - Remote logical username from identd (always returns '-')
- %m - Request method
- %p - Local port
- %q - Query string (prepended with a '?' if it exists, otherwise an empty string
- %r - First line of the request
- %s - HTTP status code of the response
- %S - User session ID
- %t - Date and time, in Common Log Format format
- %u - Remote user that was authenticated
- %U - Requested URL path
- %v - Local server name
- %D - Time taken to process the request, in millis
- %T - Time taken to process the request, in seconds
- %I - current Request thread name (can compare later with stacktraces)
- common -
%h %l %u %t "%r" %s %b - combined -
%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"
It is modeled after the apache syntax:
%{xxx}ifor incoming headers%{xxx}ofor outgoing response headers%{xxx}cfor a specific cookie%{xxx}rxxx is an attribute in the ServletRequest%{xxx}sxxx is an attribute in the HttpSession
Tuesday, May 20, 2014
java mail failed with connection denied from ,ail server
add following parameter to JVM globle or put it in maven batch file
-Djava.net.preferIPv4Stack=true
Tuesday, May 13, 2014
Subscribe to:
Posts (Atom)