• Post Reply Bookmark Topic Watch Topic
  • New Topic

URGENT HeLP !!! Custom Finder Method  RSS feed

 
Sri Enga
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are using IBM's visual Age 3.5 ( Which follows EJB 1.0 specifications) for Java for Windows version 3.5 and Oracle 8i for development of a web Appication involving Container managed Entity Beans.
I have a finder method
public java.util.Enumeration findFirstNSamplesOrderByDate (java.lang.String modelInstanceId, int nSamples)
throws java.rmi.RemoteException,javax.ejb.FinderException;
}
I have made the following declaration in the HelperInterface
public java.sql.PreparedStatement findFirstNSamplesOrderByDate(String modelInstanceId, int nSamples) throws java.rmi.RemoteException, javax.ejb.FinderException;

I do not know how to test this in Visual age for Java test Environment
 
Tim Holloway
Bartender
Posts: 18715
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
CMP beans don't allow you to write the JDBC code - that's part of the container's job. The closest you could get would be some sort of nonportable extension like the custom finder logic feature of WebLogic. Since CMP also doesn't have a provision for finding and returning beans in a predetermined order and - by implication from your finder method name that's what you want - the only universal way to get the desired results would be to convert the bean from CMP to BMP.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!