Changeset 2564


Ignore:
Timestamp:
Aug 22, 2006, 1:08:15 PM (16 years ago)
Author:
Nicklas Nordborg
Message:

Added Application.start(boolean) method that allows an application to enable/disable the
internal job controller. This is needed by the test programs since the job controller may
interfere with the tests.

Location:
trunk/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/clients/migrate/net/sf/basedb/clients/migrate/Migrater.java

    r2304 r2564  
    8080    try
    8181    {
    82       Application.start();
     82      Application.start(false);
    8383      print("START MIGRATION");
    8484      RoleTransfer roleT = new RoleTransfer();
  • trunk/src/core/net/sf/basedb/core/Application.java

    r2304 r2564  
    269269    throws BaseException
    270270  {
    271     start(false);
     271    start(false, null);
     272  }
     273 
     274  /**
     275    Starts the BASE application. This method will read settings
     276    from the configurations files except if the internal job queue
     277    should be enabled or not.
     278    @param useInternalJobQueue If the internal job queue should be
     279      enabled or not
     280    @throws BaseException If BASE cannot be started
     281    @see #start()
     282    @see #stop()
     283    @see #isRunning()
     284  */
     285  public static synchronized void start(boolean useInternalJobQueue)
     286  {
     287    start(false, useInternalJobQueue);
    272288  }
    273289
     
    279295    @see #start()
    280296  */
    281   static synchronized void start(boolean installation)
     297  static synchronized void start(boolean installation, Boolean useInternalJobQueue)
    282298    throws BaseException
    283299  {
     
    346362      getCoreTimer().schedule(new SessionControlCacheCleaner(), milliSeconds, milliSeconds);
    347363     
    348       if (Config.getBoolean("jobqueue.internal.enabled"))
     364      if (useInternalJobQueue == null) useInternalJobQueue = Config.getBoolean("jobqueue.internal.enabled");
     365      if (useInternalJobQueue)
    349366      {
    350367        long checkInterval = 1000 * Config.getInt("jobqueue.internal.checkinterval", 30);
     
    723740 
    724741  /**
    725     Find the first digits in a stirng and return those as the build number.
     742    Find the first digits in a string and return those as the build number.
    726743  */
    727744  private static int parseBuildNumber(String buildNumber)
  • trunk/src/core/net/sf/basedb/core/Install.java

    r2517 r2564  
    114114    {
    115115      if (timer != null) Application.getCoreTimer().schedule(timer, 1000, 1000);
    116       Application.start(true);
     116      Application.start(true, false);
    117117      HibernateUtil.createStaticTables(update);
    118118      message = "Database built successfully.";
     
    155155    try
    156156    {
    157       Application.start(false);
     157      Application.start(false, false);
    158158      session = HibernateUtil.newSession();
    159159
  • trunk/src/core/net/sf/basedb/core/Update.java

    r2515 r2564  
    191191    try
    192192    {
    193       Application.start(false);
     193      Application.start(false, false);
    194194
    195195      // Test root user account
     
    574574      try
    575575      {
    576         Application.start(false);
     576        Application.start(false, false);
    577577 
    578578        // Test root user account
  • trunk/src/install/net/sf/basedb/install/InitDB.java

    r2495 r2564  
    7575      else if ("info".equals(cmd))
    7676      {
    77         Application.start();
     77        Application.start(false);
    7878        HibernateUtil.dbIndexes(true, false, false, false);
    7979        Application.stop();
     
    8282      {
    8383        boolean verbose = args.length >= 2 ? args[1].equals("-v") : false;
    84         Application.start();
     84        Application.start(false);
    8585        HibernateUtil.dbIndexes(verbose, false, false, true);
    8686        Application.stop();
     
    8989      {
    9090        boolean verbose = args.length >= 2 ? args[1].equals("-v") : false;
    91         Application.start();
     91        Application.start(false);
    9292        HibernateUtil.dbIndexes(verbose, false, true, false);
    9393        Application.stop();
  • trunk/src/install/net/sf/basedb/install/Webclient.java

    r2398 r2564  
    9090    throws BaseException
    9191  {
    92     Application.start();
     92    Application.start(false);
    9393    SessionControl sc = Application.newSessionControl(null, null, null);
    9494    sc.login(login, password, "Installing web client", false);
  • trunk/src/test/TestUtil.java

    r2314 r2564  
    141141    try
    142142    {
    143       Application.start();
     143      Application.start(false);
    144144      sc = Application.newSessionControl(client, getLocalIp(), null);
    145145      login();
Note: See TracChangeset for help on using the changeset viewer.