How to get the state using stateful session bean when the server crashed or server restart?.For example:User entering the finance data in the application in that time the system is crashed or server is off.The same user accessing the application.So,He can get the same state or not?
Have you considered clustering
? Most application servers provide this feature. For GlassFish
there is this tutorial, among the others.
In particular, you are looking for a feature called Stateful Session Bean Failover.