Rank: Advanced Member
Groups: Authorized User, Developers Joined: 5/30/2020(UTC) Posts: 125
Thanks: 14 times Was thanked: 3 time(s) in 3 post(s)
|
When using RegisterFor from a plugin we have a list of Lifestyle scopes we can provide, such as Transient, Singleton, PerThread, and PerWebRequest. I had to move some things to a custom folder in the web project. RegisterFor does not automatically work in the AbleCommerce web project, so we instead have to use the /App_Data/windsor.config file. - What lifestyle are items registered for if not specified with a lifestyle attribute?
- What value do we use for PerWebRequest lifestyle? Looking at the 4.0.0 documentation it doesn't have a value to specify for PerWebRequest.
- The documentation says that in order for PerWebRequest lifestyle to work that the PerWebRequestLifestyleModule must be set up in web.config (it is not in AC9, but AC9 doesn't appear to have anything set up as PerWebRequest by default either). Before I add this to my web.config I want to make sure it isn't being configured somewhere else.
|
|
|
|
Rank: Advanced Member
Groups: Authorized User, Developers Joined: 5/30/2020(UTC) Posts: 125
Thanks: 14 times Was thanked: 3 time(s) in 3 post(s)
|
I set a breakpoint in Global.asax and put the container in the debug watch list. It appears that if a lifestyle is not specified that it defaults to Singleton. All of the AbleCommerce controllers get registered as Transient, but all of the classes in CommerceBuilder that have a RegisterFor without a lifestyle end up as Singletons. I'm not sure if that was the intent of the developers?!?
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The AbleCommerce Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close