Q: Can I build a multi-threaded application using EOF?
A: EOF 2.2 and previous releases are not thread-safe and EOF cannot be used in traditional multithreaded applications under WebObjects 3.5.1. Even if all of an application's EOF and database calls are contained in a single thread of a multithreaded application, there may be unpredictable failures as a result of this limitation.
For most applications, you can avoid the problem by using multiple processes instead of multiple threads. For each function you would otherwise assign to a new thread, start a new instance of a separate application process instead. You can use Apple's Distributed Objects (DO) technology to allow these applications to communicate with each other. You will still be able to use multithreading in those processes that do not involve EOF.
EOF 3.0 does support multithreading. In EOF 3.0, most objects support concurrent threads, except that only one active thread is allowed for each editing context and for each database context. This means that multiple requests can't be sent concurrently to a single database. Concurrenct, scalable database access is already available to WebObjects applications through running multiple instances. Multithreading now allows concurrency in most other EOF operations.
Complete information on multithreading under EOF 3.0 and WebObjects 4 is provided in the WebObjects 4 documentation.