geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cedric Hurst <>
Subject Re: geronimo newbie - stateful session bean
Date Mon, 14 Jan 2008 18:30:12 GMT

purdticker wrote:
> I'm trying to create a simple stateful session bean that keeps a counter.
> Every time I refresh the page, I want the counter to increase by 1.  When
> someone ELSE visits the page, I want it to start off on 1 for them.  In
> other words, the counter should be specific to the user's personal
> session.
> I've tried following this tutorial
> except I using @Stateul.  But when I do that it just always says 1.
> Can anyone point me in the right direction?  A tutorial perhaps?


You might want to take a look at the MusicStore example listed here:

Specifically, take a look at the class.  It uses the
@Stateful annotation.  

There's also a more complicated example in the
class from Chapter 3 of "EJB 3 in Action" by Manning Press:

The source code for the book is available for download.  Tthere's no
specific example for Geronimo, but the bean code should be JEE 5 universal.

If you're still having trouble, feel free to post a zip file of your
project.  I'd be happy to take a look.
View this message in context:
Sent from the Apache Geronimo - Users mailing list archive at

View raw message