geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cedric Hurst <cedric.hu...@gmail.com>
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
> http://cwiki.apache.org/GMOxDOC20/very-simple-session-ejb-example.html
> 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?
> 

Hi,

You might want to take a look at the MusicStore example listed here:
http://www.devx.com/Java/Article/30045/0/page/3

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

There's also a more complicated example in the BidderAccountCreator.java
class from Chapter 3 of "EJB 3 in Action" by Manning Press:
http://www.manning.com/panda/

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: http://www.nabble.com/geronimo-newbie---stateful-session-bean-tp14762838s134p14808086.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message