Spring
MultiResourceItemReader – “No resources to read”
By default Spring Batch MultiResourceItemReader ignores missing resources silently: Sounds familiar? Well, sometimes this behavior is wanted. But sometimes it is not and we would like to make it fail: As you see, MyMultiResourceItemReader now fails if you attempt to configure it with missing resources. If you need to go back to original behavior, just [...]
Neat Delicious trick – keywords combination
The real beauty of Delicious lies in keywords combinations. I mentioned already that Delicious is my #2 most favorite productivity tool. Within time I developed a set of the most frequently-used keywords in the right column that can be combined with tags in the left column: “hudson” – Mailing list – “ml” “spring” – Issue [...]
Artifactory REST API with Spring 3 RestTemplate
Artifactory’s REST API is something I was using quite a lot recently and would like to share my experience here. Normally, there’s no need to turn to the REST API when working with Artifactory and in most cases Maven, Hudson or TeamCity plugins are the only ones “talking” to it. But in this specific case [...]
Ant FTP task: adding progress indicator and timeout
Ant FTP task provides no option to display how much the download has progressed so far, similarly to wget or curl verbose options. Setting connection timeout isn’t possible either. But I had to implement it one day and here is what I have found out: Ant FTP task uses org.apache.commons.net.ftp.FTPClient Keeping track of download progress [...]
Say “No” to ServletResponse.setContentLength()
javax.servlet.ServletResponse.setContentLength(int) is a new kind of Y2k bug. It accepts int assuming no files larger than 2Gb will ever be sent as an HTTP response. If you pass a long larger than 231-1 which is exactly 2Gb, it overflows and negative header is sent in response. Free Download Manager fails to download a file and [...]
Spring: Ant-like files pattern matching
Spring Batch job definition: “${path}/some.*.pattern.zip” is right, I can guarantee that. Double-checked! So why Spring Batch complaints “No resources to read” and does nothing? Argh .. probably, has something to do with files pattern matching. All right, I was curious about Ant-like files pattern matching in non-Ant environments for a long time already. How one [...]


