Sunday, January 31, 2010

WebServices Reliable Messaging

A customer of mine asked me to build a POC of using WS-RM with CXF, C# and Oracle Service Bus. Against my better judgement - I said yes. I know it doesn't work - but I'm always up to the challenge.
Turns out documentation is shitty at best. Vendors provide a one-page demo, using messaging infra or embedded HTTP servers - no web containers or web servers.
So - I have decided to start with .net and CXF and leave the OSB for later.
The pain is installing VS2010 Beta 2 over my machine which had VS2010 Beta 1 - a version that was deleted a couple of month ago.
You can't install VS2010B2 on a B1 computer - you must do a reinstall of B1, then uninstall it, then install B2.
Bloody nightmare.

Sunday, January 3, 2010

WebSphere 7 - deployment performance

Well, I'm currently running a migration project from Oracle's OC4J to WebSphere 7. Why 7? Because the customer wants to use JSF 1.2, and EJB 3 - and we decided on going to WAS7 instead of WAS6.1 with the fix packs.

The migration wasn't so smooth - the customer used some proprietary code we had to change. And let me tell you - configuring TopLink to run on WAS is a real pain, especially when some TopLink code is accessed through EJBs and some through regular Java classes from the web tier.

But the real problem was WAS7 deployment. It took forever... We tried running it from RAD7.5 or from the admin console directly - it was painful. It took around 5 minutes, and every configuration action that required application restart took ages to complete.

Turns out the problem lies in the JavaEE5 spec. When you deploy an EAR it needs to look for annotated classes that are marked as EJB and servlets. So deploying a WAR file with a large number of classes and JAR files will be very slow.

There are deployment separation solutions (putting the classes in the app-inf/lib of the EAR instead of web-inf/lib of the WAR) but a quick fix, that fits when you don't use annotated servlets is to add the metadata-complete attribute to your web.xml file (in the web-app tag). It tells the deployer that all of your servlets and filters are configured inside the web.xml file.
See this link for the complete web_app_2_5 XSD description. http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd

Friday, January 1, 2010

WebSphere 7 book by Packtub

Well, I was asked by Packtub to review their new book on WebSphere Application Server 7. It was 3 month ago, but I finally got around to it.

The book starts kinds of slow - downloading WinSCP and Putty, installation on Linux. Not sure this is the most common developer scenario.
And I'm not sure I would learn WebSphere App Server for the first time from a book...
But then the book starts to kick off - Chapter 3 talks about Security. Insane - considering the fact that 90% of the WebSphere administrators I know don't know how to configure security. And they go into detail - configuring LDAP and stuff.
Then they go on on Tracing, Performance - what everybody should know - and they explain it in a step-by-step manner.

So from my side - I think it's a good book. Especially since so few people really understand how to work with WebSphere App Server.
On the down side - there is no Web Services chapter. With the new Web Service pack (available in WAS 6.1 and builtin in WAS 7) it's impossible to configure web services in WAS, and it's a shame the book didn't cover this complex topic (especially web services security).