I just started learning ejb and now have problems. My ejb code is
@Stateful
@StatefulTimeout(value=80, unit=TimeUnit.SECONDS)
public class HelloWorldBean
{
int i = 0;
public int SayHello()
{
return i++;
}
}
It's only for testing. Ok, so, after 80 sec I get problem from WildFly
javax.ejb.NoSuchEJBException: WFLYEJB0168: Could not find EJB with id UnknownSessionID [5156495653657051576570495270526865695251507057526654654868486852]
1) I thought that after 80 sec ejb should be deleted and after refresh page I'll get new instance. Or after 80 sec instance going to passivation (saving on hard drive) ?
2) What is this problem with UnknownSessionID? Why WildFly doesn't want assign ID to session ?
3) With this code example - Why if I use two different browsers at the same time I have the same instance? I thought stateful bean works as one_bean-to-one_user ? So in Google Chrome and Firefox, for example, I should start from i=0 and shouldn't have any similar data between browser sessions
I'll be appreciated for your help!