Object Persistence & Thread Safety
class{
/**
* Constructor injection is guaranteed to be thread safe and locked by the injector. However, setter and property injections are not guaranteed to be thread safe unless you mark the component as thread safe. (See below)
*/
@log.inject( "logbox:logger:{this}" )
@dao.inject( "id:MyDAO" )
function init( required log, required dao ){
variables.log = arguments.log;
variables.dao = arguments.dao;
return this;
}
}component{
/**
* Constructor injection is guaranteed to be thread safe and locked by the injector. However, setter and property injections are not guaranteed to be thread safe unless you mark the component as thread safe. (See below)
*/
function init( required log, required dao ) log.inject="logbox:logger:{this}" dao.inject="id:MyDAO" {
variables.log = arguments.log;
variables.dao = arguments.dao;
return this;
}
}class{
@inject( "id:MyDAO" )
property name="dao";
@inject( "logbox:logger:{this}" )
property name="log";
function init(){
return this;
}
}component{
property name="dao" inject="id:MyDAO";
property name="log" inject="logbox:logger:{this}";
function init(){
return this;
}
}Transient Request Persistence
Configuration
Known Issues
Last updated
Was this helpful?