Can I develop an Entity Bean without implementing the create() method in the home interface?
Services | Updates | Contact

Question: Can I develop an Entity Bean without implementing the create() method in the home interface?

Can I develop an Entity Bean without implementing the create() method in the home interface?
Answer:As per the specifications, there can be ?ZERO? or ?MORE? create() methods defined in an Entity Bean. In cases where create() method is not provided, the only way to access the bean is by knowing its primary key, and by acquiring a handle to it by using its corresponding finder method. In those cases, you can create an instance of a bean based on the data present in the table. All one needs to know is the primary key of that table. i.e. a set a columns that uniquely identify a single row in that table. Once this is known, one can use the ?getPrimaryKey()? to get a remote reference to that bean, which can further be used to invoke business methods.

Post Your Answer/Comments

Comment Title:
Comment:
Save   Cancel
 
  Home | JSP | EJB | JDBC | Java Servlets | WAP | Free JSP Hosting | Spring Framework | Web Services | BioInformatics | Java Server Faces | Jboss 3.0 tutorial | Hibernate | XML
Send your comments, Suggestions or Queries regarding this site at editor@roseindia.net
Copyright © 2007. All rights reserved.