whats the use of having an application object if there is no session object?

-igor

On Wed, Mar 17, 2010 at 6:03 AM, Jonas <barney...@gmail.com> wrote:
> I just reviewed the code Igor for the fix Igor implemented [1], and I
> don't think
> it will be a drop-in replacement for the code in the wiki, since it only 
> exposes
> the application if there's an active HttpSession. The code from the wiki on 
> the
> other hand always exposes the Application.
> In the patch I proposed, I also always exposed the Application. Unfortunately,
> my patch didn't properly handle exceptions (I should have put it all
> into a try finally
> block), I guess that's why Igor didn't use it, but chose to do a
> different implementation.
> I'm not sure why the Application isn't always exposed - I don't think
> it should have
> any side effects, since the Application is already shared between
> multiple threads,
> but I'm not aware of all wicket internals. Maybe Igor can shed some
> light on this issue?
>
> cheers,
> Jonas
>
>
> [1] 
> <http://svn.apache.org/viewvc/wicket/branches/wicket-1.4.x/wicket/src/main/java/org/apache/wicket/protocol/http/servlet/WicketSessionFilter.java?revision=922335&view=markup>
>
> On Wed, Mar 17, 2010 at 1:37 PM, Erik van Oosten <e.vanoos...@grons.nl> wrote:
>> That sounds great. Could you update the wiki page with the specifics for
>> Wicket 1.4.8?
>>
>> Regards,
>>    Erik.
>>
>>
>> Op 17-03-10 08:20, Jonas schreef:
>>>
>>> Thanks, Erik, that code would do the trick, too. I've implemented
>>> a different workaround, though. In the next release of wicket (1.4.8),
>>> WicketSessionFilter will 'expose' both the session and the application,
>>> Igor
>>> already resolved my JIRA Issue [1]. BTW: Thanks to Igor for picking that
>>> up so quickly!
>>>
>>> cheers,
>>> Jonas
>>>
>>>
>>> [1] https://issues.apache.org/jira/browse/WICKET-2778
>>>
>>> On Tue, Mar 16, 2010 at 9:05 PM, Erik van Oosten<e.vanoos...@grons.nl>
>>>  wrote:
>>>
>>>>
>>>> Hi Jonas,
>>>>
>>>> Perhaps this is what you need:
>>>> http://cwiki.apache.org/WICKET/springbean-outside-wicket.html
>>>>
>>>> Regards,
>>>>   Erik.
>>>>
>>>>
>>>> Jonas wrote:
>>>>
>>>>>
>>>>> Hi all,
>>>>>
>>>>> we're using WicketSessionFilter in our product to access
>>>>> our custom WebSession, which works fine. Now we've tried
>>>>> to also access the org.apache.wicket.Application (e.g. using
>>>>> Session#getApplication or Application#get), which doesn't seem
>>>>> to work, because the application isn't bound to the ThreadLocal.
>>>>> After searching in nabble I found some old threads ([1], [2]) suggesting
>>>>> this should actually work fine, but that doesn't seem to be the case.
>>>>> Is there any special configuration trick I have to apply to make this
>>>>> work, or are those old posts just (no longer) true?
>>>>> If anybody could confirm this is actually a bug, I'd create an issue
>>>>> in JIRA to have this fixed.
>>>>>
>>>>> Regards,
>>>>> Jonas
>>>>>
>>>>> [1]
>>>>>
>>>>> http://old.nabble.com/Accessing-Wicket-Application-from-custom-servlet-ts24814177.html#a24815786
>>>>> [2] http://old.nabble.com/WicketFilter-td25205475.html#a25210469
>>>>>
>>>>>
>>
>> --
>> Erik van Oosten
>> http://www.day-to-day-stuff.blogspot.com/
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to