Re: a question about using the delay macro

2011-08-23 Thread Sean Corfield
I was trying to construct a simple example of what I actually have in my apps that use pooling on top of java.jdbc. My actual code *does* work to create a singleton but you're right, I've contracted my code too far in trying to create a simple example of it... I'll have another attempt! Sean On A

Re: a question about using the delay macro

2011-08-23 Thread faenvie
perfect answer. thank you ! btw: my snippet is taken out of the docs for java.jdbc. On Aug 22, 12:04 pm, "Meikel Brandmeyer (kotarak)" wrote: > Hope, I'm not too far off. > > Sincerely > Meikel -- You received this message because you are subscribed to the Google Groups "Clojure" group. To po

Re: a question about using the delay macro

2011-08-22 Thread Luc Prefontaine
Or you could use Boing to create your data source and hide most of that wiring away from your code. I am doing a sales pitch here for my own stuff :))) https://github.com/lprefontaine/Boing/blob/master/examples/spring-1-to-boing.clj Luc P. On Mon, 22 Aug 2011 03:04:29 -0700 (PDT) "Meikel Brandm

Re: a question about using the delay macro

2011-08-22 Thread Meikel Brandmeyer (kotarak)
Hi, Am Montag, 22. August 2011 11:53:32 UTC+2 schrieb faenvie: > > yesterday i came across the following use of > the delay-macro: > > (defn pooled-data-source > [db-connection-settings] > ; this Fn creates and returns object of type PooledDataSource > ) > > (defn pooled-data-source-as-s

a question about using the delay macro

2011-08-22 Thread faenvie
hi clojure-community, yesterday i came across the following use of the delay-macro: (defn pooled-data-source [db-connection-settings] ; this Fn creates and returns object of type PooledDataSource ) (defn pooled-data-source-as-singleton [db-connection-settings] (let [datasource (delay (po