could anyone explain me why the definition of the PK can be deferred until deployment ?
Claudio
Rich Raposa
Ranch Hand
Joined: Dec 06, 2001
Posts: 46
posted
0
Hmmm, that's pretty vague question. I assume you are talking about entity beans? Most deployment tools let you pick an attribute of the bean class as the primary key for the class. This means either no separate PK class is needed, or the deployment can easily generate a PK class for you.
Rich Raposa<br /><a href="http://www.javalicense.com" target="_blank" rel="nofollow">http://www.javalicense.com</a><br />Buy Java courseware -> get a free XBox!
Chris Mathews
Ranch Hand
Joined: Jul 18, 2001
Posts: 2712
posted
0
Actually I think Roger is referring to Section 10.8.3 Special case: Unknown primary key class of the EJB Specification. The benefit of an undefined Primary Key is that is allows the Deployer to map the PK to their specific environment, be it an Object Database or an RDBMS. This also imposes quite a few limitations on the Bean Provider, most restricting of all is that a PK can not be explicitly created in your code since you don't know what the PK is until deployment time. [ January 20, 2003: Message edited by: Chris Mathews ]
Timber Lee
Ranch Hand
Joined: Oct 14, 2002
Posts: 157
posted
0
how to code for findByPrimaryKey method before PK is defined? please help to understand, thanks