[jboss-user] [JBoss Seam] - Re: Design question with Rich GWT Ajax Client
sdegardin
do-not-reply at jboss.com
Thu Jan 10 05:25:19 EST 2008
I have a working solution ....
in my ContextualHttpRequest, I call the same code as in SeamPhaseListener for JSF.
before proceeding the request :
anonymous wrote :
| void begin()
| {
| try
| {
| if ( !Transaction.instance().isActiveOrMarkedRollback() )
| {
| //log.debug("beginning transaction prior to phase: " + phaseId);
| Transaction.instance().begin();
| }
| }
| catch (Exception e)
| {
| throw new IllegalStateException("Could not start transaction", e);
| }
| }
|
at the end :
anonymous wrote :
| void commitOrRollback()
| {
| try
| {
| if ( Transaction.instance().isActive() )
| {
| //log.debug("committing transaction after phase: " + phaseId);
| Transaction.instance().commit();
| }
| else if ( Transaction.instance().isRolledBackOrMarkedRollback() )
| {
| //log.debug("rolling back transaction after phase: " + phaseId);
| Transaction.instance().rollback();
| }
| }
| catch (Exception e)
| {
| throw new IllegalStateException("Could not commit transaction", e);
| }
| }
|
|
I'm sure there are issue with this solution but it works for the begining ...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4118567#4118567
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4118567
More information about the jboss-user
mailing list