I am implementing my first MBean based on the sample in the documentation.
I finally figured out (by reading the mail archives) that MBeans are not
automatically bound into the JNDI name space, so I copied the sample code
into my MBean and used this to bind my MBean into JNDI:

      NonSerializableFactory.rebind(parentCtx, atom, this);

Now, I am able to invoke my test method in the MBean successfully using
JNDIView, and also from within an EJB using the following:

   Flipper obj = (Flipper) new InitialContext().lookup("Flipper");
   System.out.println("Flipped value of 5 is: " + obj.flip(5));

The last thing I'm trying to do is to access this MBean from a general Java
application outside of JBoss.  But when I do the lookup above from such a
client, obj is null.  Is there a way for external clients to gain access to
an MBean, or do I need to use an EJB as a proxy?


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to