This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

constructur in EJB  RSS feed

 
aakash bhatt
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I have a constructur with arguments and without arguments in Session and Entity Bean

Thanks,
aakash
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You never explicitly construct EJBs - the container does. Instead you have a bunch of methods that are called at different points in the EBJ's lifecycle: e.g. ejbActivate(), ejbPassivate(), ejbCreate, ejbRemove(). I'd suggest (if you haven't already) you read the "The Life Cycles of Enterprise Beans" section of the J2EE tutorial.
 
Jason Hunt
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will never have a chance to call the constructor, the container will and it requires a constructor will no argument. so there is no need to creat a constructor with args.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!