A problem that's been plaguing a lot of us that use CF MX and IBM's JTOpen JDBC driver to connect to DB2 running on IBM's iSeries (AS400) has to do with CF MX hanging when a bad username or password is passed to the database. It's really frustrating on so many levels, especially since the only way to free the hang is to restart the CFMX service. Sometimes even this isn't enough, and the server must eb rebooted. Obviously, this isn't good in a production environment.

Jeremy Lyon emailed me today to let me know that there's a JDBC URL parameter that you can set to fix this problem. Basically, there's a parameter called prompt. The JavaDoc definition for prompt is:

"Specifies whether the user should be prompted if a user name or password is needed to connect to the server. If a connection can not be made without prompting the user, and this property is set to "false", then an attempt to connect will fail."

What this means is that by default, prompt is set to True. If you pass a bad username or password, the system attempts to "prompt" the user for a username/password. Since you aren't using an interactive application to make your connection, you never see this prompt, and the system "hangs" indefinitely.

The fix is to ALWAYS specify prompt=false in your JDBC url. This way, id a bad username/password is passed, the JDBC driver will report this back to ColdFuion, and an exception can be thrown.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Jeremy's Gravatar YES VIRGINIA, CFMX DOES RUN ON THE ISERIES!

I just installed J2EE MX 6.1 on a 740 V5R2 using Websphere 5.0 express for iSeries.

I am running cfm's directly on an AS/400!

Jeremy
# Posted By Jeremy | 12/10/03 1:27 PM
Rob Brooks-Bilson's Gravatar Jeremy,

Very excellent! Can you outline the steps you went through to get it working? We're in the process of migrating from a 740 to an 825, and I was thinking of trying it out once the upgrade is complete.

Are there any features you find that don't work when running it on the iSeries (besides COM and Verity)? Also, did you install it on an iLinux partition, or on the native OS400 (can that even be done?)?

How's performance of the app server itself? Do you notice any difference in accessing DB2 vs. running CF MX on a different server/platform?
# Posted By Rob Brooks-Bilson | 12/10/03 2:06 PM



Copyright 1995-2010 Rob Brooks-Bilson. All rights reserved.
Aura skin for Raymond Camden's BlogCFC inspired by Joe Rinehart & Steven Erat. This blog is running version 5.9.004.