Wednesday, March 12, 2008

Configure MQ on iSeries

To run MQ on iSeries, one must start the MQ subsystem with command:

strsbs sbsd(qmqm/qmqm)

Then we can access the queue manager with "wrkmqm" command.

Europa catch

Europa is the name for Eclipse 3.3 EE version. I recently began to Europa for JEE5 development. Found a big catch. I used Europa with JBoss4.2.2. For some reason I found I can not deploy a class named "TestServlet" as a web service class. No matter what the package name I gave. It always result in error "Allocate exception for servlet TestServlet". Very strange.

Wednesday, February 20, 2008

import signature files from iSeries

Here is how I imported the company's digital certificate (key pair) from iSeries machine:

1. get the KDB file from the iSeries file structure and move it to a windows box
2. Use a java-based tool named iKeyMan.bat to open the key db file. The tool is shipped with Websphere product.
3. export the key pair to an existing "jks" format file which is java keystore. The file will server as the keystore, and can be used to sign jar files.

Thursday, February 07, 2008

DB connection error in websphere + iSeries

Recently we have a stale connections problems in a WebSphere App server running on iSeries database. I realized the problem might be the getConnection() method is not synchronized(serialized) at the JDBC driver implementation. So two threads can potentially get the same connection and step on each other. It sounds like a bug to me. The solution is easy, just synchronize the code that call getConnection() method, of course, I am assuming the calling class is already in a Singleton mode.

Friday, January 18, 2008

Some more tips

1. I found a cookie problem recently, basically the cookie can not be set from a web app on a linux server. It turned out the server had a very off time. And the cookie expiration time is calculated by current server time + cookie life time. If the server is behind the time too much, it will no set the cookie to the browser any more.

2. Always use varchar instead of char in DB column design to save space if the column's String length is unknown. In DB2 use varchar type directly, in Oracle we should use varchar2 type since varchar is reserved for other purpose according to one article.