Hello,

I read again the EJB specification about this but I
do not find any precision.
We have considered that the ejbFind<method> must return
an empty Enumeration instead of a null enumeration.
The ejbFind<method> code may be:
        public Enumeration ejbFindNothing() {
                java.util.Vector v = new java.util.Vector();
                return(v.elements());
        }

Any reference to a part of the EJB specification about this
will be welcome.

Best regards.
H�l�ne.

Shawn McKisson wrote:
> 
> jonas 1.5
> Whenever I try to return a null from an ejbFind method, it appears as though the
> container is throwing a null pointer exception. I wrote a small testcase that
> causes this to occur every time. Is this a known problem? I was trying this
> after seeing an example in the Monson-Haefel book where he suggested that the
> resut of find methods could be null.
> 
> Am I doing something wrong? Is this supposed to happen?
> 
> In the bean:
> 
> public Enumeration ejbFindANullPointer()
> {
>   return null;
> }
> 
> In the client:
> 
> try
> {
>   homeInterface.findANullPointer();
> }
> catch (Exception e)
> {
>   System.out.println(e);
> }
> 
> And the result is always:
> 
> java.rmi.ServerRuntimeException: Server RuntimeException; nested exception is:
>         java.lang.NullPointerException:
> 
> caught in the try statement above.

-- 
-=- H�l�ne JOANIN -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  mailto:[EMAIL PROTECTED]    http://www-frec.bull.com
  Phone: 33.4.76.29.73.53          Fax: 33.4.76.29.76.00
 Download our EJB Server JOnAS at http://www.bullsoft.com/ejb
_______________________________________________________________

Reply via email to