Re: nested database updates, updating to tapestry-hibernate 5.4
I'm not sure what you mean by nesting db queries? Can you give an example? Note, the @CommitAfter annotation does exactly what it says on the tin, it causes a commit after every method that has the annotation.
Re: nested database updates, updating to tapestry-hibernate 5.4
hm I'm guessing it's when there are 2 or more saves to DB from a method. Nothing in the stack trace shows errors at all, but I get the tapestry exception page with: org.apache.tapestry5.ioc.internal.OperationException *nested transactions not supported* onSuccess() method just looks like this: @CommitAfter Object onSuccess() { *tapestryRackService.save(newRack);* for (int i = 0; i newRack.getunits(); i++) { RackUnit ru = new RackUnit(); ru.setrackId(newRack); ru.setRackUnitId(i + 1); *tapestryRackUnitService.save(ru);* } return ListRack.class; } It works in 5.3.7 - but not 5.4-beta-6 I have only adjusted the pom with the change of tapestry version. On Wed, Aug 27, 2014 at 11:07 PM, Lance Java lance.j...@googlemail.com wrote: I'm not sure what you mean by nesting db queries? Can you give an example? Note, the @CommitAfter annotation does exactly what it says on the tin, it causes a commit after every method that has the annotation.
Re: Grid pager no activation context stored on sorting fields
Out of curiosity, does using your total control jumpstart example [1] get around it? For instance, trying to implement this admin theme [2] (which is bootstrap) would be a problem - let's just stay away from that for the moment. that is commercial template btw, i'm not associated with fwiw. [1] http://jumpstart.doublenegative.com.au/jumpstart/together/totalcontrolcrud/persons [2] http://demo.ztapps.com/curo/v1/invoice.html On Wed, Aug 27, 2014 at 11:30 AM, Geoff Callender geoff.callender.jumpst...@gmail.com wrote: It's worth noting that if your grid is in a component then activation context might not be suitable. A solution is on the way: https://issues.apache.org/jira/browse/TAP5-2297 Cheers, Geoff On 27 Aug 2014, at 11:08 am, Chris Mylonas ch...@opencsta.org wrote: Hi Tapestry Noobs of the future! ...that come across this problem,use onPassivate to keep your app working nicely. I had the pleasure of using my software in a field trial (nothing exciting, equipment tracking in a data centre) and made a few adjustments to quicken my task though the night although forgot about onPassivate. So where I dev'd for 15 hours for a functional field test, I gave myself a usability conundrum for a few hours in the we-small hours by not being able to sort within a context. (The irony is I was too proud to hook up the Internet to save wifi on my laptop - data centre is full of both internet and power!) - So the last half a dozen cables I couldn't tracewell there's room for another field trial! void onActivate(Long id) { store it hereuse to get your data in setupRender() }; Long onPassivate() { return your-passed-in-parameter-usually-Long }; Happy deving! Chris - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: nested database updates, updating to tapestry-hibernate 5.4
On Wed, 27 Aug 2014 10:07:59 -0300, Lance Java lance.j...@googlemail.com wrote: I'm not sure what you mean by nesting db queries? Can you give an example? Note, the @CommitAfter annotation does exactly what it says on the tin, it causes a commit after every method that has the annotation. And no tapestry-hibernate version ever supported nested transactions, ever. -- Thiago H. de Paula Figueiredo Tapestry, Java and Hibernate consultant and developer http://machina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: nested database updates, updating to tapestry-hibernate 5.4
OK. ever ;) I didn't know what nested transactions were in hibernate. Just a change in behaviour from 5.3.7 to 5.4 My bastardised workflow likes to use tapestry-hibernate for doing the UI and then porting to EJB. On Wed, Aug 27, 2014 at 11:47 PM, Thiago H de Paula Figueiredo thiag...@gmail.com wrote: On Wed, 27 Aug 2014 10:07:59 -0300, Lance Java lance.j...@googlemail.com wrote: I'm not sure what you mean by nesting db queries? Can you give an example? Note, the @CommitAfter annotation does exactly what it says on the tin, it causes a commit after every method that has the annotation. And no tapestry-hibernate version ever supported nested transactions, ever. -- Thiago H. de Paula Figueiredo Tapestry, Java and Hibernate consultant and developer http://machina.com.br - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: nested database updates, updating to tapestry-hibernate 5.4
Is the service also annotated with @CommitAfter? This could cause a nested transaction.
Lots of issues being closed
I'm working my way through the issue lists, trying to hit low hanging fruit, and get rid of duplicates and other things. I'm resolving many issues as won't fix, not because they are invalid, but because the problems described are small, or the fix is highly disruptive, or because the committer team simply doesn't have the bandwidth to address the problem. In some cases, re-opening the issue and supplying a patch (with tests!) can change the disposition of the issue. I'm very interested in getting 5.4 out the door; there's still a number of serious issues barring the way, and the backlog of bugs is proving to be a real impediment. -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com @hlship
Re: nested database updates, updating to tapestry-hibernate 5.4
No. Only the page classes. I'm not too worried about it, Thiago says not-supported. It's just a change in behaviour from 5.3.7 to 5.4-beta. The concern I am more interested in raising is the stack trace on the command line is not there where I'm running from but it's caught by tapestry. If time permits I will create a trivial sample to recreate today/tomorrow. I am using a beanedit form as well. The snippet from the unfiltered frames of the tapestry exception page has (pasted). Plenty of nesting! org.hibernate.engine.transaction.spi.AbstractTransactionImpl begin() AbstractTransactionImpl.java154 org.hibernate.internal.SessionImpl beginTransaction() SessionImpl.java1431 $Session_138e725c5508b7db beginTransaction() $Session_138e725c5508b68d beginTransaction() org.opencsta.tapestry.equipmenttracker.services.RackServiceImpl save() RackServiceImpl.java32 $RackService_138e725c5508b7da save() $RackService_138e725c5508b7b6 save() org.opencsta.tapestry.equipmenttracker.pages.CreateRack advised$onSuccess_138e725c5508b7e8() CreateRack.java30 org.opencsta.tapestry.equipmenttracker.pages .CreateRack$Invocation_onSuccess_138e725c5508b7e7 proceedToAdvisedMethod() org.apache.tapestry5.internal.plastic.AbstractMethodInvocation proceed() AbstractMethodInvocation.java 84 org.apache.tapestry5.internal.hibernate .CommitAfterWorker$1 advise() CommitAfterWorker.java53 org.apache.tapestry5.internal.plastic.AbstractMethodInvocation proceed() AbstractMethodInvocation.java86 org.opencsta.tapestry.equipmenttracker.pages .CreateRack onSuccess() CreateRack.java org.opencsta.tapestry.equipmenttracker.pages.CreateRack dispatchComponentEvent()CreateRack.java org.apache.tapestry5.internal.structure.ComponentPageElementImpl dispatchEvent() ComponentPageElementImpl.java919 org.apache.tapestry5.internal.structure.ComponentPageElementImpl processEventTriggering() ComponentPageElementImpl.java1104 org.apache.tapestry5.internal.structure.ComponentPageElementImpl access$3100() ComponentPageElementImpl.java59 org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5 invoke() ComponentPageElementImpl.java1049 org.apache.tapestry5.internal.structure .ComponentPageElementImpl$5 invoke() ComponentPageElementImpl.java1046 On Thu, Aug 28, 2014 at 4:37 AM, Lance Java lance.j...@googlemail.com wrote: Is the service also annotated with @CommitAfter? This could cause a nested transaction.
Unit test component with request parameter
Hi everyone, I'm trying to create some unit test against a new component I'm working on. The new component uses request.getParameter(). I'm wondering how I would go about setting the request parameter in my test case. Component I'm testing public void keywordFacetSearch() { // Get the user's search keyword(s). Get optional parameters, or apply default values if those parameters weren't passed. String searchString = request.getParameter(SearchParam.KEY) != null ? request.getParameter(CarDaddyEnum.KEY).trim() : ; } Test case @Test public void testKeywordFacetSearch() { request.setAttribute(SearchParam.KEY, foo); } request.setAttribute doesn't seem to work. Any ideas? Thanks -- George Christman www.CarDaddy.com P.O. Box 735 Johnstown, New York