Shark work flow study the source code (b)

  Org.enhydra.shark.Shark 

  Shark started in the engine, it should be configured to do the operation is configured Shark.configure ( "shark.conf"), according to the following sequence; 

  1) the system configuration used only once, If you have already configured, will not be directly returned to the configuration, as follows: 

  If (isConfigured) ( 

  SharkEngineManager.getInstance (). GetCallbackUtilities (). Info ( 

  "Trying to configure shark instance that is already configured !!!"); 

  Return; 

  ) 

  2) If not for the absolute path to the configuration file, the system will automatically obtain: 

  If (! ConfigFile.isAbsolute ()) ( 

  ConfigFile = configFile.getAbsoluteFile (); 

  ) 

  3) then the access properties, configuration and isConfigured set to true: 

  Try ( 

  Fis = new FileInputStream (configFile); 

  Properties props = new Properties (); 

  Props.load (fis); 

  Fis.close (); 

  AdjustSharkProperties (props); 

  ) Catch (Exception ex) ( 

  Throw new Error ( "Something went wrong during reading of configuration from the file"); 

  ) 

  IsConfigured = true; 

  4) then SharkEngineManager configuration, which uses callback function, the manager of the factory manager and son to initialize and configure the future can be called directly: 

  Try ( 

  CallbackUtilities = (CallbackUtil) cl.loadClass (cbuClassName). NewInstance (); 

  CallbackUtilities.setProperties (properties); 

  ObjectFactory = (SharkObjectFactory) cl.loadClass (objectFactoryClassName). NewInstance (); 

  ToolAgentManager = (ToolAgentManager) cl.loadClass (tamClassName). NewInstance (); 

  XmlInterface = new XMLInterfaceForJDK13 (); 

  ) Catch (Throwable ex) ( 

  Throw new Error ( "Problems instantiating core managers"); 

  ) 

  5) Finally, the cache on the system configuration and LimitManager: 

  Shark.initCaches (); 

  Shark.reevaluateAssignments (); 

  Shark.initLimitManager (); 

  Hongbo781202, also known as HongSoft, professional programmers, research areas: 1) based on work flow BPM System 2) Based on the information security JAVA 

  Technology. JAVA welcome and we discussed various aspects related to technology and market issues hongbosoftware@163.com 

Bookmark it: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Google
  • DotNetKicks
  • DZone
  • Furl
  • Netvouz

Tags: ,

Releated Articles


0 Comments to “Shark work flow study the source code (b)”

No Comments. Send your comment.

Leave a Reply

You must be logged in to post a comment.