I believe you are suppose to use PortableRemoteObject narrow on items in a
collection.

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Jim Downing
> Sent: Wednesday, May 16, 2001 5:13 AM
> To: [EMAIL PROTECTED]
> Subject: [JBoss-user] ejbFinder problem
>
>
> Hi all,
> I'm trying to implement a findAll method for my BMP entity bean.
> Sometimes it works fine, sometimes a FinderException is thrown when
> calling business methods on the Remote interfaces in the returned
> collection: e.g.
>
>     Collection all = home.findAll();
>     Iterator i = all.iterator();
>     i = all.iterator();
>     while(i.hasNext())
>     {
>       PersonBean pb = ((Person) i.next()).getPersonBean(); <-- Exception
> thrown here
>       ...
>     }
>
> The exception is thrown in ejbLoad because there is no record in the
> database table with a primary key of null (surprise surprise).
>
> Is there something I'm missing about the scope of these collections? Is
> it better to wrap all the finders in methods that return arrays?
>
> thanks in advance,
> jim
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to