Wednesday, November 28, 2007

Spaghetti delay

1. Meeting with Director - Can you do it at 11AM? Umm No I have to catch a flight. On Wednesday how come?
2. Meeting on phone while driving.
3. Working from Airport.
4. Mechanical problem with the plane. Possibly canceled.
5. Rebooked from San Fran. instead.
6. Flight delayed.
7. Sitting at Airport and working.
8. Will arrive east coast after mid-night and have to be at Client's at 8:30 in the Morning.
9. With 3hr Time difference (ahead), bracing for a short night and red eye.
10. One day and back to west coast.
11. Vertical stack in west and Horizontal scale in east.

Question: Why burning myself? Anyone listening?

Saturday, November 24, 2007

How spicy is your spicy?

I prefer spicy food but I am particular about it. My world is somewhere in the middle though. My coat size is not 40 short, it is 40.5 short. The waist is not 33 but 32.5. My food has to be a notch up from medium but not suicidal hot. There are a very few Restaurants who understand what my 'hot' mean. Most of them just screw it up. My question always is - How spicy is your spicy? I have asked spicy and it turns out to be just medium, someplace too spicy and burning hot and a hot has turned out to be just a dull medium. I do not understand if the chef already has the curry prepared, why don't they just serve it as a taste? The question - How hot do you want? puts us in an unknown space. The body part that is not participating in that conversation is the tongue. Make it hot but not too hot. Hotter than a medium. Hold on! this is a Thai place.. Is your medium really hot? Is this a real Indian food? Do you really mean hot when you said so? Just putting the tongue in a harm's way. Something like promising a SLA and then engaging the developer afterwards.

Friday, November 23, 2007

Condemn the blasts

Three simultaneous bomb blasts killed 13 and injured 45 in the state of Uttar Pradesh. One of the cities happened to be Lucknow, the state capital. These terrorists are really becoming pain in the neck. Thoughts sometime did cross our mind to listen to what they demand but they do not deserve it. These are a group of barbaric fanatic killers and a follower of a fanatic version of the religion. There are so many soft targets to choose. States have been so irresponsible so far in handling these threats. The country with astronomical GDP has given no thoughts on employing cameras and CCTVs in sensitive areas like Airports, Train/Bus stations, Courts and Places of religious importance. You need to be more aggressive. BTW, the chronology of this attack is:

1. India captures the mastermind of a terrorist attack.
2. Terrorists plan to kidnap an Indian politician to demand his and 45 other's release.
3. The plan got busted and three Pakistani terrorists captured in Lucknow, India.
4. Lawyers manhandled these terrorists and refused to take up their case.
5. Simultaneous blasts killed 13, most of them lawyers. A terror organization takes responsibility.

Where did they deserve mercy? These people are not killing because of any political reasons, or because of injustices. If left unchecked, in future they will kill just because you do not follow their form of religion. Democrat/Republican alike, look at your left and look at your right. If you see a terrorist, could you please just beat $h!t out of him?

Thursday, November 22, 2007

Mama, when would you retire EJBs?

If you answer yes to any of the following then it is time to retire your EJBs:
1. Just because you had an Application server.
2. Because that was the buzz and talking about it was cool.
3. Everyone was using it.
4. Even if the client and the EJB are run in the same network.
5. Thought EJB is SOA.
6. EJB on the resume looked hot.
7. There was no other way you knew to expose the application.
8. Container was a magical term.
9. Believed what servlet is to front-end was EJB to the back-end?

Its time to look beyond your traditional J2EE and look at Grid computing.

Shame in the manifesto

1983 riot - Attributed to Congress
Gujarat riot - Attributed to BJP
Nandigram - Attributed to the communists

These are our only three national level parties. I don't see any shame listed in their manifesto.

Sunday, November 18, 2007

Invoking EJB from a BPEL process using WSIF

BPEL is about integration. It is about standard governed by a world body. It is about Open standards. I am helping one of my clients with BPEL integration with system interfaces ranging from JMS, Relational Database, E-Business suite, FTP/File and EJBs. And I recently got a call about HTTP posts, but thats for a later day. Oracle's BPEL process manager has pre-defined adapters for almost all the interfaces we can think of. If not, then it provides an Embedded Java Activity that can be used to write custom codes. I found some challenges with EJB. Oracle BPEL PM implements these integration using Apache's WSIF infrastructure. WSIF requires system's interface to be exposed as a WSDL. Quite powerful it is as it can be done for standalone Java APIs to services exposed as EJBs. But as lazy-ass I am, I do not want to hand-write WSDLs. Oracle has a product WSA which makes life much easier. Following are the steps to be taken with caveats and bugs/problems I ran into.

1. With every Oracle application server installation you would find a wsa.jar in the $ORACLE_HOME/webservices/lib directory. wsa.jar can be used to generate WSDL for the EJBs.

2. Problem (1): The EJB interface has to implement javax.rmi.Remote interface and its' methods has to throw RemoteException. Anyone who is familiar with EJB3.0 specification knows that its not required anymore. On top, the EJB implementation does not even need to implement any interface as long as @Remote annotation defines what interface to expect. Quite a powerful specification indeed. Unfortunately WSA needs to catch up a little. Not too behind though.

