problem calling enity bean from session bean
Created enterprise app with web and ejb modules.
Created a CMP Entity Bean with local interface.
Created session bean with a remote interface, then used the process: enterprise resources> call enterprisebeans to generate lookup code for the entity bean.
Tried using the session bean from the web modules jsp page and an exception is thrown with message No object bound to 'Table1Bean'
public Object getEntry(final String ID){
entity.Table1Local lo =null;
entity.Table1LocalHome lh =null;
try{
/////////////////////NEXT LINE THROWS AN EXCEPTION/////////////////////////////////////
lh = lookupTable1Bean();
}catch (javax.naming.NamingException ex){
// ... code to handle exception
}
try{
lo = lh.findById(ID);
}
catch(javax.ejb.FinderException ex){
// ... code to handle exception
}
return lo;
}
private entity.Table1LocalHome lookupTable1Bean()throws javax.naming.NamingException{
javax.naming.Context c =new javax.naming.InitialContext();
entity.Table1LocalHome rv = (entity.Table1LocalHome) c.lookup("java:comp/env/ejb/Table1Bean");
return rv;
}

