Home arrow Development Cycles arrow Page 5 - Enterprise Java and Rational Rose -- Part I
DEVELOPMENT CYCLES

Enterprise Java and Rational Rose -- Part I


This article explains the way Java 2 Enterprise Edition relates to IBM's CASE tool Rational. Read how these technologies work together to help develop successful applications.

Author Info:
By: The Rational Edge
Rating: 5 stars5 stars5 stars5 stars5 stars / 7
May 30, 2003
TABLE OF CONTENTS:
  1. · Enterprise Java and Rational Rose -- Part I
  2. · J2EE: Responding to Enterprise Application Needs
  3. · More J2EE
  4. · Enterprise JavaBeans
  5. · Working with EJBs
  6. · Conclusion

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Enterprise Java and Rational Rose -- Part I - Working with EJBs
(Page 5 of 6 )

In order to create an EJB, the first thing you need to do is find its home object. You do this by using the "nickname" for the bean and querying the Java Naming and Directory Service (JNDI), such as Novell NDS, LDAP, etc.

Once you have a reference to the home object, you can invoke a create method on it. When a create is invoked on the home interface:

  • The EJBHome creates an instance of the EJBObject and gives it the bean instance of the appropriate type to work with.
  • Once the bean instance is associated with the EJBObject, the instance's ejbCreate() method is called.
    • For entity beans, if a matching record already exists in the database, then the entity bean is populated from it; otherwise, a new record is inserted into the database.
    • For session beans, the instance is simply initialized.
  • Upon completion of the ejbCreate() method, EJBHome returns a remote reference for the EJBObject to the client. Remember that since we are dealing with remote objects, a remote reference is actually a stub.
  • The client can now call business methods on the stub. The stub relays the methods to the EJBObject, which in turn delegates those methods to the bean instance (of the class we created), and the result is relayed back through the chain when the method returns

This sequence of events is shown graphically in Figure 6.


blog comments powered by Disqus
DEVELOPMENT CYCLES ARTICLES

- Division of Large Numbers
- Branch and Bound Algorithm Technique
- Dynamic Programming Algorithm Technique
- Genetic Algorithm Techniques
- Greedy Strategy as an Algorithm Technique
- Divide and Conquer Algorithm Technique
- The Backtracking Algorithm Technique
- More Pattern Matching Algorithms: B-M
- Pattern Matching Algorithms Demystified: KMP
- Coding Standards
- A Peek into the Future: Transactional Memory
- Learning About the Graph Construct using Gam...
- Learning About the Graph Construct using Gam...
- Learning About the Graph Construct using Gam...
- How to Strike a Match

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 7 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials