EJB specifications difference from 1.1 to 1.2 on return types of Multi Object Finder
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   sanjeevi_athreya
Posted On:   Wednesday, September 4, 2002 04:29 AM

I was reading the EJB specifications of 1.1 and it said the finder which return multiple rows can return Enumeration and I have created a bean that performs this way and I am trying to run on a server that implements 2.0 and I see it fails as it expects the multi object finder method to return a collection (Arraylist or a vector).... how to over come this problem...is there anyway I can port my applicaiton(beans) from 1.1 to 2.0.................. what are the other porting issues other than this. FYI : I was running the application on JBoss-2.2.2 and now I am trying to deploy the same on JRUN 4.0 when I deployed the beans in JRUN I g   More>>

I was reading the EJB specifications of 1.1 and it said the finder which return multiple rows can return Enumeration
and I have created a bean that performs this way and I am trying to run on a server that implements 2.0 and I see it fails as it expects the multi object finder method to return a collection (Arraylist or a vector)....


how to over come this problem...is there anyway I can port my applicaiton(beans) from 1.1 to 2.0..................



what are the other porting issues other than this.



FYI : I was running the application on JBoss-2.2.2 and now I am trying to deploy the same on JRUN 4.0



when I deployed the beans in JRUN I get the following error.


08/30 11:27:27
error The finder method, public abstract java.util.Enumeration com.package.admin.MyBeanHome.findByAll() throws javax.ejb.FinderException,java.rmi.RemoteException, in interface, com.package.admin.MyBeanHome, must return com.package.admin.MyBean or java.util.Collection. See Section 10.6.10/12.2.9.



and I could not find this mentioned section 10.6.10 / 12.2.9.

   <<Less

Re: EJB specifications difference from 1.1 to 1.2 on return types of Multi Object Finder

Posted By:   AlessandroA_Garbagnati  
Posted On:   Wednesday, September 4, 2002 06:34 AM

Hi,

It seems that the references that the error has given you are wrong.

The section where this issue is described, is section 12.1.7.2 Multi-object finders.


Anyway, an EJB Container that fully follows the specifications, should run EJB written follow both 1.1 and 2.0 Specs, so, you are not required (unless you want to use the newest features of the 2.0 specs) to change your EJB1.1 code.

About | Sitemap | Contact