Hi all
 
Just wondering :
 
Is it possible for a local entity bean to contain code that lookups another local entity.
 
Setting Description:
 
An entity bean called Breed is must contain entity Type.
I pass a Value Object to the Breed bean. 
The bean :
    obtains the TypeId PK from the VO.
    looks up the JNDI name (errors here, see description below) for the TypeHome
    finds the Type record using the TypeId (PK) via the FindbyPrimaryKey function for the TypeHome.
    sets it type CMR to the found type record
 
Error Description: but an error occurs here while doing the lookup. It says, that the JNDI name cannot be found.
 
However, if I move this to a session bean which does exactly the same. It works. For clarity the session bean:
    accepts the Value Object
    obtains the TypeId PK from the VO.
    looks up the JNDI name  for the TypeHome (works!!!!)
    finds the Type record using the TypeId (PK) via the FindbyPrimaryKey function for the TypeHome.
    sets it type CMR to the found Type record
 
Why???????? Does it work in the session and not entity.
 
TIA
Glenn

Reply via email to