WebSphere ESB and EJBs

My next post will probably be a book review – I was asked to review a new book on WAS 7.0 administration. Cool. Hopefully I’ll be able to read it in the next couple of days (did I ever mention I was a quick reader?)

In the meantime, I want to publish my findings on the use of EJBs in WebSphere ESB.
A customer of mine is using WebSphere ESB. For services, it developed EJBs (stateless, of course, but still – version 2.0).
The mediation module has imports for the EJBs.
This turns out to be a very bad architectural decision (I arrived to the project after this decision was taken 🙂 ) , and right now they are rewriting everything, to drop EJBs and use SCA Java components.
  1. SCA Java components are actual EJBs, so why have an EJB call an EJB? Not a smart move, performance wise.
  2. Mediation Module (6.1) EJB support is lousy. It fails generating good mapping between the Java bean parameters and Data objects. So my customer resorted into sending Strings to the EJBs, and then parsing them, at the EJB level, to POJOs, using XMLBeans. This is insane – and shouldn’t be done.
So what is the current (working!) recommendation?
Use SCA Java components, in the same module, or other modules, depending on your component visibility and deployment needs.
Inside the Java component, use a mapper to map the DataObject object into real Java POJO. and then pass it to your business logic, which is implemented in regular Java Classes.
The mapper is really easy to write:
1. Use JAXB or XMLBeans to generate mapping between the DataObject XSD and a Java class.
2. Write a method that has the following signature:
public static Object mapper(DataObject do, Class clz)
3. Use reflection on the clz – create a new instance of it, and for every field decide:
3.1 If its a primitive – transform it.
3.2 If its a Java Class – call yourself in recurssion
3.3 If its an array – run over all elements
It works fine, great performance, and the development barrier was lowered by more than a few inches.
Hope it serves someone well.

Problems installing WID 6.2 on Windows 7

I faced many problems while installing WID 6.2 on my Windows 7 machine. I won’t get into the full set of problems I encountered, but the process that did work for me was as follows:

1. Don’t run the launchpad application, but the installer inside IM_win32
2. Run the installer in compatibility mode, for WindowsXP SP2
3. Since I already tried installing – I had to install everything to a clean directory
3.1 This is a reported bug and was fixed in a fixpack already
4. Remove the file c:windows.nifregistry
I found the last tip after digging inside the installation log files, I found the following command executed -C:/Program Files/IBM/WID62/image/WPS62/iip/contrib/6.1.0-WS-WASWS/1/WinX32WEBSVinstall.exe -options C:/Users/liran.ALUNA/responsefile.WEBSV.txt -silent
And the log file specified a NullPointerException on the com.ibm.ws.install.ni.framework.product.VersionUtils.compareVersionsUpToDigit(VersionUtils.java:170)
The weird thing is that I did everything by the book, so it’s not clear to me why no one else got this error. But hey – it works now…

Working with Linkedin

I’ve found that I’m using LinkedIn more and more. As a matter of fact – I think I spend around 2-4 hours a week on LinkedIn – getting new connections, sending messages, and finding leads. Heck – I even found a recommendation for my kid’s kindergarden from LinkedIn. Not exactly what I would expect from a professionals network.

But mostly – I try to hire people through LinkedIn. All our tests found this to be the most effective way to get CVs. From around 700 connections I usually get 40 responses (not all from my connections, and I also post in groups I belong to) – around 80% of them relevant. Much better than the junk I get from web based hiring sites, or from head hunters.
Still – I have a problem. Can’t understand why LinkedIn limits me in sending messages to only 50 people at once. Considering all of these guys are my friends – LinkedIn shouldn’t care about that. Heck – if they only offer this option for premium sites – I’ll go premium (they don’t, however).
What to do? Can’t say it here (haven’t checked the legal stuff yet). But I might have found a solution. It involves coding however. Tons of coding. Luckily I have strong Java roots…