stateful-session-bean

EJB 3: Accessing a stateful session bean from an application client

I am having some trouble accessing a stateful session bean (SFSB) from an application client. I am using JBoss 5.0.1.GA. The application client and the EJBs are both packaged in an EAR which deploys and I have other application clients which work without problems. So far, I have only used stateless session beans (SLSBs), but as far as I ...

Why use stateful session beans?

I'm learning ejb3 and I'm just curious when it's convenient to use SFSB? I can't find any nice example when SFSB realy solve easily some complex problem. Actually I see that SLSB can be used as web-services and this is convinient. But I don't know when to use SFSB. I see only problems with it because we should learn something about it, ...

How to use JNDI to obtain a new Stateful Session Bean, in EJB3?

I'm trying to use JNDI to obtain a new Stateful Session Bean in a servlet (as a local variable). My doGet() method has the following: Bean bean = (Bean) new InitialContext().lookup("beanName"); I've tried including java:comp/env but all of my attempts have led to naming exceptions. I'm attempting to bind the bean in the @Stateful an...

Why shouldn't I use a JSF SessionScoped bean for logic?

Hi I'm developing a java EE web app using JSF with a shopping cart style process, so I want to collect user input over a number of pages and then do something with it. I was thinking to use an EJB 3 stateful session bean for this, but my research leads me to believe that a SFSB is not tied to a client's http session, so I would have to...