[jboss-user] [EJB/JBoss] - EJB 3 : stateful problem

zzeuxis do-not-reply at jboss.com
Wed Nov 29 13:23:00 EST 2006


   I'm trying to get a simple EJB 3.0 Stateful bean example working in JBoss.

   I've managed to get my example working using Stateless EJB :
Simple Servet --> Stateless EJB --> retrieves some EJB Entity, saves a few bytes to the database and keeps a reference to the saved entity

   When the EJB is declared with a @Stateless decoration, everything seams to be working as expected : I see my log message in EJB initialization displayed everytime a new client connects.
   When I use @Stateful (which should be used since I want to maintain a reference to a session entity), I see that a new instance is created each time I access the EJB.

  Any idea what can be wrong ? (I can post my entire code if needed)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3989788#3989788

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3989788



More information about the jboss-user mailing list