I have a client that sends a synchronous request to my session bean and expects the response to be sent synchronously. In order to fulfill the request, the session bean talks to a component that uses JMS. Therefore, the session bean publishes the request to the JMS-based component. Now, the response from the JMS-based component is received only by subscribing to a topic. In order for my session bean to return the response to the client in the same thread (synchronously), it has to do one of the following: 1) the session bean can poll the destination using the MessageConsumer.receive()methods. 2) block on some event (??); Its MessageListener code would then receive the published response (in a thread started by the JMS provider). It would then signal the event on the session_bean. The session bean would become unblocked and return the response to the client. I know (1) can be done. Is (2) possible? Also, I first thought that Message Driven Beans might be helpful but, after reading about them, I see that in the above scenario, I'm still faced with trying to get a session bean to act synchronously. If I used an MDB instead of a session bean, the client would then have to communicate with the MDB using publish/subscribe (and I wanted the client to communicate synchronously) =========================================================================== 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".
