I have a frustrating situation and would appreciate any help.
The call
(instance? A an-A-record)
is returning false when an-A-record is in fact an instance of A.
This is in a noir/compojure/ring server. But the problem *only* *occurs
*when run under tomcat, *not* when run under Jetty. I'm guessing
that I've missed declaring something properly, but I don't see what it is.
(I hope this is a suitable forum for this question.)
Here's the situation in more detail.
In ns1
(defrecord A ...)
(defrecord B ...)
(defn AorB? [x] (or (instance? A x) (instance? B x)))
(defn Afactory [] ...) ; makes an A
In ns2, which :require's ns 1 refering AorB? and Afactory and :imports A
and B properly from ns1.
(AorB? (Afactory)) ;=> true in jetty, false in tomcat
I'm using Clojure 1.4.0, compojure 1.1.3, noir 1.3.0-beta10, ....
I use lein run to start the jetty server (with a suitable -main),
and lein ring uberwar to create a warfile which runs under
Apache Tomcat 6.0.24 (with JVM 1.6.0_26-b03).
All the rest of the code appears to be behaving identically under either
platform.
I've been banging my head against the wall over this and would
appreciate any help or pointers. Thanks!
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en