Code Monkey home page Code Monkey logo

Comments (5)

grtjn avatar grtjn commented on September 28, 2024

Forgot to add: if I deploy the modules to the Modules database, it runs fine with exact same settings... :-/

from corb2.

hansenmc avatar hansenmc commented on September 28, 2024

If you don’t want to have to deploy the modules that you are executing, then append
|ADHOC
to the module paths
https://github.com/marklogic-community/corb2#adhoc-modules

Or apply the INSTALL option
INSTALL=true
https://github.com/marklogic-community/corb2#INSTALL

from corb2.

grtjn avatar grtjn commented on September 28, 2024

Unfortunately, adhoc is not an option, since I am importing a library from the transform code, which cannot be found either if it is running with wrong modules database. Same applies to the install option I suspect.

from corb2.

grtjn avatar grtjn commented on September 28, 2024

I resorted to using adhoc in combination with a transform module that uses invokefunction to enforce the correct modules database. I would welcome bringing back this feature, it would increase Corb's flexibility.

from corb2.

hansenmc avatar hansenmc commented on September 28, 2024

I think the confusion/issue is that most people would assume that MODULES-DATABASE would indicate the name of the modules database in which to find the specified module, similar to how XCC-DBNAME works. However, XCC doesn't allow you to control which modules database is used. You use whichever modules DB is configured for the appserver you are executing against.

MODULES-DATABASE is used in conjunction with INSTALL=true to indicate which (modules) database you want to insert modules into.
https://github.com/marklogic-community/corb2/blob/master/src/main/java/com/marklogic/developer/corb/Manager.java#L693

However, that still only works if the MODULES-DATABASE specified is the modules database for the appserver executing against. I mean, you could insert into any database, but if expecting to run it after insert, then only really will work if you specify the modules DB bound to the appserver you are using.

I don't believe that the XCC API provides a way to obtain the name of the modules database, but we could eval() some code to obtain it, and then allow you to insert the module into the modules DB without having to specify the name of the modules database in MODULES-DATABASE...

from corb2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.