The spec clearly states that Session or Entity beans should not use any kind of thread related primitives such as Object.wait(), however, the reason might be more conceptual rather than technical. It might be an effort of the spec to discourage Object.wait() since the wait will only be valid in the JVM you are executing. This might work fine in development, however, in production where there are multiple JVMs running for load balancing results might be different.
However, a wait implemented with this mind might not be that bad. For example, we ALL wait when a request is made to the database using SQL. There IS a moment in time, when SQL is sent off to the DB, and we WAIT for the results to come back. Similarly, an Entity bean could be talking, using BMP, to a system other than a database using socket calls or a 3rd party API. In such an API, a wait might be used to wait for the response from the host system. So avoiding a Object.wait() somewhere the runtime stack of your code might not be possible. I think too many people simply say, you CANNOT use Object.wait() in your code, however, there is more to it than just that. I believe you CAN, if you know what you are doing and know what to expect. Comments? -AP_ www: http://www.alexparansky.com =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
