Fork me on GitHub

hi guys... next problem with crux 🙂


when I jarsign the .jar containing dependency on crux, then jarsigner fails as it spots duplicate (actually triplicate) entry of project.clj in final jar... so I assume one coming from clojure, other from taonesso... Question - is project.clj needed/used during actual runtime?


or I might somehow get rid of it during .jar building


have you ever tried to jarsign the crux jar?

Ivan Fedorov12:10:35

Hi @olekss.janis! Welcome back 🙂 project.clj shouldn’t be required at runtime, so you can get omit it from a jar. We should omit it as well, good spot.


ok... btw, what evil would happen if you would aot your stuff? your previous fix fixed our problem, but still startup for first time is kinda slow... would aot fix it and wouldn't it break something necessary ? (this is not requirement, just curious)

Ivan Fedorov12:10:59

Not sure if aot would help. aot could lead into in class version conflicts between different crux modules, or if you or one your dependencies will use the same library as crux.


my solution to project.clj during signing is to have this section at the build.gradle of the module containing the crux dependency (and one being signed over) jar { exclude("project.clj") }

Ivan Fedorov13:10:23

You might be able to aot yourself with gradle plugin


yea, no sweat for that for now...


another question -> if I have jdbc connection, can I pass/inject it into crux to use, as we would like to have crux piggyback on our transaction


during writes


hi @olekss.janis - the current JDBC implementation uses, it uses this library to get a Datasource that is used for subsequent options. Your current options would be to provide your own crux.db.TxLog to override the JdbcTxLog that is used and delegate accordingly, or hook into next-jdbc somehow


Whats the advantage of piggybacking out of interest


coz there is our service which write stuff into DB, and we want to use crux for indexing... and the task is obvious, to have both of them written succesfully or both fail... question of record consistency

👍 1

Will ponder and reply!