geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio ForniƩ <>
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:

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;

	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:
Sent from the Apache Geronimo - Users mailing list archive at

View raw message