•November 3, 2009 •
Leave a Comment
This is how we set timeout when we call a web services.
public static void main(String[] args) {
MyTimeoutSampleMainmain = new MyTimeoutSampleMain();
try {
MyTimeoutSampleStub stub = new MyTimeoutSampleStub(“http://xxxxx/webservices”);
long soTimeout = 2 * 60 * 1000; //2 minutes
soTimeout = 2 * 1000;
stub._getServiceClient().getOptions().setTimeOutInMilliSeconds(soTimeout);
getResponseFromWebServices(stub);
}
catch (AxisFault ex) {
ex.printStackTrace();
}
}
Posted in Apache, JAVA, Web Services
•September 17, 2009 •
Leave a Comment
Thanks to http://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/
for X in $(du -s * | sort -nr | cut -f 2); do du -hs $X ; done
Posted in Linux, Shell Command
•July 24, 2009 •
2 Comments
I’ve search the www and at last i found a tool to rotate my Apache access.log and error.log
I use
Cronolog from http://cronolog.org/ , it is a free tool to use and easy to setup.
This cronolog is tested and run on Windows
- download the installer from http://cronolog.org/download/cronolog-1.6.1-win32.zip
- extract it to somewhere , mine is C:/cronolog/ and you can find
- cronolog.exe
- other stuffs
- Go to your Apache conf httpd.conf and find your access logfile , you will see CustomLog C:/apache/logs/access.log common
- Turn off the line and add this line TransferLog “|C:/cronolog/cronlog.exe C:/apache/logs/access.%Y%m%d.log”
- Restart apache and your new access.log file will be created with access.20090709.log
- Next step, you can backup your access log for old logs.
Posted in Apache, Windows
•July 15, 2009 •
Leave a Comment
I have a very old server running on Redhat 9. I prefer Redhat 9 for my internal development server since it provides the stability, and I managed to get 99% server uptime for my year end review.
This server has been installed :
1. Apache 2.2 2. Jdk 1.6 3. Tomcat 5 4. Php 5 , with latest libxml
I manage to install the latest Ruby 1.8.6 and Rails. I will share the step by step to install it.
For info, i have installed Ruby 1.9 in the server but it cannot support Redmine. Therefore i have to uninstall it the hard way.
I will share the steps soon.
Posted in Linux, Rails, Ruby
•July 14, 2009 •
2 Comments