Hello Brian,
are you setting the exclusive-write-access to false for that bean?
There is a known bug (bug #532 in bugzilla) about findByPrimaryKey not
throwing an ObjectNotFoundException when it should if
exclusive-write-access is set to false. It's reported from 1.4.5 and
it hasn't be fixed.
The workaround is to use a try/catch block around call of the method
to catch a NoSuchObjectException.
Tuesday, November 20, 2001, 3:19:39 PM, you wrote:
BC> There seems to be a problem with FinderExceptions due to lazy loading of entity
beans.
BC> It seems to me that FinderExceptions are not working properly for entity beans?
Any ideas. See the following snipet.
BC> InitialContext ic = new InitialContext();
BC> Object o = ic.lookup("java:comp/env/ejb/CounterHome");
BC> CounterHome counterHome = (CounterHome)PortableRemoteObject.narrow(o,
CounterHome.class);
BC> // FinderException should be thrown but is NOT.
BC> Counter counter = counterHome.findByPrimaryKey("xyz");
BC> // NoSuchObjectException is thrown because the entity does not exist.
BC> System.out.println(counter.getNextID());
BC> - Thanks.
BC> [EMAIL PROTECTED]
--
Best regards,
Rafael mailto:[EMAIL PROTECTED]