Q

Is it possible to call entity bean in session bean? If so, how?

Is it possible to call entity bean in session bean? If so how do I call?
It is possible to call and entity bean from a session bean. In fact, that is generally what you need to do. You will want a session bean tier containing application logic which uses the entity beans for data access. Calling an entity bean from a session bean is pretty fundamental, so you will probably want to get a good book or do an EJB tutorial (http://java.sun.com/j2ee/tutorial/1_3-fcs/index.html). In short, a session bean is like any other client. You will want to do a JNDI look up on the EntityBean home and then call one of the create() or finder methods. Then you can call whatever methods on the EntityBean you need.
This was last published in January 2002

Dig Deeper on Service-oriented architecture (SOA) Design

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchSoftwareQuality

SearchCloudApplications

SearchAWS

TheServerSide

SearchWinDevelopment

Close