• Post Reply Bookmark Topic Watch Topic
  • New Topic

Why only one create method in stateless Session beans

 
Pankaj Narang
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

There is only one create method in statelees session bean, that also with out parameters why? What is the main reason behind thes,

If i hae to pass a parameter to stateless session bean how i will pass .

i want a clear idea in this respect

Best Regards
Pankaj
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Statless session beans are instantiated and pooled by the server itself. Does the EJB container care about parameters? Negative! Stateless session beans are like static methods -- if you need something you have to pass it all in as parameters to whatever function you're calling (or use other lifecycle callback methods to initialize its state so you don't have to). But, you definitely can't have non-empty create methods.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!