Discussions

EJB design: Instrumenting EJBs with JMX

  1. Instrumenting EJBs with JMX (2 messages)

    I'm curious if anyone has instrumented their EJBs with JMX. What types of attributes and operations did you put in your JMX interface? Did you find JMX useful for managing your EJBs?

    Threaded Messages (2)

  2. Instrumenting EJBs with JMX[ Go to top ]

    JBoss does exactly this. Each bean is an MBean. They expose the following methods for an entity bean:

    Invoke an EJBHome interface method
    Invoke an EJBObject interface method
    Get the EJBHome interface class
    Get the EJBObject interface class
    Create service lifecycle operation
    Dtart service lifecycle operation
    Dtop service lifecycle operation
    Destroy service lifecycle operation
    Get the Container cache size.
    Flush the Container cache.

    That last one is nice because it allows you to cache the crap out of your entity beans, but invalidate the cache when you know the database has been updated from another source.

    Methods exposed by session beans are:

    Invoke an EJBHome interface method
    Invoke an EJBObject interface method
    Get the EJBHome interface class
    Get the EJBObject interface class
    Create service lifecycle operation
    Start service lifecycle operation
    Stop service lifecycle operation
    Destroy service lifecycle operation

    Cheers.

    //Nicholas
  3. Instrumenting EJBs with JMX[ Go to top ]

    Using the session bean as an example:

    > Invoke an EJBHome interface method
    > Invoke an EJBObject interface method
    > Get the EJBHome interface class
    > Get the EJBObject interface class

    Can you explain how and when these would be used?

    > Create service lifecycle operation
    > Start service lifecycle operation
    > Stop service lifecycle operation
    > Destroy service lifecycle operation

    Also can you explain the motivation for this? I haven't done a lot of EJB programming, but from what I have read and done, stateless session beans just have business methods. I don't see how any of the above relate to a stateless session bean.