when i create a object using id whick is already in database when i press 
the create button i check if it exists,but i got my message age,why
    
  |       try {
  |     
  |                                     Kokyaku k = (Kokyaku) 
getEntityManager().createQuery(
  |                                                     "select k from Kokyaku 
k where k.kokyakuCd = :id")
  |                                                     .setParameter("id", 
this.instance.getKokyakuCd())
  |                                                     .getSingleResult();
  |                                     if (k != null) {
  |                                             FacesMessages.instance().add(
  |                                                             "kokyaku " + 
this.instance.getKokyakuCd() + "already exist");
  |                                             isSuccess = false;
  |                                     }
  |     
  |                             } catch (NoResultException ex) {
  |                             }
  | 
  |     
    i see in other posts it seems there is something like tx1,tx2,but i can't 
find anything about this transaction behaviour in reference.
    anyone helps me

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

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

Reply via email to