Tuesday, March 4, 2008
Feb 29, A bad day for apache ftpclient users
I am writing this blog after being severely hit by apache ftpclient bug on February 29.
Unsurprisingly the bug has hit the whole world of apache ftpclient users and there were number blogs immediately started popping up.
By abstract this is the bug all about. When the ftpclient parses the files one by one, it validates the file timestamp. In Unix system it gets the file properties and the date will have the MMM HH:mm if the file is less than 6 months old. Since there is no year in the time stamp string, ftpclient parses it with year 1970 (Well done !) which of course is not a leap year. So Feb 29 is not a valid date in 1970 hence this code segment in class UnixFTPEntryParser returns null.
try{
file.setTimestamp(super.parseTimestamp(datestr));
}catch (ParseException e){
return null; // this is a parsing failure too.
}
There are many temporary ugly fixes based on your requirements ;) For me , I just needed the files to be downloaded, so I catch the exception and if the date string has "Feb 29" and the current year is leap, I just set a Feb 29 time and return the File instead of NULL.
But people who needs correct time stamp will have to a bit of extra work. This link discusses about possible fixes and implications.
The good thing is we have another four year time to fix this problem !!!
Friday, February 29, 2008
More on spring integration
Like I mentioned in my previous post, I in fact had a shot at spring integration. And I asked my buddy Lahiru to have a work on it. And unsurprisingly he found no time to get familiar with the model.
This is a one major reason why I favor spring integration even though it is far away from being matured.
I don't find any other proper open source EIP solutions alive. Two possible solutions which come across are ActiveMQ and Apache Camel.
So why I prefer spring integration over these solutions ? Here are my points.
1) The AOP support.
Just imagine the beauty of designing the AOP based integration solution. It will be a treat to do and follow.
2) What most of us are doing with Mule (or other opensource ESB) now ? We just use spring every where in it. 9 out of 10 times this is spring on Mule. So being persisted with one framework (which is of course spring! ) will be much more easier for the developers.
3) Spring documentation.
Many times I have mentioned this in my blog. Spring documentation and examples give us no time to understand the solutions easily. I haven't see any other documentations which can get closer to this. Spring addresses its documentation is a user's point of view where most of other open source documentations are done on the developer's(I mean the developers involved in the particular open source product) point of view.
4) The IOC model.
The same I mention again. It will be easy to plug in the third party adapters with less fuss. I think it is pretty obvious advantage.
So what I am looking for in the near future on this.
1) WS support
Desperately need this. I think they will have it before the 1.0 release. SOA is becoming a marketing term these days and it is vital for the designers to have the WS support. So it is so important that spring integration must be released with WS support. But even now it will not be difficult to have a such adapter anyway.
2) Facility to make hot configuration.
When it comes to production environment, application providers will see easy way of plugging their applications. So a kind of JMX based admin console would be handy. Then again exposing a bean MBean is very easy in spring and you can still self cook.
Now few hiccups on using Mule which is a tested ESB solution and you can still use it for EIP. To be honest, I had a bit of confused wrong view on ESB against EIP and tried Mule for the purpose of EIP. Surely you can do. But its like using hammer to smash a mosquito. Mule is intended to be used for ESB. Though it pretty tough call to use it for typical SDP solutions, you can still use it. But I differ for using it solely for EIP. Because you will put unnecessary efforts to make it working (Actually I did) and its documentation will never be helping that much.
But I am pretty confident that a good EIP framework can turn out be a good ESB solution. When you do that, you will have your own flavor and you will have nothing more than what you need. Spring integration has its potential. I wish they have a spring integration (EIP framework) and separate ESB framework so
So the morale of the post having two points.
1) Like Americal Idol judge Rendy says "Spring integration, Check it out baby, check it out ! "
2) If you have any butterflies regarding to EIP, ESB and SOA, work on it. Read hell lot of documents and get the clear picture of them. I still am working on !!!
Monday, January 28, 2008
Hang on ! Spring integration is due
But spring integration framework must be much better option with time. Not just because it is spring, but it is because of its IOC. Even before you dig in to this Reference Manual you can think of how easy the applications could be wired using spring. And with spring web services and Spring integration , you can model a good SOA architecture in your applications.
I am going to have a try on this. Will update you with progress.
Monday, January 21, 2008
IVY 2.0 is released as apache project
Delighted to see Apache IVY released its 2.0 version under apache. IVY is a long time sitter under incubator and I surprised about it in this post. Good to see IVY is under apache label now. Even better I see it under ant which will definitely help promoting IVY. I always feel that ivy + ant will always a better option over maven for small and medium proprietary projects. We at hsenid use ivy heavily and it is our major dependency management setup.
Click here to see the release notes.
Congratulations IVY.
Monday, January 14, 2008
Is Your HTML Good Enough?
IE NetRenderer will show your page in IE 5.5, 6, or 7, to give Mac and Linux-based designers a quick sanity check. It’s free and quick.
BrowsrCamp is designed to show off how your page looks under the various Mac browser out there. You can view Safari screenshots for free, or take VNC control of a live Mac loaded with 11 different browser for prices starting at $3 for 2 days.
Browsershots is the most comprehensive of the free services, offering screen captures of your site under dozens of different Linux, Mac, and Windows browsers. It’s also popular, and it can take quite a while for requests to work to the head of the queue to be rendered. They’ve recently introduced a $15 per month priority processing program to jump requests to the head of the queue.
BrowserCam offers an online interface for managing screenshots across a variety of recent browsers and operating systems including Linux, Mac, and Windows; their coverage is excellent. You can get a 24-hour free trial; after that, plans range from $19.95 for one-day access to $399.95 for a full year. Their separate Device Capture service is the only one I know that will do screenshots of your site on Blackberry and Windows Mobile devices.
Litmus covers a variety of Windows browser, from IE 5.0 up to the alpha of Firefox 3, and say they’re adding Mac browsers soon. Results are returned via screenshots. They also integrate bug tracking, version management, and private URLs you can use to share compatibility results with clients. These features come at a price after the initial 30-day trial: 39 euros monthly for an individual account, or 129 euros monthly for a team account.
Browser Photo comes from Keynote NetMechanic. They promise screenshots from Windows, Mac and Linux systems for a $15 one-time fee or $150 per year, but don’t offer any details on which browsers or versions they cover in advance of sign-up, or any trial program.
BrowserPool takes the VNC approach to provide access to Mac, Windows, and Linux systems. Their pricing starts at 29.99 euros for one month, but unfortunately their software versions are a bit out of date.
Monday, December 24, 2007
Deploying mobicents services on startup
I had spent about 20 minutes to search in the mobicents documentation to find out the way to make the mobicents deployments permanent. But unfortunately I could not find in the documents which I thought should be a important documentation for any such servers. It might be my mistake to look out the wrong documents or I am afraid, it might have missed in their documents.
But fortunately I didn't spend too much of time to find the way. It is of course an easy and straightforward task. but I wonder how this good procedure made unnoticed and not documented properly. My apologizes to mobicents community if I didn't really look into the correct documentations.
You just have to use a template BSH script to make it working .. thats it.
For example I need my http-servlet-ra to be deployed on server startup and make it permanent.
Here are the steps I followed.
- Copy the
/resources/http-servlet-ra/*.jars into server/server/all/deploy-mobicents/ Copy the
/resources/http-servlet-ra/deploy-http-servlet-ra.bsh into server/server/all/deploy-mobicents/scripts/
Thats it. Your resource adapter will be installed on server startup. You don't have to do ant ra-deploy from ra folder anymore !
Now how about installing and activating our own sbb jars on startup? Simple .. I have a http connector sbb to be deployed and activated upon startup. These are the steps I followed to do so.
Copy the httpconnectorsbb-DU.jar into
server/server/all/deploy-mobicents/ Now you have to write a httpconnectorsbb-DU.bsh file and copy in to
server/server/all/deploy-mobicents/scripts/
Use the following sample bsh file and modify it for your service. Make sure you have the same name as your DU jar file name.
You may just have to modify these two variables. Add your sbb name, sbb vendor and the version mentioned in your sbb jar xml.
String thirdPCCTriggerURL = "${jboss.server.home.url}deploy-mobicents/ThirdPCCTrigger-DU.jar";
ServiceIDImpl serviceId = new ServiceIDImpl("se.jayway.sip.slee.service.ThirdPCCTrigger-service", "Jayway", "0.1");
Now start your mobicnets server and you will see your RAs and SBBs installed and activated there.
Coool !!!
Wednesday, November 28, 2007
Observer pattern using spring AOP
Visit here to have a look !