Re: Long JPA-Transactions

2009-06-10 Thread Martin Sachs
Spring will give you all feature you need and will need in a year... My Frameworks for my archetype: ;) - Wicket - Wicketstuff-jquery - Spring - singleton-beans for all short-running transactions - session-beans with extended EntityManager for long running tx ( dont

Re: Long JPA-Transactions

2009-06-10 Thread nino martinez wael
Hmm if you refactor your daos or domain classes you still need to manually change your xml files.. 2009/6/10 Martin Sachs sachs.mar...@gmail.com: Spring will give you all feature you need and will need in a year... My Frameworks for my archetype: ;)    - Wicket    - Wicketstuff-jquery    -

Long JPA-Transactions (was: JPA EntityManager storage)

2009-06-09 Thread Frank Tegtmeyer
Yes, but not all transactions are request-scoped. We have many times implemented asynchronous transactions, because the user didn't want to wait for the results. Can you give a (high level) overview how to handle such a situation in Wicket? I'm sure clients will demand such functionality

Re: Long JPA-Transactions (was: JPA EntityManager storage)

2009-06-09 Thread Martin Makundi
In most cases I would make it thread-scoped anyways so the same structure applies. ** Martin 2009/6/9 Frank Tegtmeyer f...@fte.to: Yes, but not all transactions are request-scoped.  We have many times implemented asynchronous transactions, because the user didn't want to wait for the results.

Re: Long JPA-Transactions (was: JPA EntityManager storage)

2009-06-09 Thread James Carman
On Tue, Jun 9, 2009 at 9:40 AM, Martin Makundimartin.maku...@koodaripalvelut.com wrote: In most cases I would make it thread-scoped anyways so the same structure applies. Right, but you can't use the same hooks to start/stop your transactions that you do with Wicket. You have to do it at the

Re: Long JPA-Transactions (was: JPA EntityManager storage)

2009-06-09 Thread James Carman
On Tue, Jun 9, 2009 at 9:36 AM, Frank Tegtmeyerf...@fte.to wrote: Can you give a (high level) overview how to handle such a situation in Wicket? I'm sure clients will demand such functionality someday from my application. I would use some kind of batch processing system with API calls to get

Re: Long JPA-Transactions (was: JPA EntityManager storage)

2009-06-09 Thread Martin Makundi
On Tue, Jun 9, 2009 at 9:40 AM, Martin In most cases I would make it thread-scoped anyways so the same structure applies. Right, but you can't use the same hooks to start/stop your transactions that you do with Wicket.  You have to do it at the executor level, while it executes the job or

Re: Long JPA-Transactions (was: JPA EntityManager storage)

2009-06-09 Thread James Carman
On Tue, Jun 9, 2009 at 10:44 AM, Martin Makundimartin.maku...@koodaripalvelut.com wrote: Well, the executors themselves sure Start and Stop differently, but they can use same invocations for starting/stopping the entitymanagers (actually: in the discussed example the hooks used in Wicket are

Re: Long JPA-Transactions (was: JPA EntityManager storage)

2009-06-09 Thread Martin Makundi
I say that for most cases, spring is your premature optimization. Often it's not necessary to go further than the sea to fish. 20:80 rule of thumb. ** Martin 2009/6/9 Martijn Dashorst martijn.dasho...@gmail.com: Though Spring is a giant beast, it is a very nice one shop stop for your

Re: Long JPA-Transactions (was: JPA EntityManager storage)

2009-06-09 Thread James Carman
Yeah, and do you carve a fishing pole from a tree every time you want to go fishing? On Tue, Jun 9, 2009 at 11:12 AM, Martin Makundimartin.maku...@koodaripalvelut.com wrote: I say that for most cases, spring is your premature optimization. Often it's not necessary to go further than the sea to

Re: Long JPA-Transactions (was: JPA EntityManager storage)

2009-06-09 Thread Martin Makundi
No, but when I am not looking for whales, I fish just using the fishing string and a hook with a worm tied to it. ** Martin 2009/6/9 James Carman jcar...@carmanconsulting.com: Yeah, and do you carve a fishing pole from a tree every time you want to go fishing?

Re: Long JPA-Transactions (was: JPA EntityManager storage)

2009-06-09 Thread Martijn Dashorst
On Tue, Jun 9, 2009 at 5:12 PM, Martin Makundimartin.maku...@koodaripalvelut.com wrote: I say that for most cases, spring is your premature optimization. Having gone through 3 weeks of connection leak hunting because we reasoned like this and implemented our own connection and transaction

Re: Long JPA-Transactions (was: JPA EntityManager storage)

2009-06-09 Thread Martin Makundi
Having gone through 3 weeks of connection leak hunting because we reasoned like this and implemented our own connection and transaction management solution (Not Invented Here), I can say with confidence: this is not Premature Optimization. Got to know your limits ;) That's a whale ... Keep

Re: Long JPA-Transactions (was: JPA EntityManager storage)

2009-06-09 Thread James Carman
On Tue, Jun 9, 2009 at 11:32 AM, Martin Makundimartin.maku...@koodaripalvelut.com wrote: Keep convincing yourself that transaction and connection management is easy. All I can do is try to make it easy by design :) Ok, I think we can just agree to disagree, but will you do me a favor? When

Re: Long JPA-Transactions (was: JPA EntityManager storage)

2009-06-09 Thread Martin Makundi
Ok, I think we can just agree to disagree, but will you do me a favor?  When (not if) you encounter a situation like Martijn is talking about, will you post back to the list? I just believe in principle that hunting for some bug for 3 weeks is much less waste than dragging some toolkit along

Re: Long JPA-Transactions (was: JPA EntityManager storage)

2009-06-09 Thread nino martinez wael
The focus these days are to simplify frameworks, for instance take guice and warp persist. Really really simple to use and to setup. Spring has a bit to learn about java configuration from these guys (I last time I tried spring was in 2.5) however I've only tried guice 1.0. If it takes 1 day to

Re: Long JPA-Transactions (was: JPA EntityManager storage)

2009-06-09 Thread nino martinez wael
thats obviously catch a whale, hehe.. 2009/6/9 nino martinez wael nino.martinez.w...@gmail.com: The focus these days are to simplify frameworks, for instance take guice and warp persist. Really really simple to use and to setup. Spring has a bit to learn about java configuration from these