02
Jul
09

Writing a standalone JMS Java Client to connect to Websphere MQ 6.0 via Websphere Application Server 6.1

Somehow, when I tried to write a standalone client I kept coming across the following exception
java.lang.ClassCastException: javax.naming.Reference incompatible with javax.jms.ConnectionFactory “.

I followed intructions from here to setup the Queue, after which I created a simple java client to post a message to the Queue:

Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, “com.ibm.websphere.naming.WsnInitialContextFactory”);
env.put(Context.PROVIDER_URL, “iiop://localhost:2809″);

Context jndiContext = null;
try {
jndiContext = new InitialContext(env);
} catch (NamingException e) {

System.out.println(”Could not create JNDI API context: ” + e.toString());
System.exit(1);
}

ConnectionFactory connectionFactory = (ConnectionFactory)  jndiContext.lookup(”jms/JMSExampleConnectionFactory”);
Connection qConn = connectionFactory.createConnection();
Session qSession = qConn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Queue q = (Queue) jndiContext.lookup(”jms/JMSExampleQueue”);

MessageProducer producer = qSession.createProducer(q);
TextMessage message = qSession.createTextMessage();
message.setText(”test message”);
producer.send(message);

producer.close();
qSession.close();
qConn.close();

Even after switching to the IBM JRE and adding the relevant Jars (as suggested in most places.) the program kept throwing the ClassCast Exception. Just in case you are wondering, the relevant Jars ( found in <Websphere Installation Path>/runtimes/ and <Websphere Installation Path>/lib/WMQ/java/lib/ ) are:

com.ibm.mq.jar
com.ibm.mqjms.jar
com.ibm.ws.webservices.thinclient_6.1.0.jar
dhbcore.jar
ws_runtime.jar

After googling and reading through lot of forum threads I finally stumbled on the solution. To resolve this you also need to add added the <Websphere Installation Path>/plugins/com.ibm.ws.runtime_6.1.0.jar to the classpath.  Seems simple enough, but it took me ages to find. Hence the post.

25
Jun
09

How to use Gmail Offline with Prism and Ubuntu 9.04 64 Bit

Here are the instructions to get Gmail Offline working with Prism on a 64 bit installation of Ubuntu 9.04. I am assuming you have already installed the package prism-google-mail. If not, go to Synaptic Package Manager and install it.

1. Download the 64 bit version of Google Gears found here. (There are 3 links; I used the last one : gears-linux-opt-05210.xpi). Download it with another browser like Opera, so that the install dialog does not pop up.

2. Open the downloaded XPI file with the Archive Manager (File roller). (It’s just a matter of right clicking and extract. )

3. Edit the install.rdf fil. Search for code that looks like :

<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>1.5</em:minVersion>
<em:maxVersion>3.0.*</em:maxVersion>
</Description>
</em:targetApplication>

and replace it with this :

<em:targetApplication>
<Description>
<em:id>prism@developer.mozilla.org</em:id>
<em:minVersion>0.1.*</em:minVersion>
<em:maxVersion>10.0.*</em:maxVersion>
</Description>
</em:targetApplication>

4. Save the file. Archive Manager will asking you whether you want to update the archive. Say Yes.

5. Open Prism – Google Mail and on the bottom right corner click the Settings button and navigate to Tools > Addons.

6. Drag and drop the modified XPI file into the Addons window.

7. That’s it.

I have combined instructions from here and here to  create this post.

17
Jun
09

Raising the dead

Another attempt to bring this place back. So here are few updates that I feel are worth mentioning in no particular order.

1. I have changed my Job and will be staying a little bit longer in Singapore. I will be doing the same thing with some more responsibilities perhaps.

2. I have fallen for microblogging – http://www.twitter.com/swengeorge. However,  I will *try* not to delete this blog and to post more. (You have heard this one before.)

3. I am now the proud owner of a PS3. And I have played and finished these games so far : Metal Gear Solid 4, Half life 2 Episode 2, Portal, Killzone 2. What next ? InFamous most probably.

4. I have upgraded to Ubuntu 9.04 and must say the boot up speed amazes me, especially if you are using the Ext4 File System.

5. I lost all my songs because I backed up onto a FAT32 drive. The software in question sBackup writes a zip file to the back up device with incremental updates. If the zip file size exceeds 4GB (which it surely will do if you have a lot of stuff), nothing else will be backed up – but no error message is displayed. The problem? FAT32 File System supports files to a max size of 4GB. My fault, I knew it but somehow didn’t relate it.

6. I have developed a taste for Macallan and Ginger Ale. Love it.

7. I finally feel the new iPhone 3G S is worth buying. At least it has a complete feature set.

10
Feb
09

Back.

[Jun 17, 2009:  Updated this post a little]

Yes, I know the best way back is not a meme. But do I look like I give a f*ck ?

This meme is taken from Kalafudra with her rules.

Rules: Bold the items you’ve done. Don’t bold items you haven’t done.  Strike out the items you don’t want to do.

1. Started your own blog [ All of 2 times. And I don't  intend on starting a third. Hoping to keep this one alive]
2. Slept under the stars
3. Played in a band [ As mascot maybe ]
4. Visited Hawaii
5. Watched a meteor shower
6. Given more than you can afford to charity
7. Been to Disneyland/world

8. Climbed a mountain [I don't know if Mt Oberon counts.]
9. Held a praying mantis
10. Sang a solo
11. Bungee jumped
12. Visited Paris
13. Watched a lightning storm at sea
14. Taught yourself an art from scratch [Don't think I ever will]
15. Adopted a child [I am still not sure on this whole kid scene]
16. Had food poisoning [ 3 days of pure agony]
17. Walked to the top of the Statue of Liberty
18. Grown your own vegetables [In fact I wanted a whole garden. But you know laziness prevails]
19. Seen the Mona Lisa in France
20. Slept on an overnight train [ Being an Indian, it's hard to avoid.]
21. Had a pillow fight. [Pillow aren't really that soft. really.]
22. Hitch hiked
23. Taken a sick day when you’re not ill [All the time]
24. Built a snow fort
25. Held a lamb
26. Gone skinny dipping
27. Run a Marathon [Working on it]
28. Ridden in a gondola in Venice
29. Seen a total eclipse
30. Watched a sunrise or sunset
31. Hit a home run
32. Been on a cruise
33. Seen Niagara Falls in person
34. Visited the birthplace of your ancestors
35. Seen an Amish community [Do I really need to?]
36. Taught yourself a new language [All the time. First English, then Malayalam. So yeah I am counting this one]
37. Had enough money to be truly satisfied [They keep inventing new must have gadgets. What can I do ?]
38. Seen the Leaning Tower of Pisa in person
39. Gone rock climbing
40. Seen Michelangelo’s David
41. Sung karaoke
42. Seen Old Faithful geyser erupt
43. Bought a stranger a meal in a restaurant
44. Visited Africa
45. Walked on a beach by moonlight
46. Been transported in an ambulance
47. Had your portrait painted
48. Gone deep sea fishing
49. Seen the Sistine Chapel in person
50. Been to the top of the Eiffel Tower in Paris
51. Gone scuba diving or snorkeling [snorkeling it is]
52. Kissed in the rain
53. Played in the mud
[Good old times]
54. Gone to a drive-in theater
55. Been in a movie
56. Visited the Great Wall of China
57. Started a business
58. Taken a martial arts class [Kalari. :) ]
59. Visited Russia
60. Served at a soup kitchen
61. Sold Girl Scout Cookies [No thanks ]
62. Gone whale watching
63. Gotten flowers for no reason
64. Donated blood, platelets or plasma
65. Gone sky diving
66. Visited a Nazi Concentration Camp [Thanks, bro for reminding me]
67. Bounced a check [I don't really like using cheques. ]
68. Flown in a helicopter
69. Saved a favorite childhood toy
70. Visited the Lincoln Memorial
71. Eaten Caviar
72. Pieced a quilt
73. Stood in Times Square [I was there. But a little preoccupied in finding a loo]
74. Toured the Everglades
75. Been fired from a job
76. Seen the Changing of the Guard in London
77. Broken a bone [Forearm and thumb]
78. Been on a speeding motorcycle [Yes, with a drunk driver who just got challenged to reach a place in 2 minutes time though the place was atleast 5 minutes away. Scariest 3 minutes of my life]
79. Seen the Grand Canyon in person
80. Published a book
81. Visited the Vatican
82. Bought a brand new car
83. Walked in Jerusalem
84. Had your picture in the newspaper [I think the article was about me being a altar boy]
85. Read the entire Bible
86. Visited the White House
87. Killed and prepared an animal for eating [I like to keep the killing and eating part seperate]
88. Had chickenpox
89. Saved someone’s life
90. Sat on a jury
91. Met someone famous
92. Joined a book club
93. Lost a loved one [Rex.]
94. Had a baby
95. Seen the Alamo in person
96. Swam in the Great Salt Lake
97. Been involved in a lawsuit
98. Owned a cell phone
99. Been stung by a bee

21
Sep
08

Status update

Yeah , I haven’t written in a while, but here is the update:

I am in Singapore now and may be here for a while.

The Flight was short and can be summed up with a few words: average food, hot stewardesses, jack on the rocks and Kung Fu Panda.

Let’s hope the work on this side does not get too hectic, though I have a hunch it might not be a joyride

12
Aug
08

How to convert videos for PSP

I have a PSP 2000 with firmware 3.95. Over the last month I have been struggling to create videos for my PSP using Ubuntu Hardy Heron 8.10 . I did manage to create a few videos, using PSPVC,  but the audio seemed out of sync. Finally after a lot of trying I found a solution that seems to work for me and encodes faster too.

Following the guide on this page did the trick for me. AviDemux2.4 allows me to convert videos to H.264 format for the PSP in 720*480 resolution. You dont need to follow the entire guide -  just till the installation is complete. Then the Auto PSP full res option should work properly.

Oh, and in case it still doesn’t work for you, I remember doing this before installing AviDemux. Not sure whether it has any impact on AviDemux.

10
Aug
08

Mathematical Genius

Yes that’s me. I have been avoiding any sort of non gadget aided mathematics. This has led me to forget basic mathematics. I was trying to multiply a 4 digit number with a 2 digit number and wrote them on my notepad. What came next hit me quite hard – I had no idea what to do with the numbers after writing them down!! I couldn’t multiply !! It took me all of 5 minutes to figure out what to do. Sigh, rest assured I am avoiding calculators and the likes to calculate for a while.

In other news, I have become the proud owner of a Nokia E71. The Phone  has all types of connectivity (including the old infrared) and even looks amazingly sleek in its metallic body.

21
Jul
08

How far would you go to experience ‘The Dark Knight’?

1800 Rs (in tickets), 1400 km (from Chennai to Hyderabad and back), 24hr (in a bus) and one movie.. The Dark Knight in IMAX.

Definitely worth it.

After Prestidigitator had send me a link to this article I knew I had to see this movie in IMAX. And as with all crazy things, Johnny joined in from Bangalore.

09
Jul
08

-

In response to “You are an atheist?”

“Only on christmas and easter. Rest of the time it doesn’t even matter.”

– Dr. Gregory House (S4 Episode 2)

27
Jun
08

We will be right back after the break

Just to let all my readers (and fans) know that I will be heading home for a small vacation till the 7th of July. That would be a no connectivity area so don’t expect any new post till then (actually even after then). It’s not like I have been posting much, but I just thought I will give the Obsessive-compulsive refresh clickers – who keep coming by my blog in the vain hope of a fresh post – an opportunity to rest to their fingers.




Blog Stats

  • 34,415 pings

Pages

 

July 2009
M T W T F S S
« Jun    
 12345
6789101112
13141516171819
20212223242526
2728293031