Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > J2EE
|
J2EE General J2EE (Java 2 Enterprise Edition) discussions. Questions not specific to EE will be redirected elsewhere.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the J2EE section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 5th, 2003, 04:27 AM
Registered User
 
Join Date: Jun 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to execute findByPrimaryKey with CMP 2.0?

Hi, I'm deploying a local entity bean. I know that I can run any finder method with CMP 2.x by declaring it as abtract in the bean implementation class and then by defining the query in the deployment descriptor. My question is: how do I run the findByPrimaryKey method? Shall I write a query element in the dd? How do I execute it from the client?



Marco Tedone
Jemos Founder
 
Old June 13th, 2003, 04:06 AM
Authorized User
 
Join Date: May 2003
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Marco
In case of CMP u don't need to run findByPrimarykey method it will be invoked by the Application Server. You have to write the Query element in the Deployment Descriptor as well as the fields the container will manage for this method the parameters(ex. primaryKey field)to this method and the Paramter type etc will all be defined in the Deployment Descriptor.
To call findByPrimaryKey method from the clien just have to write this code snipet:-
[Your Bean Home class object].findByPrimarykey([your field parameter]);

Hope this helps

Regards


Yashraj Chauhan
Java\J2EE Specialist
Wiley Support Team





Similar Threads
Thread Thread Starter Forum Replies Last Post
ASPExec.execute cmh Classic ASP Components 1 May 2nd, 2006 09:55 PM
connection.execute and command.execute difference vinod_yadav1919 Classic ASP Databases 0 September 28th, 2005 06:34 AM
execute gauravchhabra9111 Apache Tomcat 0 January 24th, 2005 06:06 AM
conn.execute,command.execute or rs.open vinod_yadav1919 Crystal Reports 0 January 3rd, 2005 10:26 AM
Execute Package hortoristic SQL Server 2000 0 January 12th, 2004 01:52 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.