• Subject: Re: rec level i/o using toolkit not threadsafe?
  • From: dawall@xxxxxxxxxx
  • Date: Thu, 30 Dec 1999 06:35:16 -0600

Just in case you didn't see the reply posted to the forum (I didn't see it
mirrored here) ...

It is safe to use these method calls with threads. Although the system API
calls are not thread safe, Toolbox synchronizes all the methods that use
these APIs. So, as long as you use Toolbox classes, you are protected. If
you implemented your own native calls, then all bets are off.  Check out
system value QMLTTHDACN if you want to suppress the messages.

David Wall
AS/400 Toolbox for Java

"Alex Garrison" <agarrison@logtech.com> on 12/23/99 07:25:07 AM

Please respond to JAVA400-L@midrange.com

To:   JAVA400-L@midrange.com
Subject:  rec level i/o using toolkit not threadsafe?

Is anyone out there using the IBM java toolkit record level i/o classes in
a multithreaded environment (all servlets, for example, are multithreaded)?
If so and you using the toolkit RecordFormat or AS400FileRecordDescription
classes, you may have a problem.  The websphere joblog says one or both of
these classes is using DSPFD and DSPFFD under the covers to retrieve the
record format and field descriptions.  These commands are not threadsafe in
either v4r3 or v4r4.  You should see messages in your joblog like "Command
*LIBL/DSPFFD not safe for job with multiple threads." and "Command
*LIBL/DSPFD not safe for job with multiple threads.".

While the actual i/o to a file may be threadsafe, retrieving the record
format and field descriptions is NOT.  I cant believe I am going to have to
hardcode my file record formats in my java code.  We are using the latest
mod2 toolbox.  Please tell me this is fixed in the beta mod3 or will be by

Alex Garrison

| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner: joe@zappie.net

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.