Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Change Stateful session bean to stateless

 
Sudha Deshmukh
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I am a newbie to EJB programming and I am wondering if the following can be done with session beans...

Can we change already created and deployed stateless session bean to a stateful session bean by just changing the deployment descriptor (ejb-jar.xml) and re-deploying it again or do we have to to create the bean from scratch again incase we have to change it.

Similarly, can we change an already created and deployed statefulsession bean to a stateless session bean by changing the deployment descriptor and re-deploying the bean.

Thanks

S Deshmukh
 
Sat Kum
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
assuming that you are aware of their differences (eg. remove() shud be called explicitly for SFSB to end the session), i guess changing the descriptors and redeploying should do.
 
Prakash Dwivedi
Ranch Hand
Posts: 452
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think if you are converting stateful session bean into stateless than you have to make sure that the create method doesn't take any parameters. As create() method of Stateless session bean can't take any arguments
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!