I have a main class in which I am calling java method with @Asynchronous annotation on it. I have imported javaeeAPI6.jar for it but the method runs synchronously. Please tell me what is not right. I have added a long for loop to check whether the code goes into next statement past the asynch asyncrounousCall() call but it hangs on it
import javax.ejb.Asynchronous;
public class TestClass
{
public static void main (String[] args)
{
System.out.println("synch");
createAsyncrounousDocument("", "");
System.out.println("synch");
}
@Asynchronous
public static void asyncrounousCall()
{
for(int i = 0; i < 9999999999L ; i++)
i = i;
System.out.println("asynch");
}
}
Thank you Aiden