Menu

Babeldoc won't shut down

Help
Anonymous
2004-04-15
2004-05-17
  • Anonymous

    Anonymous - 2004-04-15

    Hi, I have a servlet that calls out to a singleton that does scanner.start and scanner.stop,

    On Tomcat shutdown I saw that the scanner.stop is getting called but babeldoc won't shut down, thuis when I do a ps -ef | grep tomcat, my OS still shows a running tomcat, any clues to the cause ?

    Initially my suspicion lies with the SQLEnrich stage where I have a pooled database connection, but I assume that babeldoc will close the connections during the stop call, is that right ?

    Any clues on where to start looking at this is appreciated.

     
    • Anonymous

      Anonymous - 2004-04-16

      OK, I haven't made a progress yet on the above problem but here's what I notice. Doing
      a "new Scanner" actually will result in a start() method call. In my opinion this can be bad. The object might be in an incomplete state etc, but this solves my earlier problem where there seems to be 2 processes running when you do a "new scanner()" followed by scanner.start(). By the way, this is exactly what you do in your ScannerMBean, so this might be something you want to fix.

       
    • Anonymous

      Anonymous - 2004-04-16

      By the way, I actually went into the source code and yes, the start method is called from the constructor.

       
    • Anonymous

      Anonymous - 2004-04-19

      Ok, the above turns out to be the source of problem. I forgot that the JVM will not shut down if there are still some thread running

       
    • Anonymous

      Anonymous - 2004-05-10

      It also seems to me that you can't use any other scanner configuration besides the default one as a consequence of calling start from new Scanner()

       
    • Dejan Krsmanovic

      IMO, Scanner should be used only as command line tool. Most of logic has been moved out of this class to ScannerFactory and ScannerWorkerScheduler to other classes so that Scanner just calls others.

      And yes, you are right about configuration. Currently it is olny read from command line as argument. But you can create ScannerFactory for another configuration so it is easy to use non-default configuration. However, if you have some ideas how to refactor this code to make it better please let me know. I have used scanners as command line tool only so I have never worried much about other scenarios :)

       
    • Anonymous

      Anonymous - 2004-05-17

      Thanks for your reply Dejan. I was not aware of the ScannerFactory that you mentioned, thanks for highlighting it. Anyway, I am currently not using babeldoc as a command line tool, but rather as a deployed component ( started through a servlet ).
      In other words I am replicating the ScannerMBean, but in a servlet rather than from an MBean.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.