To save the time for looking ejb local home or remote home from jndi server , I put it into a static Map in a class named ServiceLocator.
It'll be working ok till I redepoy the ear.
After hot-depoy the ear, the static map still exists, and contains the home object cache. When the code in ejb get home object from the map and cast it to the EJBHome or EJBLocalHome, jboss report error like this:
2006-03-09 16:37:18,765 DEBUG [org.jboss.mq.il.uil2.ServerSocketManagerHandler] Exiting on IOE
java.io.EOFException
at java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputStream.java:2603)
at java.io.ObjectInputStream.readByte(ObjectInputStream.java:845)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:279)
at java.lang.Thread.run(Thread.java:534)
2006-03-09 16:37:18,765 DEBUG [org.jboss.mq.il.uil2.SocketManager] End ReadTask.run
2006-03-09 16:37:18,765 DEBUG [org.jboss.mq.il.uil2.SocketManager] End WriteTask.run
2006-03-09 16:37:18,781 DEBUG [org.jboss.mq.il.uil2.ServerSocketManagerHandler] Exiting on IOE
Thanks .