[JBoss Seam] - Re: why commit twice?
by luc_yuan
what shows me in pages is
anonymous wrote : kokyaku 11already exist kokyaku 11already exist
and i retrieve my message like this
| <h:messages globalOnly="true" styleClass="message" id="globalMessages"
| showDetail="true" layout="table" />
|
also in console
anonymous wrote :
| 14:54:38,546 INFO [lifecycle] WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
| sourceId=kokyaku:kokyakuCdDecoration:kokyakuCdCreate[severity=(ERROR 2), summary=(å¤ã¯å¿Â
é Âã§ãÂÂ), detail=(å¤ã¯å¿Â
é Âã§ãÂÂ)]
| 14:54:54,671 INFO [lifecycle] WARNING: FacesMessage(s) have been enqueued, but may not have been displayed.
| sourceId=kokyaku:kokyakuCdDecoration:kokyakuCdCreate[severity=(ERROR 2), summary=(å¤ã¯å¿Â
é Âã§ãÂÂ), detail=(å¤ã¯å¿Â
é Âã§ãÂÂ)]
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4125832#4125832
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4125832
18 years, 2 months
[JBoss Seam] - why commit twice?
by luc_yuan
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
18 years, 2 months