-
1. Re: Reconnecting to @Stateful EJB
mayerw01 Dec 20, 2015 4:41 AM (in response to bpiotrowski)Your statement made above is not correct "Reconnecting to SLSBs work fine". The SLSB may contain a state specific to that client only for the duration of the invocation. I think what you are looking for is an option to persist SFSBs. But as mentioned in the JavaEE tutorial "A session bean is not persistent. (That is, its data is not saved to a database.)". Since the EJBs are managed by the container they are also removed if the server is shut down. In the specification you may read: "If a client makes a call to a stateful session or entity object that has been removed, the container should throw the javax.ejb.NoSuchEJBException". A solution might be to store the state in your program before the bean is destroyed and restore the state when the bean is available again (@PostConstruct)
-
2. Re: Reconnecting to @Stateful EJB
bpiotrowski Dec 21, 2015 6:56 AM (in response to mayerw01)Thanks for the answer and proposed solution but I will probably convert the bean to SLSB because it is cheaper for us.