Title: SV: NoSuchObjectException taking over FinderException

Hmm, maybee you get the FinderException becuase there is no such entity?

-----Ursprungligt meddelande-----
Fran: Brian Chan [mailto:[EMAIL PROTECTED]]
Skickat: den 20 november 2001 20:20
Till: Orion-Interest
Amne: NoSuchObjectException taking over FinderException


There seems to be a problem with FinderExceptions due to lazy loading of entity beans.

It seems to me that FinderExceptions are not working properly for entity beans? Any ideas. See the following snipet.

InitialContext ic = new InitialContext();
Object o = ic.lookup("java:comp/env/ejb/CounterHome");

CounterHome counterHome = (CounterHome)PortableRemoteObject.narrow(o, CounterHome.class);

// FinderException should be thrown but is NOT.

Counter counter = counterHome.findByPrimaryKey("xyz");

// NoSuchObjectException is thrown because the entity does not exist.

System.out.println(counter.getNextID());

- Thanks.

[EMAIL PROTECTED]

Reply via email to