Please note the usage of the <ejb-link> and without it. U will know.
<entity>
...
<ejb-ref>
<ejb-ref-name>ejb/Emp</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<home>EmpHome</home>
<remote>EmpRemote</remote>
<ejb-link>EmployeeRecord</ejb-link>
</ejb-ref>
...
</entity>
And without :
<session>
<ejb-name>EmployeeRecord</ejb-name>
<ejb-class>com.sandeep.TestEJB</ejb-class>
<ejb-ref>
bla bla bla, but no ejb-link
</ejb-ref>
...
</session>
Here "ejb/Emp" refers to EmployeeRecord in the **SAME** deployment descriptor. Hence you just created an alias for EmployeeRecord, rather than declaring actual descriptors.
Bottom-line
<ejb-link> = alias
Please credit $100 to my bank account
