• A few how to questions

    By wim stevens 1 decade ago

    Hello,

     

    I just started to use DOTS on Domino853 server (download from this project)

    I have some how to questions (I hope this is the correct forum to ask)

    1) Is it possible to send console commands to your tasklet.  For example I have a tasklet helloworld that runs under control of DOTS.  I would like to send console commands (entered by the administrator) like "tell helloworld process new".  If yes how to do this

    2) I have an existing application that I would like to run under DOTS.  The application uses log4J for logging.  Log4J allows me to enable/disable each logger separately.  In the DOTS documentation I find the logmessage method.  This is much less flexible than log4J.  Is there a way to use an existing logging framework for a dots enabled task (and see the output of the logging in log.nsf)

    3) my application is multithreaded.  Is a DOTS tasklet allowed to spawn new threads.  If yes how to access the Domino objects (session, database, etc)

     

    Thanks

    • Some thoughts...

      By Paul Fiore 1 decade ago
      1. You can send parameter arguments to your tasklet upon startup and you can programmatically pass commands into your tasklet via the remote controller using the remoteCommands element in the OSGi profile.  See the documentation for details. You can also create a custom OSGi console command that can signal running tasklets.  You would do this in the Activator of your plugin, implementing the CommandProvider interface with a method signature:

        public void _customMethod(CommandInterpreter ci)
        {
            // Your code here
        }

        You would then call it will "tell dots customMethod"
      2. If you're asking if there is a way to substitute the use of log4j within the default implementation of logMessage at this time, then the answer is no.
      3. You can spawn threads within your tasklet but it's up to you to manage the threads and resources being used.  Specifically if you are making multiple calls to sinitThread and stermThread.