Sorry for the triple post, but I just found something strange to me.*
I actually managed to call the @Create method by calling the bean on the jsf 
page (I simply put an outputText with a property of my Bean as value).
Since I've done that, the @Create method is now called, apparently the bean is 
'created' when it reaches that jsf tag.
But then, I've got apparently two different instance of my DBResourceBundle.

@Create
  |     public void fillAvailableResourceBundle(){
  |             try{
  |                     availableResourceBundles = em.createQuery("select rb 
from CustomResourceBundle rb").getResultList();
  |                     System.out.println("Found 
"+availableResourceBundles.size()+" custom resource bundles");
  |             }
  |             catch(Exception e){
  |                     
  |                     e.printStackTrace();
  |                     
  |             }
  | 
  |             
  |     }
When that method is called, it finds my 'CustomResourceBundles in the db.

But then, when I put messages['something'] in the jsf page, the method 
handleObject of the same class is called, and the availableResourceBundles is 
null for it, aswell as my Injected EntityManager, although it was used just 
before in the @Create method withtout any problem!
Like if there was 2 different instances of my class.


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059957
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to