3. So if you have a fancy EJB and you have a control over its' source code, make sure you make the changes described in step (2).

4. Run the following command:

java -jar wsa.jar -genWsdl -output <directory> -wsifEjbBinding true \
-style rpc -use encoded \
-jndiName SessionEJB -jndiProviderUrl ormi://localhost:12401/<context_name> \
-initialContextFactory oracle.j2ee.rmi.RMIInitialContextFactory \
-interfaceName <EJB_INTERFACE> -className <EJB_CLASS_IMPL> \

5. The WSDL is generated in the directory specified. Edit the file to remove any HttpSoap ports and bindings. Another a must to note is only RPC-encoded style of WSDL has to be generated.

6. Now, in the BPEL process add a partner link and import this generated WSDL. Invoke the appropriate methods.

7. Make sure in the bpel.xml file EJB authentication/credentials properties are set for the EJB partner link.

<partnerLinkBinding name="IEJBA">
<property name="wsdlLocation">IEJBARef.wsdl</property>
<property name="">oc4jadmin</property>
<property name="">admin123</property>

8. Make sure the EJB classes are in the CLASSPATH for bpel process to find out.

Deploy the EJB and deploy the BPEL process.

Problem (2):The wsa.jar does not work with EJB2.1. If you create an EJB2.1, its' interface extends EJBObject which extends Remote. But wsa.jar fails on methods it does not understand part of EJBObject. I highly discourage hand-writing WSDL for even simple interfaces, the task becomes daunting for complex ones. Of course either I do not understand something or it is an unsupported feature in WSA. Hope soon to be resolved.
Solution:I encourage to change the EJB version to 3.0 if it is under control and can sell the advantages to your business units. With little faith they usually have on its' IT, there exist a work around. With all the dislikes I have for vertical stacks we still can introduce a custom EJB3.0 deployed locally which in turn can invoke the EJB2.1 internally. The BPEL process instead of talking to 2.1 can talk to 3.0 and 2.1 problem can be circumvent.
The other solution is to use jDeveloper that has a graphical interface that lets you choose the methods you want to import. When WSDL is generated this way, you can deselect the methods specific to EJBObject interface.

British Hawk's beautiful artistry

Friday, November 16, 2007

Biden for Vice-President

In the world of politics if strong candidates suddenly starts praising someone, all it means that they want him/her out of the race and endorse them instead. After months of debates Joe Biden has found himself in the same position. Biden was never a strong candidate for the final nomination but he has the best chance to be the next Vice President of the country. And the kind of bi-partisan work he has done over the years he could end up being one of the most remarkable VP of recent years. The question is if it will be witty flip-floppy, sophomore honesty or the underdog we call Edwards as his boss? With a strong VP on their side I guess either of the three would do just fine.

Sunday, November 11, 2007

Oracle Openworld

I won't be in SanFran to attend Oracle's openworld. I know a lot of folks from my customers are attending it. My colleagues will be at Coherence table so don't forget to stop by and listen to what they have to stay. I am sure it will be a fun event.

Monday, November 05, 2007

Emergency in Pakistan or..

Musharraf knows if he goes for elections he is out. Advantage may not be to Benazir Bhutto either as it seems. So lets connect the dots. Bhutto returns and an assassination attempt shakes the entire region. Could this be a handy-work of Mushharraf too? Using this as a precursor to impose emergency in the state. Reminder guys.. he is an Army commando. He knows what he is playing against. He knows how far the world will go. Can the west live with a democratically elected Taleban/Al-Queda sympathetic govt in Pakistan? I guess not and he knows it. A few arrests here and there and he is extended for another two years. The problem is if the world does not do anything now then the people who do believe in democracy will be alienated further.

Saturday, November 03, 2007

Beautiful Niagara

Democracy tastes good. Try it!

Pakistan's declaration of state of emergency has prompted me to blog about democracy. What is it worth? I am not only passionate about the subject but equally confused as well. I always wanted to ask people who sleep on streets and barely have food and shelter of their opinion on democracy. I wonder what would they say? I would rather prefer to live in a country run by a kind hearted King who would take care of me, my security, my job, my house and all that. Why to live under democracy when this system is only about majority instead of equality?
I am a programmer by profession. I test my software under two scenarios - The best case when things are just perfect. Unlimited memory, 100% uptime, lots of CPU power etc. The second, when the application is susceptible to failures, what we call the worst case scenario. We can get more insight on applying the same philosophy to the political systems of today. What if the King or the General is not so good? What if there are human rights violations? What if the Army is used to suppress people and their freedom instead of protecting them? We can not win a war with an army can we? What options are we left with then? Not only Pakistan, we have seen this in many other parts of the world too. Even though the best-case was far better than any other system we know about, suddenly the worst-case scenario looks far more terrible. Recovery for them seems impossible and doomed.
So what is Democracy worth? For one, It never leaves you option-less. Helpless may be, may be painful at times but never option-less. You may not end up getting equal opportunities to succeed but you always have an option to gather people around your beliefs and push for a change. Opportunities may not come your way but you have an option to scream about not having them. A great fighter is the one who recovers from his fall, again, again and again. Democracy lets you recover. It smells sometime but it tastes good.