In EJB, how can I access a global cache to read and write data, the cache can access by different ejb instances
Sorry that I have not got your question. You have already metioned some possible solutions. It sounds like that you have some troubles when you tested them. In theory they should work. Could you please post some detail information about the errors you got for the startup class binding a hashmap to the JNDI? Then I will have a better understanding on the context. By the way you may also use a stateless session bean to do it.
Thanks
Lin