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 s

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 : >> 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. > > C

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

2009-06-09 Thread James Carman
On Tue, Jun 9, 2009 at 9:40 AM, Martin Makundi 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 executor level, while it execu

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

2009-06-09 Thread James Carman
On Tue, Jun 9, 2009 at 9:36 AM, Frank Tegtmeyer 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 > the sta

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 th

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

2009-06-09 Thread James Carman
On Tue, Jun 9, 2009 at 10:44 AM, Martin Makundi 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 from > EntityManagerUtils -class a

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

2009-06-09 Thread Martijn Dashorst
I tend to side with James. Though it seems like something you can quickly pull out of your hat, transaction demarcation in combination with proper connection pooling in web applications is something you'd better get from a well tested, widely used framework rather than suffer from NIH syndrome. Bee

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 : > Though Spring is a giant beast, it is a very nice one shop stop for > your connection pooling, datasourcing

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 Makundi wrote: > 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. >

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 : > 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 Makundi 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 management solution (Not Invented Here

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 ... > K

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

2009-06-09 Thread James Carman
On Tue, Jun 9, 2009 at 11:32 AM, Martin Makundi 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 (not if) you encounter a situatio

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 ut

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 : > 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 s