[jboss-user] [JBoss Seam] - Application context beans get null

Stateless Bean do-not-reply at jboss.com
Sat Sep 15 18:08:27 EDT 2007


Hi, 
I got bean like

  | @Stateful
  | @Scope(ScopeType.APPLICATION)
  | @Name("collectionControler")
  | 
and collection inside this bean, this constant collection for all users.
When I start serwer, first I set my collection via method.

  |    public void createLists() {
  |     	if (procentList == null) {
  | 			procentList = new LinkedList<SelectItem>();
  | 			procentList.add(new SelectItem("100", "100%"));
  | 			procentList.add(new SelectItem("90", "90%"));
  | 			procentList.add(new SelectItem("80", "80%"));
  | 			procentList.add(new SelectItem("70", "70%"));
  | 			procentList.add(new SelectItem("60", "60%"));
  | 			procentList.add(new SelectItem("50", "50%"));
  | 			procentList.add(new SelectItem("40", "40%"));
  | 			procentList.add(new SelectItem("30", "30%"));
  | 			procentList.add(new SelectItem("20", "20%"));
  | 			procentList.add(new SelectItem("10", "10%"));
  |     	}	
  | }
  | 

and here is my problem. 2 days after serwer start, collection setted null, don't know how?

this is only method where i do anythink with this collection, and don't have any other. Users have acces to this via page like:
<h:selectOneMenu value="#{}" ?

Is any explanation how this could set null? 
This problem is not for only one collection, this bean has 4 collections for my app, and when anythink is broken all collections are null.
Maybe somethink destroys my bean?

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

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



More information about the jboss-user mailing list