• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why bean is not implementing Component

 
Priteshaaa Agrawal
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Why bean is not implementing the component interface?

Thanks
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

Which interface called Component are you talking about? The only one in J2SE/JEE with that name is java.awt.Component, but that has nothing to do with EJB.
[ September 28, 2007: Message edited by: Ulf Dittmer ]
 
Priteshaaa Agrawal
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am talking about component interface of EJB.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe I'm a bit dense, but there is no interface called Component in EJB (as I mentioned in my previous post). Can you describe in more detail what you're asking about, or post the fully qualified class name (including the package)?
[ September 28, 2007: Message edited by: Ulf Dittmer ]
 
Somnath Jamdar
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Priteshaaa,

Because Component Interface is a Client View of a bean and bean resides and executes on the server in a different tier.

Container will provide the implementation for methods [getEJBLocalHome(), getPrimaryKey(), remove(), etc] defined in EJBLocalObject/EJBObject.

But the bean should provide implementation for the business method defined in the component interface.

HTH
 
Awishek sinha
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Priteshaaa Agrawal:
Hi,

Why bean is not implementing the component interface?

Thanks


Hi Priteshaaa
the bean class is not required to implement the component interface (but you can do so..)as its not a marker interface(as it extends EJBObject which has methods decalred in it like remove(),getHandle() etc)so if you do so the you have to write the concrete implementation of that methods .
So at the time deployment the deployer tells the container that here is the component & home interface of this bean ,the container would implement these interface by constructing an class called EJBObject & EJBHome which the client would use to intract with the bean..
Hope it clears..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic