[[Dashboard | << Back to Dashboard ]] {|align="right" | __TOC__ |} = ColdBox Application.cfc Bootstrapper = {{{Messagebox message="Covers up to version 3.5.0" type="info"}}} The ''Application.cfc'' is one of the most important files in your application as it is where you define all the implicit ColdFusion engine events, session, client scopes, ORM, etc. It is also how you tell ColdFusion to bootstrap the ColdBox Platform for your application. There are two ways to bootstrap your application: # Making your ''Application.cfc'' extend the core bootstrapper ''coldbox.system.Coldbox'' # Adapting your ''Application.cfc'' to use composition and bootstrap ColdBox The first two approaches are what we recommend you do to bootstrap your applications and most of the time you don't really have to worry about these files since they are either generated for you from our IDE tools or you can use the ones that ship with the platform's application templates. If you look in your download archive you should see the following:
/ApplicationTemplates
  /Advanced
    + Application.cfc
    + Application_noinheritance.cfc
  /Flex
  /Simple
Those application templates are all ready configured to just drop, customize as you see fit and work. Obviously the inheritance approach is the easiest to use but it has its limitations that you cannot use per-application mappings to map ColdBox. Therefore, you can use the no inheritance approach which has a little bit of more boiler plate code provided for you. Next, lets see how we can control some aspects of our application via the ColdBox directives. == Application.cfc Directives == {{{Include page="Template:BootstrapperDirectives"}}} == Application.cfc Methods == Apart from having some directives we also have several methods that we can interact with to control some other aspects of the bootstrapper. * ''setLockTimeout(seconds)'' : You can override the default locking of the templates * ''getLockTimeout()'' : You can get the default locking of the templates === Using Inheritance === If we are using inheritance then we can just simply call the methods directly as they are inherited in our ''Application.cfc'' setLockTimeout(30); === No Inheritance === If we are using the composition approach then we need to talk to the bootstrapper via the object that gets created: application.cbBootstrap.setLockTimeout(30);