[SqueakDBX] Re: Connection Pool for Glorp

Mariano Martinez Peck marianopeck at gmail.com
Sat Mar 27 16:20:39 UTC 2010


On Sat, Mar 27, 2010 at 1:04 PM, John Toohey <johnptoohey at gmail.com> wrote:

> Is there a way to see if the DBXConnection is in the middle of a
> transaction? If I am releasing a connection, I'd like to rollback if a
> transaction is open.
>
>
I answer you in SqueakDBX so that not to make noise in Glorp.

No, there is no way right now, but it can be easily added (I think). You can
add a boolean variable hasTransactionOpened to DBXConnection, initializated
in false.
Then, then calling DBXConnection >> startTransaction     you set that to
true.
Then, in messages commit, rollback you put that to false.
Then in messsages finalize, close, and maybe some other place, you ask for
the value, if it is true, then you rallback and put variable to false

Of course we would need to write tests for that.

I can give it a try this weekend.

What do you think ?

Cheers

Mariano


>
> On Sat, Mar 27, 2010 at 10:02, Mariano Martinez Peck <
> marianopeck at gmail.com> wrote:
>
>> Wait....let's calm down....too much misunderstands here.
>>
>> Glorp is maintained and developed in VW. There is a port to squeak from 2
>> years old or more. Then, we took that version and did several refactors to
>> Glorp so that it uses an abstract DatabaseDriver. This only affects
>> SqueakDatabaseAccessor. We called that GlorpDBX.
>>
>> Diogenes: don't worry. John is aware of GlorpDBX, what it is, how to
>> install, etc. Check SqueakDBX mailing list. He even posted in OpenDBX
>> mailing list ;)
>>
>> Now....regarding the Connection Pool, you have different things:
>>
>> - The package Alan told you about Seaside package. He was talking about
>> the one that is in VW public store. To look at it, you should take a VW, go
>> to store and look at it. And if you like it, I don't know how, export it and
>> load in pharo.
>> - There is a Seaside package in squeaksource, which is not the same, I
>> think it has some kind of connection pool but I am not sure. Maybe Keithy
>> did it.
>> - There is a connection pool that Ramón León did some time ago. Check
>> http://onsmalltalk.com/making-a-connection-pool-for-glorp-in-seaside
>> - There is a connetion pool Esteban Lorenzano did directly for GlorpDBX
>>
>> Finally, if you plan to do a connection pool for GlorpDBX you have to
>> possibilities:
>> - be hardcoded to the SqueakDBX driver and use directly DBXConnection
>> objects
>> - not be hardcoded to SqueakDBX driver but use DatabaseDriver or
>> DatabaseDriver >> connection instead. I am not sure if this is possible. But
>> having a connection pool for Glorp, not hardcoding with the connection class
>> would be cool.
>>
>> Cheers
>>
>> Mariano
>>
>>
>>
>>
>> On Fri, Mar 26, 2010 at 5:53 PM, John Toohey <johnptoohey at gmail.com>wrote:
>>
>>> Hang on, this is exactly what I load :-
>>>
>>> Gofer new
>>> squeaksource: 'MetacelloRepository';
>>>  package: 'ConfigurationOfGlorpDBX';
>>>    load.
>>> ((Smalltalk at: #ConfigurationOfGlorpDBX) project version: '1.0') load.
>>>
>>> I need to get used to calling it GlorpDBX :-)
>>>
>>>
>>>
>>> On Fri, Mar 26, 2010 at 16:37, Diogenes Moreira <
>>> diogenes.moreira at gmail.com> wrote:
>>>
>>>> Oki, please get the Glorp Package from Squeak DBX Project.. this package
>>>> have change to adapt DBAccessor to SqueakDBX classes, an remove hiddens "IF"
>>>> in the Squeak Glorp Version..
>>>>
>>>>
>>>>
>>>> Best Regards..
>>>>
>>>>
>>>> On Fri, Mar 26, 2010 at 5:34 PM, John Toohey <johnptoohey at gmail.com>wrote:
>>>>
>>>>> I'm using SqueakDBX on Pharo RC3.
>>>>>
>>>>> On Fri, Mar 26, 2010 at 16:32, Diogenes Moreira <
>>>>> diogenes.moreira at gmail.com> wrote:
>>>>>
>>>>>> from glorp or squeakdbx project....??
>>>>>>
>>>>>> take Care.
>>>>>> The SqueakDBX version has a couple of refactorings and modifications
>>>>>> to adapt to different platforms.
>>>>>>
>>>>>> the detail is on the web squeakdbx www.squeakdbx.org
>>>>>>
>>>>>>
>>>>>>
>>>>>> an other question..? do you using pharo or squeak ???
>>>>>>
>>>>>> Best Regards..
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Mar 26, 2010 at 5:26 PM, John Toohey <johnptoohey at gmail.com>wrote:
>>>>>>
>>>>>>> I took the one from squeaksource, latest update was Feb 22 2010.
>>>>>>>  Where do I find the one you are looking at?
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Mar 26, 2010 at 16:20, Alan Knight <knight at acm.org> wrote:
>>>>>>>
>>>>>>>>  I think you're looking at a different package than I am. Quite
>>>>>>>> possibly it's the original work that Ramon did. I have no GSDescriptorSystem
>>>>>>>> or GSPooledDatabaseAccessor. I suspect that might also be for an old version
>>>>>>>> of Seaside.
>>>>>>>>
>>>>>>>>
>>>>>>>> At 04:11 PM 2010-03-26, John Toohey wrote:
>>>>>>>>
>>>>>>>> I mean should my own Database class which is a sub-class of
>>>>>>>> DescriptorSystem be changed to sub-class GSDescriptorSystem and then use
>>>>>>>> GSPooledDatabaseAccessor instead of SqueakDatabaseAccessor?
>>>>>>>>
>>>>>>>> I don't see any specific VW code in here, so far anyhow.
>>>>>>>>
>>>>>>>> I'll write this up and post it here, when I get it working.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Fri, Mar 26, 2010 at 16:03, Alan Knight <knight at acm.org> wrote:
>>>>>>>>
>>>>>>>>  I'm not sure what you mean by inheriting from these. Right now,
>>>>>>>> this provides a VW-specific pooling accessor. You could make a SqueakDBX
>>>>>>>> one, and it probably would be nice to try and abstract some of that stuff to
>>>>>>>> reduce any code duplication. And documentation is good too. This is based on
>>>>>>>> work that Ramon Leon did, back in 2007, I'm not sure if it was in Squeak or
>>>>>>>> not.
>>>>>>>>
>>>>>>>>
>>>>>>>> At 03:29 PM 2010-03-26, John Toohey wrote:
>>>>>>>>
>>>>>>>> This looks great. Is the correct procedure to have all my class that
>>>>>>>> inherit from Glorp, inherit from these instead? I'm using GlorpDBX. I had no
>>>>>>>> idea this was available, so we should get it documented on the SqueakDBX
>>>>>>>> site.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Fri, Mar 26, 2010 at 14:42, Alan Knight <knight at acm.org> wrote:
>>>>>>>>
>>>>>>>>  Take a look at the SeasideGlorp package.
>>>>>>>>
>>>>>>>> At 02:36 PM 2010-03-26, John Toohey wrote:
>>>>>>>>
>>>>>>>> I need to write a connection pool for Glorp and am thinking that the
>>>>>>>> Database accessor is the place to do this. Is this correct, or has anyone
>>>>>>>> any experience with this?
>>>>>>>> -- -JT
>>>>>>>>
>>>>>>>> -- You received this message because you are subscribed to the
>>>>>>>> Google Groups "glorp-group" group. To post to this group, send
>>>>>>>> email to glorp-group at googlegroups.com. To unsubscribe from this
>>>>>>>> group, send email to glorp-group+unsubscribe at googlegroups.com<glorp-group%2Bunsubscribe at googlegroups.com>.
>>>>>>>> For more options, visit this group at
>>>>>>>> http://groups.google.com/group/glorp-group?hl=en.
>>>>>>>>
>>>>>>>> -- Alan Knight [|], Engineering Manager, Cincom Smalltalk
>>>>>>>> knight at acm.org aknight at cincom.com http://www.cincom.com/smalltalk
>>>>>>>> -- You received this message because you are subscribed to the
>>>>>>>> Google Groups "glorp-group" group. To post to this group, send
>>>>>>>> email to glorp-group at googlegroups.com. To unsubscribe from this
>>>>>>>> group, send email to glorp-group+unsubscribe at googlegroups.com<glorp-group%2Bunsubscribe at googlegroups.com>.
>>>>>>>> For more options, visit this group at
>>>>>>>> http://groups.google.com/group/glorp-group?hl=en.
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> -JT
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>> Groups "glorp-group" group.
>>>>>>>> To post to this group, send email to glorp-group at googlegroups.com.
>>>>>>>> To unsubscribe from this group, send email to
>>>>>>>> glorp-group+unsubscribe at googlegroups.com<glorp-group%2Bunsubscribe at googlegroups.com>
>>>>>>>> .
>>>>>>>> For more options, visit this group at
>>>>>>>> http://groups.google.com/group/glorp-group?hl=en.
>>>>>>>>
>>>>>>>> --
>>>>>>>> Alan Knight [|], Engineering Manager, Cincom Smalltalk
>>>>>>>> knight at acm.org
>>>>>>>> aknight at cincom.com
>>>>>>>>  http://www.cincom.com/smalltalk
>>>>>>>>
>>>>>>>> --
>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>> Groups "glorp-group" group.
>>>>>>>> To post to this group, send email to glorp-group at googlegroups.com.
>>>>>>>> To unsubscribe from this group, send email to
>>>>>>>> glorp-group+unsubscribe at googlegroups.com<glorp-group%2Bunsubscribe at googlegroups.com>
>>>>>>>> .
>>>>>>>> For more options, visit this group at
>>>>>>>> http://groups.google.com/group/glorp-group?hl=en.
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> -JT
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>> Groups "glorp-group" group.
>>>>>>>> To post to this group, send email to glorp-group at googlegroups.com.
>>>>>>>> To unsubscribe from this group, send email to
>>>>>>>> glorp-group+unsubscribe at googlegroups.com<glorp-group%2Bunsubscribe at googlegroups.com>
>>>>>>>> .
>>>>>>>> For more options, visit this group at
>>>>>>>> http://groups.google.com/group/glorp-group?hl=en.
>>>>>>>>
>>>>>>>> --
>>>>>>>> Alan Knight [|], Engineering Manager, Cincom Smalltalk
>>>>>>>> knight at acm.org
>>>>>>>> aknight at cincom.com
>>>>>>>>  http://www.cincom.com/smalltalk
>>>>>>>>
>>>>>>>> --
>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>> Groups "glorp-group" group.
>>>>>>>> To post to this group, send email to glorp-group at googlegroups.com.
>>>>>>>> To unsubscribe from this group, send email to
>>>>>>>> glorp-group+unsubscribe at googlegroups.com<glorp-group%2Bunsubscribe at googlegroups.com>
>>>>>>>> .
>>>>>>>> For more options, visit this group at
>>>>>>>> http://groups.google.com/group/glorp-group?hl=en.
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> -JT
>>>>>>>
>>>>>>>
>>>>>>>  --
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "glorp-group" group.
>>>>>>> To post to this group, send email to glorp-group at googlegroups.com.
>>>>>>> To unsubscribe from this group, send email to
>>>>>>> glorp-group+unsubscribe at googlegroups.com<glorp-group%2Bunsubscribe at googlegroups.com>
>>>>>>> .
>>>>>>> For more options, visit this group at
>>>>>>> http://groups.google.com/group/glorp-group?hl=en.
>>>>>>>
>>>>>>
>>>>>>  --
>>>>>> You received this message because you are subscribed to the Google
>>>>>> Groups "glorp-group" group.
>>>>>> To post to this group, send email to glorp-group at googlegroups.com.
>>>>>> To unsubscribe from this group, send email to
>>>>>> glorp-group+unsubscribe at googlegroups.com<glorp-group%2Bunsubscribe at googlegroups.com>
>>>>>> .
>>>>>> For more options, visit this group at
>>>>>> http://groups.google.com/group/glorp-group?hl=en.
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> -JT
>>>>>
>>>>>
>>>>>  --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "glorp-group" group.
>>>>> To post to this group, send email to glorp-group at googlegroups.com.
>>>>> To unsubscribe from this group, send email to
>>>>> glorp-group+unsubscribe at googlegroups.com<glorp-group%2Bunsubscribe at googlegroups.com>
>>>>> .
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/glorp-group?hl=en.
>>>>>
>>>>
>>>>  --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "glorp-group" group.
>>>> To post to this group, send email to glorp-group at googlegroups.com.
>>>> To unsubscribe from this group, send email to
>>>> glorp-group+unsubscribe at googlegroups.com<glorp-group%2Bunsubscribe at googlegroups.com>
>>>> .
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/glorp-group?hl=en.
>>>>
>>>
>>>
>>>
>>> --
>>> -JT
>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google Groups
>>> "glorp-group" group.
>>> To post to this group, send email to glorp-group at googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> glorp-group+unsubscribe at googlegroups.com<glorp-group%2Bunsubscribe at googlegroups.com>
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/glorp-group?hl=en.
>>>
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "glorp-group" group.
>> To post to this group, send email to glorp-group at googlegroups.com.
>> To unsubscribe from this group, send email to
>> glorp-group+unsubscribe at googlegroups.com<glorp-group%2Bunsubscribe at googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/glorp-group?hl=en.
>>
>
>
>
> --
> -JT
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "glorp-group" group.
> To post to this group, send email to glorp-group at googlegroups.com.
> To unsubscribe from this group, send email to
> glorp-group+unsubscribe at googlegroups.com<glorp-group%2Bunsubscribe at googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/glorp-group?hl=en.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeakdbx/attachments/20100327/4363b200/attachment.htm


More information about the SqueakDBX mailing list