You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Angelo Chen <an...@yahoo.com.hk> on 2008/08/02 07:13:31 UTC
T5: CommitAfter and service method
Hi,
Does CommitAfter annotation work with service method as documented in
http://tapestry.formos.com/nightly/tapestry5/tapestry-hibernate/ ?
I tried this with dispatcher but objects were not saved:
@CommitAfter
public boolean dispatch(Request request, Response response) throws
IOException {
PageLog log = new PageLog();
log.setIp(requests.getHTTPServletRequest().getRemoteAddr());
log.setPath(request.getPath());
sessionManager.getSession().save(log);
return false;
}
--
View this message in context: http://www.nabble.com/T5%3A-CommitAfter-and-service-method-tp18786231p18786231.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: CommitAfter and service method
Posted by Howard Lewis Ship <hl...@gmail.com>.
It does, but it is necessary to apply a service decorator to the
service for this to work. The tapestry-hibernate documentation has
examples.
On Fri, Aug 1, 2008 at 10:13 PM, Angelo Chen <an...@yahoo.com.hk> wrote:
>
> Hi,
>
> Does CommitAfter annotation work with service method as documented in
> http://tapestry.formos.com/nightly/tapestry5/tapestry-hibernate/ ?
> I tried this with dispatcher but objects were not saved:
>
> @CommitAfter
> public boolean dispatch(Request request, Response response) throws
> IOException {
>
> PageLog log = new PageLog();
> log.setIp(requests.getHTTPServletRequest().getRemoteAddr());
> log.setPath(request.getPath());
> sessionManager.getSession().save(log);
> return false;
> }
>
> --
> View this message in context: http://www.nabble.com/T5%3A-CommitAfter-and-service-method-tp18786231p18786231.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
--
Howard M. Lewis Ship
Creator Apache Tapestry and Apache HiveMind
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org