I use a stateless session bean this method.

In this query the first parameter textKey is set to password. 

The query returns a label object with textKey field value null.

It is completly unlogical, the property is different to the search property but 
an object is found.

And as consequence somewhere afte the call of the method the database field 
texkey will set to null.

anonymous wrote : 
  |     public Label findByTextKey(String textKey, Language language) {
  | 
  |             Label label = (Label) labelsMap.get(textKey);
  |             if (label == null) {
  |                     Query query = manager.createQuery(
  |                             "from Label l where l.textKey = :textKey and 
l.language = :language");
  |                     query.setParameter("textKey", textKey);
  |                     query.setParameter("language", language);
  |                     try {
  |                             label = ((Label) query.getSingleResult());
  |                             labelsMap.put(textKey, label);
  |                     }
  |                     catch (NoResultException nre) {
  | 
  |                     }
  |             }
  | 
  |             return label;
  |     }
  | 

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

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

Reply via email to