3 Replies Latest reply on Feb 12, 2002 6:53 PM by David Jencks

    Strategies for keeping references to beans after JBoss resta

    Lukasz Kowalczyk Newbie

      I wonder how you deal with stale references to beans after JBoss is restarted. I mostly use enterprise beans from servlet environment and it's usually impossible to keep JBoss and servlet container restarts in sync. When JBoss is restarted, all attempts to call methods in remote or home interfaces fail with an exception.

      So far I came up with one solution to this problem. In my beans I implement dummy methods (eg. ping() ) and call them before the actual methods. When call to ping() fails I try to regain reference to home or remote interface from HomeHandle or Handle object. Surprisingly, this does not always work.

      Maybe someone knows a better way to make application resistant to EJB server restarts?