geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio ForniƩ <sitaronoctur...@gmail.com>
Subject Stateful session bean has no state
Date Mon, 12 Oct 2009 18:48:46 GMT

Hello again!

I made a stateful sessiob bean and it's working the same way my stateless
beans do: they forget their state. Here's my code:

@Stateful
public class CartBean implements CartLocal {
	
	private Integer number = new Integer(0);
	
	public void setNumber(Integer number) {
		this.number = number;
	}

	public Integer getNumber() {
		return this.number;
	}

	@Override
	public Integer getNumberService() {
		this.number += 10;
		return this.productNumber;
	}
	
}

My jsp uses CartLocal interface wich only shows "getNumberService()" method.
When requesting the jsp with my web browser it always shows ten. when
refreshing the page it should show 20, but once again shows 10. What am I
doing wrong?

Thank you very much!
-- 
View this message in context: http://www.nabble.com/Stateful-session-bean-has-no-state-tp25861132s134p25861132.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message