In our application, we use JDBC to access database. The entity beans share the same database connections as other plain java classes. In such case, do I need to specify <resource-ref> tag in ejb-jar.xml and give the res-ref-name? Thanks.
If EJB refer or use any resources (DS or other EJB), you need to specify the resource ref tag.
You do not need the resource-ref tag as in the end you can always use the components full JNDI name to look it up.
The resource-ref was to support the whole programmer/deployer separation. Of course most times this is the same person and is generally overkill.