Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

In EJB 1.1 does Bean Provider create Primary key?  RSS feed

Jeff Wachhorst
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know that in EJB 2.0, the bean provider creates the primary key. However, in 1.1, I've read in Wetherbie's notes (see SCEA links) that the container does.
At, their example of a (EJB 1.1 right?) CMP bean contains:
public Customer ejbCreate(Integer id) {
customerID = id.intValue();
return null;
From this, it looks like id is going to be passed in by the home's create() method (which the user calls). customerID is the primary key so it looks like the user is responsible for creating it rather than the container.
This leads me to another question:
If this were EJB 2.0, would customerID have to be Integer and the return type of this ejbCreate(..) be Integer or could it be a primitive type (i.e. int)?
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!