Can my ejbFind methods have return types like RowSet or Vector, or should it be only of type Enumeration?

Dan Christopherson

The 1.1 spec. says that ejbFindXXX methods must return either a primary key or a collection of primary keys, and refers to the section (9.1.8) where the return types of home interface finder methods is defined. This specifies either Enumeration or Collection. Since, in Java 2, Vector implements Collection, you should be able to return a vector, but given the restriction in section 9.1.8, you will probably have to declare your return type as Collection. Declaring Vector as your return type might work in some containers, but I wouldn't expect it to be portable.

Returning RowSet will just not work. as the container will not know what to do with it.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact