Google Groups Home
Help | Sign in
[JIRA] Created: (MR-445) Component Resolution Occurs before Session is Acquired
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
JIRA João Bragança  
View profile
 More options May 8, 6:34 pm
From: João Bragança (JIRA) <jiranotificat...@castleproject.org>
Date: Thu, 8 May 2008 15:34:19 -0700 (GMT-07:00)
Local: Thurs, May 8 2008 6:34 pm
Subject: [castle][JIRA] Created: (MR-445) Component Resolution Occurs before Session is Acquired
Component Resolution Occurs before Session is Acquired
------------------------------------------------------

                 Key: MR-445
                 URL: http://support.castleproject.org//browse/MR-445
             Project: MonoRail
          Issue Type: Improvement
          Components: Core
    Affects Versions:  Release Candidate 3
            Reporter: João Bragança

In http://forum.castleproject.org/viewtopic.php?p=9850, herny says 'Probably due the cache implementation, the controller is now instanced before the session acquire step.'

I understand this is performance reasons. However I would like to implement a PerSessionLifestyleManager similar to the PerWebRequest.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://support.castleproject.org//secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "[JIRA] Commented: (MR-445) Component Resolution Occurs before Session is Acquired" by Andre Loker (JIRA)
Andre Loker (JIRA)  
View profile
 More options May 8, 7:22 pm
From: "Andre Loker (JIRA)" <jiranotificat...@castleproject.org>
Date: Thu, 8 May 2008 16:22:19 -0700 (GMT-07:00)
Local: Thurs, May 8 2008 7:22 pm
Subject: [castle][JIRA] Commented: (MR-445) Component Resolution Occurs before Session is Acquired
    [ http://support.castleproject.org//browse/MR-445?page=comments#action_... ]

Andre Loker commented on MR-445:
--------------------------------

I, too, had implemented a PerSessionLifestyleManager that worked in WebForms apps, but not in monorail, so +1 for this issue. As of now, I cannot inject components into my controllers that have session scope.

At the moment, my work-around is, instead of injecting the session scoped objects, to inject a transient or request scoped components that acts like a simple service provider and factory that caches the objects in session scope. However, it is by far not as nice as it could be compared to directly injected dependencies.

> Component Resolution Occurs before Session is Acquired
> ------------------------------------------------------

>                 Key: MR-445
>                 URL: http://support.castleproject.org//browse/MR-445
>             Project: MonoRail
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions:  Release Candidate 3
>            Reporter: João Bragança

> In http://forum.castleproject.org/viewtopic.php?p=9850, herny says 'Probably due the cache implementation, the controller is now instanced before the session acquire step.'
> I understand this is performance reasons. However I would like to implement a PerSessionLifestyleManager similar to the PerWebRequest.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://support.castleproject.org//secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
hamilton verissimo (JIRA)  
View profile
 More options May 24, 7:33 pm
From: "hamilton verissimo (JIRA)" <jiranotificat...@castleproject.org>
Date: Sat, 24 May 2008 16:33:40 -0700 (GMT-07:00)
Local: Sat, May 24 2008 7:33 pm
Subject: [castle][JIRA] Commented: (MR-445) Component Resolution Occurs before Session is Acquired
    [ http://support.castleproject.org//browse/MR-445?page=comments#action_... ]

hamilton verissimo commented on MR-445:
---------------------------------------

I guess you're referring to the fact that the controller is created by the MRHttpHandlerFactory and as a consequence all its dependencies are resolved before a session is made available. Unfortunately that's unlikely to change. That factory needs to return different handlers based on request information.

What you could do is to proxy the per session components, and resolve them (from the session) lazily.

> Component Resolution Occurs before Session is Acquired
> ------------------------------------------------------

>                 Key: MR-445
>                 URL: http://support.castleproject.org//browse/MR-445
>             Project: MonoRail
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions:  Release Candidate 3
>            Reporter: João Bragança

> In http://forum.castleproject.org/viewtopic.php?p=9850, herny says 'Probably due the cache implementation, the controller is now instanced before the session acquire step.'
> I understand this is performance reasons. However I would like to implement a PerSessionLifestyleManager similar to the PerWebRequest.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://support.castleproject.org//secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "[JIRA] Resolved: (MR-445) Component Resolution Occurs before Session is Acquired" by hamilton verissimo (JIRA)
hamilton verissimo (JIRA)  
View profile
 More options May 24, 7:35 pm
From: "hamilton verissimo (JIRA)" <jiranotificat...@castleproject.org>
Date: Sat, 24 May 2008 16:35:40 -0700 (GMT-07:00)
Local: Sat, May 24 2008 7:35 pm
Subject: [castle][JIRA] Resolved: (MR-445) Component Resolution Occurs before Session is Acquired
     [ http://support.castleproject.org//browse/MR-445?page=all ]

hamilton verissimo resolved MR-445.
-----------------------------------

      Assignee: hamilton verissimo
    Resolution: Won't Fix

This is a consequence of the MR design, and it's unlikely to change

> Component Resolution Occurs before Session is Acquired
> ------------------------------------------------------

>                 Key: MR-445
>                 URL: http://support.castleproject.org//browse/MR-445
>             Project: MonoRail
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions:  Release Candidate 3
>            Reporter: João Bragança
>         Assigned To: hamilton verissimo

> In http://forum.castleproject.org/viewtopic.php?p=9850, herny says 'Probably due the cache implementation, the controller is now instanced before the session acquire step.'
> I understand this is performance reasons. However I would like to implement a PerSessionLifestyleManager similar to the PerWebRequest.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://support.castleproject.org//secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google