<SNIP>
>To get around this restriction, we developed a helper class which
>implements the MessageListener interface. The session bean does the
>following:
>synchronize(helperObject)
>{
> helperObject.start(); // To switch on listening for messages in
> the JMS session in helperObject
> helperObject.wait(); // handle InterruptedException
> helperObject.stop(); // To switch off listening for messages in
> the JMS session in helperObject
> // process the message, which is stored in the helperObject
>}
EJB spec does not allow beans to use thread synchronization mechanisms
such as synchronized blocks, start/stop methods, etc. The above code
is not supposed to work on EJB compliant servers. If it does in your
particular
case you may find portability problems if you ever switch vendors.
Regards
Javier Borrajo
www.tid.es
===========================================================================
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".