Viewing Individual Entry / Main
  ::   September 5, 2003

FIX: Handling Bad Database Username/Passwords with CFMX and DB2/400
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.



Calendar
Sun Mon Tue Wed Thu Fri Sat
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31            

Recommended Reading
The Cuisine of Hubert Keller

Archives by Subject
Announcements (28)
ColdFusion (61)
Database (12)
Dreamweaver (1)
Flash (2)
Flash Remoting (2)
Flex (3)
General Development (2)
Homesite + (1)
Mach-II (3)
MAX (9)
Mozilla (2)
Music (1)
Politics (1)
Portals (2)
Travel (2)

Search

Links
CFLib.org
Raymond Camden's Blog
Christian Cantrell's Blog
Sean Corfield's Blog
Nathan Dintenfass' Blog
Todd Rafferty's Blog
Steve Rittler's Blog
Cameron Childress's Blog

Credits
Based on blog.cfc by Raymond Camden

XML Feed