Re: [Beankeeper-discussion] BeanKeeper instance identity.
Brought to you by:
demonsystem
From: Bräutigam R. <de...@ne...> - 2011-12-13 19:46:14
|
On 12/08/2011 04:31 PM, Sergey Olefir wrote: > Hi, > > I am not sure if this list is even alive anymore, but let's see Hi, The list is alive and monitored, however BeanKeeper is not actively developed anymore. I still think its approach is a valid one, but unfortunately all the developers (the few we've had) moved on to other projects, including myself. > Recently I've been trying to use BeanKeeper. It seemed to cover mostly > what I need and is very simple to use -- which is great! Glad to hear that. > However now I discovered something that has me completely confused. I > assumed that BeanKeeper manages Java object instances -- to give a > really trivial example -- if I query for something by its unique ID > twice, I'd expect to receive the same Java object instance both times. > However this not appears to be the case? You are correct, this is not the case, and on purpose. The reason is that BeanKeeper tries to be as simple as possible even if that means it does not fit all use-cases. BeanKeeper doesn't have any notion of a "Session" (of course it does have a notion of a Transaction though). It doesn't manage bean instances for you like Hibernate does. I believe for somebody not coming from Hibernate (which should be really rare these days), this is actually more intuitive. The rule is: any object you receive is completely clear, and does not in any way have any side-effects. It does not persist automatically, it does not influence other instances in your JVM, etc. > Best regards, > Sergey Robert. |