Re: Re : Cayenne Transactions

2011-09-13 Thread Andrus Adamchik
Hi, not sure if you subscribed to the list and receiving the traffic from the list or only the emails cc'd to your address, as there were other replies in this thread. I am cc'ing now, but you may want to check the archive for the ongoing discussion. On Sep 13, 2011, at 10:16 PM, stéphane Les

Re : Cayenne Transactions

2011-09-13 Thread stéphane Lestoclet
>http://cayenne.apache.org/doc20/understanding-transactions.html Thanks for the link. In fact, I already read almost all the Cayenne documentation http://cayenne.apache.org/doc/understanding-transactions.html (which I think more recent) >I use Cayenne in a fairly straight forward manner, and pe

Re: 3.1 example app & extended types

2011-09-13 Thread Andrus Adamchik
On Sep 13, 2011, at 8:53 PM, Marek Šabo wrote: > Tomcat uses HashMap to store filters so order of initialization is not > guaranteed Wow. That would be a major bug in Tomcat. IIRC the servlet spec is quite explicit about the order of filters being the same as their declarations in web.xml.

Re: 3.1 example app & extended types

2011-09-13 Thread Marek Šabo
yes it should. Make sure your filter is initialized before you call the code above and the filter name in web.xml is the same as your Cayenne XML file name. Andrus I managed to hack this. Tomcat uses HashMap to store filters so order of initialization is not guaranteed (which of course happen

Re: Cayenne Transactions

2011-09-13 Thread Andrus Adamchik
Hi there, See other replies in this thread. I can only add that Cayenne is as mature as Hibernate, and has its own approaches to a set of persistence problems (so if you are looking for 1..1 correspondence, there won't be one). Cayenne most certainly can be and has been integrated with all kind

Re: Production Version

2011-09-13 Thread Andrus Adamchik
Yes, 3.0.x is the "stable" supported branch of Cayenne. 3.1 is "alpha". It is being used in production too (I do it on a number of projects). The biggest risk with it is fast API evolution, so when you upgrade between 3.1 milestones, you'd have to check your code for incompatibilities. And of

Re: Cayenne Transactions

2011-09-13 Thread Mike Kienenberger
At one point, there was a Spring with Cayenne example by Andrus. Not sure how dated it is now. https://cwiki.apache.org/CAY/spring-integration-examples.html On Sun, Sep 11, 2011 at 10:41 AM, stéphane Lestoclet wrote: > Hi, > > > The Cayenne documentation states the following : > > Chapter: Und

Production Version

2011-09-13 Thread Joe Baldwin
I just wanted to verify 3.0 is the version recommended for production code. (Just wanted to make sure I didn't miss anything with all the discussion over 3.1. I am currently using 3.0.1 for my "production" demo.) This is probably a moot question anyway because I have found that Cayenne dev ve

Re: Getting null instead of the actual value

2011-09-13 Thread Andrus Adamchik
Then I'd look closer at #3. Something related to what happened in the app between the 2 events. E.g. one common mistake is using a cross-thread shared ObjectContext (or its objects) to modify and commit objects. Andrus On Sep 13, 2011, at 6:20 PM, Christian Grobmeier wrote: > Hi Andrus, >

Re: Getting null instead of the actual value

2011-09-13 Thread Christian Grobmeier
Hi Andrus, thanks for the comments. I will check that again and come back on thursday with the answer (currently on travel). What bugs me really is that it works sometimes, and sometimes not. Can this behavior be explained with Michaels/your suggestions? Cheers On Tue, Sep 13, 2011 at 4:09 PM, A

Re: 3.1 Module & Cache Configuration

2011-09-13 Thread Andrus Adamchik
On Sep 13, 2011, at 5:12 PM, Gary Jarrel wrote: > I have an annotation similar to > CacheGroups but it goes further into tracking whether an object should > be cached in local or shared cache. Also keep in mind that Cayenne uses QueryCache for caching query results. There is still a separate ca

Re: 3.1 Module & Cache Configuration

2011-09-13 Thread Gary Jarrel
I'm testing a DataChannelFilter very similar to CacheInvalidationFilter with a few extras mainly invalidating groups in either Shared or Local caches. I have an annotation similar to CacheGroups but it goes further into tracking whether an object should be cached in local or shared cache. I'll dig

Re: Getting null instead of the actual value

2011-09-13 Thread Andrus Adamchik
I haven't read the entire thread, only the messages quoted below. Michael's advise is absolutely correct. However the initial code worked because the Role was likely already registered in the context, so the UserRoles was pulled automatically in the same context. So ... a few things to check:

Re: 3.1 Module & Cache Configuration

2011-09-13 Thread Andrus Adamchik
Not quite sure what you are planning to test, but my guess would be you need to use NestedQueryCache instance. Andrus On Sep 13, 2011, at 4:49 PM, Gary Jarrel wrote: > Ahhh I see :) so what is the best way to test local and shared cache > from the point of view of adding and removing objects? >

Re: 3.1 Module & Cache Configuration

2011-09-13 Thread Gary Jarrel
Ahhh I see :) so what is the best way to test local and shared cache from the point of view of adding and removing objects? garyj On Tue, Sep 13, 2011 at 11:34 PM, Andrus Adamchik wrote: > > On Sep 13, 2011, at 4:30 PM, Gary Jarrel wrote: > >> now what I am finding is that both domainCache and c

Re: Getting null instead of the actual value

2011-09-13 Thread Christian Grobmeier
Hi folks, i tried this, i didn't work. Any more ideas? One thing I should note: it doesn'ht happen all the time unfortunately. Its only sometimes and I really don't know why. More ideas appreciated Cheers Christian On Tue, Sep 6, 2011 at 5:42 PM, Michael Gentry wrote: > Hi Christian, > >

Re: 3.1 example app & extended types

2011-09-13 Thread Andrus Adamchik
On Sep 13, 2011, at 4:39 PM, Marek Šabo wrote: > Oj I see, so I'm probably not gonna use @Inject anywhere? Except in your own Cayenne extensions that you'll load in Cayenne container. > I managed to upgrade configure from 3.0 to 3.1 but I don't know how to add > extended types. I used to do it

Re: 3.1 example app & extended types

2011-09-13 Thread Marek Šabo
Oj I see, so I'm probably not gonna use @Inject anywhere? I managed to upgrade configure from 3.0 to 3.1 but I don't know how to add extended types. I used to do it in wicket init method (wicket filter is second in web.xml, both are mapped to /*) but now I got nullpointer when I do this:

Re: 3.1 Module & Cache Configuration

2011-09-13 Thread Andrus Adamchik
On Sep 13, 2011, at 4:30 PM, Gary Jarrel wrote: > now what I am finding is that both domainCache and contextCache is the > same object, when I would have though they would have been two > different instance of OSQueryCache given that one is the local cache > and the other is the shared cache. Yo

3.1 Module & Cache Configuration

2011-09-13 Thread Gary Jarrel
Hi All Again, Still doing testing on the new configuration and rewriting some code to 3.1, and have come across the following issue: My configuration code again: Module extensions = new Module() { @Override public void configure(Binder binder) { binder.bind(QueryCache.class).to(O