1 Reply Latest reply on Sep 12, 2003 8:57 AM by Juha Lindfors

    <resource-ref> for MBeans?

    Eric Rizzo Newbie

      I have an existing DataSource that EJB's use. My EJB's have <resource-ref>s that point to the DataSource, and they can look up and use the DataSource fine.
      Now I have an MBean (and associated helper code) that needs to use the same DataSource. But it cannot look up the DataSource by the same JNDI name that the EJBs use (java:comp/env/blahblahblah). Can I define a JNDI name for the DataSource (other than its "raw" JNDI name as declared in the <resource-manager> element) that my MBean can lookup? IOW, is there an equivalent to <resource-ref> for MBeans?
      I've noticed that servlets can declare <resource-ref> in the web.xml, so I'm hoping MBeans have similar capability.

      Thanks,
      Eric