Entity bean is an abstract class and its local and home interfaces also extends an abstact class. So how can we instantiate home or local interface?

Showing Answers 1 - 9 of 9 Answers

avisnk

  • Dec 19th, 2007
 

you cannot instantiate an interface. Hence forth you implement the methods in those interfaces in your home and remote interfaces by extending them. Again the EntityBean is not an abstract class but an interface. Hence your bean class makes use of its methods by implementing them.

hope the explanation helps!!
let me know if not clear....

  Was this answer useful?  Yes

jayanandan

  • Jan 14th, 2008
 

it is upto container which instantitates and maintain all entity bean in the ejb container.
But to act like a entity bean,the developer has to implement EntityBean and all abstract methods defined in it.
This is not in the case of EJB3.0 where all those abstract methods implemented by default behind the screen,since we use annotation to intimate to the container
 that the class is going to act like EntityBean or going to represent the row in table.

  Was this answer useful?  Yes

Clients never dealt with direct instances of Entity Bean. It deals with container implementations of home and component interface (stubs & skeletons - aka deployement code)

It is the container responsibility to Wrap a class around the abstract definition of Entity bean.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions