[jboss-user] [JBoss Seam] - why commit twice?
luc_yuan
do-not-reply at jboss.com
Sun Feb 3 00:55:49 EST 2008
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
More information about the jboss-user
mailing list