Example EJB Reference configuration
An EJB reference is scoped to the application component whose declaration contains the ejb-ref element. This means that the EJB reference is not accessible from other application components at runtime, and that other application components may define ejb-ref elements with the same ejb-ref-name without causing a name conflict. Example 6.7, “An example ejb-jar.xml ejb-ref descriptor fragment” provides an ejb-jar.xml fragment that illustrates the use of the ejb-ref element. A code sample that illustrates accessing the ShoppingCartHome reference declared in Example 6.7, “An example ejb-jar.xml ejb-ref descriptor fragment” is given in Example 6.8, “ENC ejb-ref access code fragment”. Example 6.7. An example ejb-jar.xml ejb-ref descriptor fragment ShoppingCartBean ProductBeanUser This is a reference to the store products entity ejb/ProductHome Entity org.jboss.store.ejb.ProductHome org.jboss.store.ejb.Product ShoppingCartUser ejb/ShoppingCartHome Session org.jboss.store.ejb.ShoppingCartHome org.jboss.store.ejb.ShoppingCart ShoppingCartBean The Product entity bean ProductBean