Problem solve Get help with specific problems with your technologies, process and projects.

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.

Dig Deeper on Topics Archive

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.

Please create a username to comment.