Tapestry IOC @Primary

2012-03-22 Thread Denis Stepanov
Would be possible to change the default behaviour to select a service marked @Primary when there are multiple occurrences of the same interface? I'm finding that it's complicated to add a service with the same interface, I need to find all occurrences of the interface and mark them @Primary and

tapestry.execution-mode default

2012-03-22 Thread trsvax
I'm trying to use tapestry.execution-mode in a module and I get this if it's not defined: SEVERE: Symbol 'tapestry.execution-mode' is not defined. SEVERE: Operations trace: SEVERE: [ 1] Realizing service ExcludeVisitor SEVERE: [ 2] Instantiating service ExcludeVisitor implementation via com.trsvax

Re: tapestry.execution-mode default

2012-03-22 Thread Igor Drobiazko
tapestry.execution-mode is not a symbol but a system property which defaults to production. Please the the line 101 here: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/TapestryFilter.java?view=markup It is only used to load execution mode s

Re: Tapestry IOC @Primary

2012-03-22 Thread Igor Drobiazko
The @Primary annotation is supposed to be placed on a single implementation, not all of them. The most frequent use case is a service which is implemented as a chain or a strategy. On Thu, Mar 22, 2012 at 1:55 PM, Denis Stepanov wrote: > Would be possible to change the default behaviour to select

Re: Tapestry IOC @Primary

2012-03-22 Thread Denis Stepanov
You didn't understand me, I have only one implementation with the @Primary, the problem is when you are accesing the service without it. Example: MyService.class, new Clustered(); MyService.class, new Local(); @Primary @Inject MyService service <-- this will fail because there are two implemen

Re: [jira] [Commented] (TAP5-1880) GZip compression should be disabled if the request is over http 1.0

2012-03-22 Thread Bob Harner
Just a guess, haven't tried it, but couldn't you check for request.getHeader("Accept-Encoding") containing "gzip" ? Or maybe I'm misunderstanding the problem. On Thu, Mar 22, 2012 at 1:46 PM, Steve Eynon (Commented) (JIRA) wrote: > >    [ > https://issues.apache.org/jira/browse/TAP5-1880?page=co

Re: Upgrading tapestry-hibernate to Hibernate 4.1.1

2012-03-22 Thread Jochen Frey
Hey Kalle, thanks for the quick response. I think I found the reason why it's not working for me (and I am surprised what you're describing could have worked for you at all). By way of a unit test I tried your approach (adding the for Hibernate 4.1.1), and for me it fails with a Cau

Re: Upgrading tapestry-hibernate to Hibernate 4.1.1

2012-03-22 Thread Kalle Korhonen
On Thu, Mar 22, 2012 at 11:23 AM, Jochen Frey wrote: > Hey Kalle, thanks for the quick response. > I think I found the reason why it's not working for me (and I am surprised > what you're describing could have worked for you at all).  By way of a unit > test I tried your approach (adding the fo

Re: Upgrading tapestry-hibernate to Hibernate 4.1.1

2012-03-22 Thread Jochen Frey
Thanks for the confirmation, I was worried about my sanity for a little while ;) It'd be great if T5.4 came with Hibernate 4 out of the box. In the meanwhile the approach you're suggesting (building our own and putting it into our local repo) works fine. Cheers! J On Mar 22, 2012, at 6:53 PM,

Re: Upgrading tapestry-hibernate to Hibernate 4.1.1

2012-03-22 Thread Kalle Korhonen
On Thu, Mar 22, 2012 at 10:37 PM, Jochen Frey wrote: > Thanks for the confirmation, I was worried about my sanity for a little while > ;) > It'd be great if T5.4 came with Hibernate 4 out of the box.  In the meanwhile > the approach you're suggesting (building our own and putting it into our >