Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

the Stateful and Stateless Bean in JBoss is reversed?

 
frankie huang
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when I deploy a stateful session bean, the state can't keep; while a deploy a stateless session bean,the state keep. why?
my session bean:

the ejb-jar.xml

the client code:

when I code "stateful" in the ejb-jar.xml, I found the result is always "1" even I refresh the browser times. when I code "stateless" in the ejb-jar.xml, I found the result is "1",and then "2" and then "3"...
I feel puzzling, it does not obey the book "Mastering EJB".
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic