1 Reply Latest reply on Dec 11, 2001 2:56 AM by pra

    Alternative to JMS using threads ???

    ypetinot

      Hi all,

      two days ago I tried starting a Thread from a Session bean so that my client don't have to wait for a long-lasting processing task to complete. I thought there woudn't be any problem with that, but practically I found out that it didn't worked as expected and I still don't understand why ...

      In going through the error log I found out that Jaws was throwing a java.lang.reflect.InvocationTargetException exceptions apparently related to the entity bean I try to instantiate within my thread ...

      If you have any idea why it seems to be a problem to start a thread from within a J2EE container ... please let me know ... I am pretty satisfied with using JMS but I just want to understand what went wrong when I tried using threads ...

      Cheers :-)

      Till then merry Christmas and happy new year ...

      Yves.

        • 1. Re: Alternative to JMS using threads ???

          Read the EJB spec. Starting a new thread in an bean is strictly forbidden: i.e it might work or it might not work. Importand stuff in the container may for example be hidden in a thread local and such.

          //Peter