Re: OSCache is gone

2011-07-25 Thread Andrus Adamchik
Yeah, sort of saw this coming... I am using OSCache actively on a number of projects. OSCache provides one possible implementation of advanced caching facilities for Cayenne. We can easily roll out a new one (even prior to 3.1 and DI this piece was pluggable), EHCache or something like that. A

OSCache is gone

2011-07-25 Thread Christian Grobmeier
Hey all, OpenSymphony has closed. Not sure if OSCache has survived. This page recommends OSCache: http://cayenne.apache.org/doc/query-result-caching.html It looks like this project is the follow up: java.net/projects/oscache But it seems also to be rather dead (last commit > 4 yrs) Is it time t

Re: Configuration Class?

2011-07-25 Thread Andrus Adamchik
Very nice comparison! And if you add nested contexts to the picture, it turns into a certain subset of Git :-) On Jul 25, 2011, at 7:09 PM, Robert Zeigler wrote: > Transactions start at "commitChanges". Cayenne's feel is much more like svn > to me than hibernate. You "check out" objects (fet

Re: Configuration Class?

2011-07-25 Thread Christian Grobmeier
>> You wrote, ObjectContext is some kind of a "disconnected" object. If I >> create two new objects in the ObjectContext, when does the transaction >> start exactly? > > When you call ObjectContext.commitChanges() (or performQuery() for that > matter). Tx is started when an operation reaches DataD

Re: Configuration Class?

2011-07-25 Thread Christian Grobmeier
nice to compare it with SVN ;-) Thanks! On Mon, Jul 25, 2011 at 6:09 PM, Robert Zeigler wrote: > Transactions start at "commitChanges".  Cayenne's feel is much more like svn > to me than hibernate.  You "check out" objects (fetch them from the db) to > your working "directory" (the object conte

Re: Configuration Class?

2011-07-25 Thread Andrus Adamchik
On Jul 25, 2011, at 7:01 PM, Christian Grobmeier wrote: > You wrote, ObjectContext is some kind of a "disconnected" object. If I > create two new objects in the ObjectContext, when does the transaction > start exactly? When you call ObjectContext.commitChanges() (or performQuery() for that matt

Re: Configuration Class?

2011-07-25 Thread Robert Zeigler
Transactions start at "commitChanges". Cayenne's feel is much more like svn to me than hibernate. You "check out" objects (fetch them from the db) to your working "directory" (the object context). You modify them, delete them, add new ones, etc. Then a call to "commitChanges" sends everythin

Re: Configuration Class?

2011-07-25 Thread Christian Grobmeier
> Since ObjectContext (server or ROP client) is a "disconnected" object in > Cayenne transactions are something different compared to say Hibernate > (that's my guess anyways, I don't know much about Hibernate). Cayenne server > transactions are a "bridge" to JDBC transactions (there's not Cayen

Re: Configuration Class?

2011-07-25 Thread Andrus Adamchik
Correct. Since ObjectContext (server or ROP client) is a "disconnected" object in Cayenne transactions are something different compared to say Hibernate (that's my guess anyways, I don't know much about Hibernate). Cayenne server transactions are a "bridge" to JDBC transactions (there's not Ca

Re: Configuration Class?

2011-07-25 Thread Christian Grobmeier
>> I was just surprise that getDataDomain() is not in CayenneRuntime. It >> seemed to me that would be the logical place. I can see getChannel and >> getContext is in CayenneRuntime too. So, why not getDataDomain? > > The answer is ROP. DataDomain is a "server" configuration object, and is not > a

Re: Configuration Class?

2011-07-25 Thread Andrus Adamchik
On Jul 25, 2011, at 6:10 PM, Christian Grobmeier wrote: > I was just surprise that getDataDomain() is not in CayenneRuntime. It > seemed to me that would be the logical place. I can see getChannel and > getContext is in CayenneRuntime too. So, why not getDataDomain? The answer is ROP. DataDomain

Re: Configuration Class?

2011-07-25 Thread Christian Grobmeier
Hi Andrus, thanks, that helped already. But one more question. I use the CayenneFilter which uses WebUtil to put my ServerRuntime. If I want to get it again, I use that bunch of code (this refers to Struts 2 Action ServletContextAware). CayenneRuntime cayenneRuntime = WebUtil.getCayenneRuntime(th

Re: Configuration Class?

2011-07-25 Thread Andrus Adamchik
Hi Christian, the approach is essentially the same (until we switch transaction factory to DI that is) - you need a hold of DataDomain instance, and use it to create transactions. In 3.1 You'd get DataDomain from ServerRuntime: ServerRuntime r = ... DataDomain d = r.getDataDomain(); Of course

Configuration Class?

2011-07-25 Thread Christian Grobmeier
Hi what is the correct approach here? http://cayenne.apache.org/doc/understanding-transactions.html DataDomain domain = Configuration.getSharedConfiguration().getDomain(); Transaction tx = domain.createTransaction(); The Configuration class is not in my jar anymore (3.1M2) so I guess it has chan

Re: Ashwood Issues

2011-07-25 Thread Michael Gentry
On Mon, Jul 25, 2011 at 3:15 AM, Andrus Adamchik wrote: > Is this going to be a general purpose sorter or something specifically > targeting your model? I.e. can we use it in Cayenne as a second generation > sorter that does all AshwoodEntitySorter does, plus handles extra scenarios? That is my

Re: Ashwood Issues

2011-07-25 Thread Andrus Adamchik
Is this going to be a general purpose sorter or something specifically targeting your model? I.e. can we use it in Cayenne as a second generation sorter that does all AshwoodEntitySorter does, plus handles extra scenarios? Now overriding standard services in DI runtime for unit tests can be done