Defining resource-ref tags on both session bean and entity bean

59 views Asked by At

My application has a CMT session bean invoking a BMP entity bean that uses JDBC queries to perform Database operations.the ejb-jar.xml have resource ref defined at both the session bean definition and the entity bean definition at ejb-jar.xml. is it not sufficient to place the resource references only on session beans rather that having it defined on both session and entity beans ?

1

There are 1 answers

2
Steve C On

The resource-refs in the ejb-jar.xml are only visible within the EJB definition that contains them.

If an EJB is not performing a JNDI lookup of a resource then it will not need the resource-ref.