[jboss-user] [JBoss Seam] - Re: Stateless bean holding data?

matt.drees do-not-reply at jboss.com
Sat Jan 26 21:50:40 EST 2008


"Oberiko" wrote : 
  | 
  |   | 
  |   | @Stateless
  |   | @Name("searchPeople")
  |   | public class SearchPeopleAction implements SearchPeopleLocal {
  |   | ...
  |   |   private List<Person> peopleList;
  |   | 	
  |   | 	public void search() {
  |   | ...
  |   | 		peopleList = eq.getResultList();
  |   | ...
  |   | 	}
  |   | 	
  |   | 	public List<Person> getPeopleList() {
  |   | 		return peopleList;
  |   | 	}
  |   | 
  |   | }
  |   | 
  | 

This isn't the right way to use a Stateless session bean.  This is stateful behavior.

So, what I'd do is make SearchPeopleAction an event-scoped stateful session bean.

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

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



More information about the jboss-user mailing list