Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. Application.cfc
  2.  
  3. component extends=framework.one {
  4.  
  5. this.ormenabled = true;
  6. this.datasource = "store";
  7. this.ormSettings.dbCreate = "dropcreate";
  8. this.ormSettings.logsql = true;
  9. this.ormSettings.dialect = "Oracle10g";
  10. variables.framework.reloadApplicationOnEveryRequest = true;
  11. variables.framework.diEngine = "aop1";
  12. //variables.framework.diConfig = { interceptors = [ { beanName = "storeService", interceptorName = "StoreInterceptor", methods = "*" } ] };
  13. //variables.framework.diConfig.interceptors = [ { beanName = "storeService", interceptorName = "StoreInterceptor" } ];
  14. variables.framework.usingSubsystems = true;
  15. variables.framework.defaultSubsystem = "public";
  16. variables.framework.generateSES = true;
  17. this.sessionManagement = true;
  18. this.invokeImplicitAccessor = true;
  19.  
  20. public void function setupApplication(){
  21. getbeanfactory().intercept("store","StoreInterceptor","*");
  22.  
  23. if ( StructKeyExists(url, "reload")){
  24. ormReload();
  25. applicationstop();
  26. }
  27. }
  28. public void function setupRequest(){
  29. request.jslib = [];
  30. request.jsscript = [];
  31.  
  32.  
  33. }
  34. public void function setupSession(){
  35. if ( !StructKeyExists(session,"cart"))
  36. session.cart = variables.getbeanfactory().getBean('cartBean');
  37. }
  38. }
  39.  
  40.  
  41. models/interceptors/StoreInterceptor.cfc
  42.  
  43. component accessors="true"
  44. {
  45. property framework;
  46.  
  47. function before(target, methodname, args){
  48. getFramework().frameworkTrace("xxxxxxxxxxxx inside interceptor before xxxxxxxxxxxx", arguments);
  49. writedump(arguments);
  50. abort;
  51. }
  52.  
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement