> Nothing leaps out at me as a likely cause of a dropped message.
>
-
The only reason I can think of: It could be a problem when the loading
of the JDBC driver is happening inside a thread. At least that would
explain why calling
(with-connection db
nil
)
before
Nothing leaps out at me as a likely cause of a dropped message.
OTOH, the loop/recur at the end is probably better changed to a doseq.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this gr
>
> You mention threading in the subject and you have a (binding
> [...] ...) form. Are you starting a thread, or communicating with
> one, or using pmap, future, an agent, or etc. inside the binding,
> and expecting the binding to affect the code that runs in the thread/
> map/future/agent?
On Sat, Sep 19, 2009 at 1:07 AM, Roger Gilliar wrote:
>
> Hi,
>
> > re you opening something, using it to return a lazy sequence, and
> > then closing it before consuming the sequence?
>
>
> No. I started with just opening the database connection in the handler
> function.
You mention threading
Not from my code.
Regards
Roger
Am 19.09.2009 um 12:11 schrieb Christophe Grand:
> is "db" dynamically rebound?
>
> On Sat, Sep 19, 2009 at 7:07 AM, Roger Gilliar
> wrote:
>
> Hi,
>
> > re you opening something, using it to return a lazy sequence, and
> > then closing it before consuming
is "db" dynamically rebound?
On Sat, Sep 19, 2009 at 7:07 AM, Roger Gilliar wrote:
>
> Hi,
>
> > re you opening something, using it to return a lazy sequence, and
> > then closing it before consuming the sequence?
>
>
> No. I started with just opening the database connection in the handler
> fun
Hi,
> re you opening something, using it to return a lazy sequence, and
> then closing it before consuming the sequence?
No. I started with just opening the database connection in the handler
function.
Regards
Roger
--~--~-~--~~~---~--~~
You received th
On Fri, Sep 18, 2009 at 1:32 PM, rogergl wrote:
> The problem is that the above code only works if I establish a
> connection outside the handle-client function. Otherwise the first
> reply to my client gets lost.
>
> Has anyone an explanation for this ?
Are you opening something, using it to r
The first part of my code looks like this
(defn handle-client [in out]
(binding [
*in* (reader in)
]
(with-connection db
(let [outstream (writer out)]
(loop []