1 Reply Latest reply on Mar 20, 2003 6:51 AM by adrian.brock

    access MBean JNDIMap service

    wuwenpan

      JBossBook_305 provide an example called JNDIMap, I packed it as a SAR file and deployed it in JBoss.

      I found I can only access the object contextMap inside JBoss (through a Session Bean in my example). When I tried to access it from another JVM, I found the object I got is not an instance of HashMap, when I print out the object I got from lookup("inmemory/maps/MapTest"), the result is:
      Reference Class Name: java.util.HashMap
      Type: nns
      Content: MapTest

      How I can access this MBean service outside JBoss?

      Thanks,

        • 1. Re: access MBean JNDIMap service

          It binds a reference to the Map into JNDI.
          The map itself is not bound.

          If you bind the map into jndi you will receive
          a copy remotely, however all contents must be
          Serializable.

          Another approach would be to use a Stateless Session Bean
          to provide remote access to the map.

          Regards,
          Adrian