You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Adrian Crum (JIRA)" <ji...@apache.org> on 2007/07/23 19:36:31 UTC

[jira] Created: (OFBIZ-1170) FreeMarkerWorker class has a bug in its caching logic

FreeMarkerWorker class has a bug in its caching logic
-----------------------------------------------------

                 Key: OFBIZ-1170
                 URL: https://issues.apache.org/jira/browse/OFBIZ-1170
             Project: OFBiz
          Issue Type: Bug
          Components: framework
            Reporter: Adrian Crum
            Priority: Minor


The FreeMarkerWorker class creates an instance of the Template class, initializes it with the current user's locale, then stores it in a cache. Other users will see the template rendered in the first user's locale, regardless of their locale setting.

This can be demonstrated on the Hot Wax demo site in the WorkEffort calendar. Some elements in the screen are rendered in another locale, regardless of your current locale setting.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1170) FreeMarkerWorker class has a bug in its caching logic

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12516234 ] 

Jacques Le Roux commented on OFBIZ-1170:
----------------------------------------

I mean NewFreeMarkerWorker.patch (19 kb)

> FreeMarkerWorker class has a bug in its caching logic
> -----------------------------------------------------
>
>                 Key: OFBIZ-1170
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1170
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, NewFreeMarkerWorker.patch, NewFreeMarkerWorker.patch
>
>
> The FreeMarkerWorker class creates an instance of the Template class, initializes it with the current user's locale, then stores it in a cache. Other users will see the template rendered in the first user's locale, regardless of their locale setting.
> This can be demonstrated on the Hot Wax demo site in the WorkEffort calendar. Some elements in the screen are rendered in another locale, regardless of your current locale setting.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (OFBIZ-1170) FreeMarkerWorker class has a bug in its caching logic

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux reassigned OFBIZ-1170:
--------------------------------------

    Assignee: Jacques Le Roux

> FreeMarkerWorker class has a bug in its caching logic
> -----------------------------------------------------
>
>                 Key: OFBIZ-1170
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1170
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Adrian Crum
>            Assignee: Jacques Le Roux
>            Priority: Minor
>         Attachments: FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, NewFreeMarkerWorker.patch, NewFreeMarkerWorker.patch, NewFreeMarkerWorker.patch
>
>
> The FreeMarkerWorker class creates an instance of the Template class, initializes it with the current user's locale, then stores it in a cache. Other users will see the template rendered in the first user's locale, regardless of their locale setting.
> This can be demonstrated on the Hot Wax demo site in the WorkEffort calendar. Some elements in the screen are rendered in another locale, regardless of your current locale setting.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1170) FreeMarkerWorker class has a bug in its caching logic

Posted by "Adrian Crum (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514988 ] 

Adrian Crum commented on OFBIZ-1170:
------------------------------------

David,

Thank you very much for your feedback! I debated at length doing this in two steps, but it's easier for me to test and debug less cluttered code, plus I probably won't have time in the future to do this in two steps.

For those who are interested in evaluating this, the only real concern I have with it is rendering templates that are a part of the content management system. Other than fixing the caching bug, that is the only place where I changed the program logic.

I'm going to contact the Freemarker community about making the Template class cloneable. I believe syncronizing a clone call will be faster than the syncronizing method used in this patch. If the Template class was cloneable, then we could keep a "master copy" of the Template instance in the cache, clone it,  and then apply the user's settings to the clone.


> FreeMarkerWorker class has a bug in its caching logic
> -----------------------------------------------------
>
>                 Key: OFBIZ-1170
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1170
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch
>
>
> The FreeMarkerWorker class creates an instance of the Template class, initializes it with the current user's locale, then stores it in a cache. Other users will see the template rendered in the first user's locale, regardless of their locale setting.
> This can be demonstrated on the Hot Wax demo site in the WorkEffort calendar. Some elements in the screen are rendered in another locale, regardless of your current locale setting.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1170) FreeMarkerWorker class has a bug in its caching logic

Posted by "Adrian Crum (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Crum updated OFBIZ-1170:
-------------------------------

    Attachment: NewFreeMarkerWorker.patch

Jacques,

Thank you very much for taking the time to review these patches!

Attached patch fixes the error.


> FreeMarkerWorker class has a bug in its caching logic
> -----------------------------------------------------
>
>                 Key: OFBIZ-1170
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1170
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, NewFreeMarkerWorker.patch, NewFreeMarkerWorker.patch, NewFreeMarkerWorker.patch
>
>
> The FreeMarkerWorker class creates an instance of the Template class, initializes it with the current user's locale, then stores it in a cache. Other users will see the template rendered in the first user's locale, regardless of their locale setting.
> This can be demonstrated on the Hot Wax demo site in the WorkEffort calendar. Some elements in the screen are rendered in another locale, regardless of your current locale setting.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (OFBIZ-1170) FreeMarkerWorker class has a bug in its caching logic

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux closed OFBIZ-1170.
----------------------------------

       Resolution: Fixed
    Fix Version/s: Release Branch 4.0
                   SVN trunk

I applied the NewFreeMarkerWorker.patch.  I tested it one week without any problems. 

It's commited as CTR in trunk 564530 and release4.0 564531


> FreeMarkerWorker class has a bug in its caching logic
> -----------------------------------------------------
>
>                 Key: OFBIZ-1170
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1170
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Adrian Crum
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: SVN trunk, Release Branch 4.0
>
>         Attachments: FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, NewFreeMarkerWorker.patch, NewFreeMarkerWorker.patch, NewFreeMarkerWorker.patch
>
>
> The FreeMarkerWorker class creates an instance of the Template class, initializes it with the current user's locale, then stores it in a cache. Other users will see the template rendered in the first user's locale, regardless of their locale setting.
> This can be demonstrated on the Hot Wax demo site in the WorkEffort calendar. Some elements in the screen are rendered in another locale, regardless of your current locale setting.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1170) FreeMarkerWorker class has a bug in its caching logic

Posted by "David E. Jones (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514930 ] 

David E. Jones commented on OFBIZ-1170:
---------------------------------------

My feedback on this: in addition to fixing the bug mentioned there is quite a bit of refactoring done here. That's totally fine, but it does make it hard to review.

The best next step forward because of this is for a number of people to apply the patch and run it locally for a little while and hopefully also find a few scenarios within the scope of their concern to exercise this.

To all interested: please help and review this and comment back here.

> FreeMarkerWorker class has a bug in its caching logic
> -----------------------------------------------------
>
>                 Key: OFBIZ-1170
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1170
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch
>
>
> The FreeMarkerWorker class creates an instance of the Template class, initializes it with the current user's locale, then stores it in a cache. Other users will see the template rendered in the first user's locale, regardless of their locale setting.
> This can be demonstrated on the Hot Wax demo site in the WorkEffort calendar. Some elements in the screen are rendered in another locale, regardless of your current locale setting.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1170) FreeMarkerWorker class has a bug in its caching logic

Posted by "Adrian Crum (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Crum updated OFBIZ-1170:
-------------------------------

    Attachment: NewFreeMarkerWorker.patch

NewFreeMarkerWorker.patch file is the refactored version that has the <#include> directive fixed.

In addition, you can now do things like <#include "DataResource:10240" > and <#include "component://common/webcommon/includes/test.ftl">.

So, take your pick - simple bug fix patch or new and improved patch.


> FreeMarkerWorker class has a bug in its caching logic
> -----------------------------------------------------
>
>                 Key: OFBIZ-1170
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1170
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, NewFreeMarkerWorker.patch
>
>
> The FreeMarkerWorker class creates an instance of the Template class, initializes it with the current user's locale, then stores it in a cache. Other users will see the template rendered in the first user's locale, regardless of their locale setting.
> This can be demonstrated on the Hot Wax demo site in the WorkEffort calendar. Some elements in the screen are rendered in another locale, regardless of your current locale setting.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1170) FreeMarkerWorker class has a bug in its caching logic

Posted by "Adrian Crum (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Crum updated OFBIZ-1170:
-------------------------------

    Affects Version/s: Release Branch 4.0
                       SVN trunk

> FreeMarkerWorker class has a bug in its caching logic
> -----------------------------------------------------
>
>                 Key: OFBIZ-1170
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1170
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: FreeMarkerWorker.patch
>
>
> The FreeMarkerWorker class creates an instance of the Template class, initializes it with the current user's locale, then stores it in a cache. Other users will see the template rendered in the first user's locale, regardless of their locale setting.
> This can be demonstrated on the Hot Wax demo site in the WorkEffort calendar. Some elements in the screen are rendered in another locale, regardless of your current locale setting.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1170) FreeMarkerWorker class has a bug in its caching logic

Posted by "Adrian Crum (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Crum updated OFBIZ-1170:
-------------------------------

    Attachment: FreeMarkerWorker.patch

Ack. One more fix.


> FreeMarkerWorker class has a bug in its caching logic
> -----------------------------------------------------
>
>                 Key: OFBIZ-1170
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1170
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch
>
>
> The FreeMarkerWorker class creates an instance of the Template class, initializes it with the current user's locale, then stores it in a cache. Other users will see the template rendered in the first user's locale, regardless of their locale setting.
> This can be demonstrated on the Hot Wax demo site in the WorkEffort calendar. Some elements in the screen are rendered in another locale, regardless of your current locale setting.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1170) FreeMarkerWorker class has a bug in its caching logic

Posted by "Adrian Crum (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Crum updated OFBIZ-1170:
-------------------------------

    Attachment: FreeMarkerWorker.patch

Attached patch fixes the bug. I changed the behavior to apply the user's settings just prior to the call to Template.process(). The settings changes and process call are then syncronized to the Template instance.

In addition, I did some code cleanup and added JavaDoc comments. I also eliminated two unnecessary methods that were used by only one other java file.



> FreeMarkerWorker class has a bug in its caching logic
> -----------------------------------------------------
>
>                 Key: OFBIZ-1170
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1170
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: FreeMarkerWorker.patch
>
>
> The FreeMarkerWorker class creates an instance of the Template class, initializes it with the current user's locale, then stores it in a cache. Other users will see the template rendered in the first user's locale, regardless of their locale setting.
> This can be demonstrated on the Hot Wax demo site in the WorkEffort calendar. Some elements in the screen are rendered in another locale, regardless of your current locale setting.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: No major bugs in release-4.0 branch, great work!

Posted by Rodrigo Souza <ac...@gmail.com>.
Congratulations, we go a task force to tests.


2007/8/7, BJ Freeman <bj...@free-man.net>:
>
> I have incorporated 4.0 in to a real world, but not all the activities
> are being tested since we don't use the Ecommerce as it was released.
> I think it is important that anyone reporting state what modules they
> are using and if they have modified them.
>
> user testing will start soon
>
> David E Jones sent the following on 8/7/2007 4:27 AM:
> >
> > We are past the 3 month time frame that was initially hoped for as
> > sufficient to stabilize a release branch. We could do a release any
> > time, but until some thorough testing and review is done I don't know if
> > that really makes sense. We still want to get people involved in the
> > branch as opposed to just downloading and using the binary release.
> >
> > To take the next step I agree with Scott, we need to hear from those who
> > are using the release branch in any way, preferably as a basis for real
> > world solutions.
> >
> > So, here is a request to the community: if you are using the release4.0
> > branch, please write to us and share your experiences and thoughts on
> > the stability of the branch.
> >
> > If you aren't comfortable sending this to the public mailing lists, feel
> > free to send it to private@ofbiz.apache.org and that will only go to the
> > Project Management Committee.
> >
> > I think at this point what we do with this is pretty simple. If we hear
> > from people with generally positive feedback we'll do a binary release
> > and hopefully attract more users to it by doing so. If not, we'll wait a
> > bit longer until more of us have a desire to invest in it.
> >
> > Thanks!
> > -David
> >
> >
> > Scott Gray wrote:
> >> Hi Jacques
> >>
> >> That's not entirely true, while I did commit a lot of fixes I'm not
> >> actually
> >> making heavy use of the release branch.  It would be good to hear from
> >> people who are making use of the branch.
> >>
> >> Regards
> >> Scott
> >>
> >> On 07/08/07, Jacques Le Roux <ja...@les7arts.com> wrote:
> >>> I would follow Scott opinion as I believe he is the most aware of the
> >>> release status.
> >>>
> >>> Jacques
> >>>
> >>> De : "Scott Gray" <le...@gmail.com>
> >>>> I wouldn't have any objections.
> >>>>
> >>>> Regards
> >>>> Scott
> >>>>
> >>>> On 07/08/07, Shi Yusen <sh...@langhua.cn> wrote:
> >>>>> Could it be released now?
> >>>>>
> >>>>> Shi Yusen/Beijing Langhua Ltd.
> >>>>>
> >>>>>
> >>>>>
> >>
> >
> >
> >
>

Re: No major bugs in release-4.0 branch, great work!

Posted by BJ Freeman <bj...@free-man.net>.
I have incorporated 4.0 in to a real world, but not all the activities
are being tested since we don't use the Ecommerce as it was released.
I think it is important that anyone reporting state what modules they
are using and if they have modified them.

user testing will start soon

David E Jones sent the following on 8/7/2007 4:27 AM:
> 
> We are past the 3 month time frame that was initially hoped for as
> sufficient to stabilize a release branch. We could do a release any
> time, but until some thorough testing and review is done I don't know if
> that really makes sense. We still want to get people involved in the
> branch as opposed to just downloading and using the binary release.
> 
> To take the next step I agree with Scott, we need to hear from those who
> are using the release branch in any way, preferably as a basis for real
> world solutions.
> 
> So, here is a request to the community: if you are using the release4.0
> branch, please write to us and share your experiences and thoughts on
> the stability of the branch.
> 
> If you aren't comfortable sending this to the public mailing lists, feel
> free to send it to private@ofbiz.apache.org and that will only go to the
> Project Management Committee.
> 
> I think at this point what we do with this is pretty simple. If we hear
> from people with generally positive feedback we'll do a binary release
> and hopefully attract more users to it by doing so. If not, we'll wait a
> bit longer until more of us have a desire to invest in it.
> 
> Thanks!
> -David
> 
> 
> Scott Gray wrote:
>> Hi Jacques
>>
>> That's not entirely true, while I did commit a lot of fixes I'm not
>> actually
>> making heavy use of the release branch.  It would be good to hear from
>> people who are making use of the branch.
>>
>> Regards
>> Scott
>>
>> On 07/08/07, Jacques Le Roux <ja...@les7arts.com> wrote:
>>> I would follow Scott opinion as I believe he is the most aware of the
>>> release status.
>>>
>>> Jacques
>>>
>>> De : "Scott Gray" <le...@gmail.com>
>>>> I wouldn't have any objections.
>>>>
>>>> Regards
>>>> Scott
>>>>
>>>> On 07/08/07, Shi Yusen <sh...@langhua.cn> wrote:
>>>>> Could it be released now?
>>>>>
>>>>> Shi Yusen/Beijing Langhua Ltd.
>>>>>
>>>>>
>>>>>
>>
> 
> 
> 

Re: No major bugs in release-4.0 branch, great work!

Posted by David E Jones <jo...@hotwaxmedia.com>.
We are past the 3 month time frame that was initially hoped for as sufficient to stabilize a release branch. We could do a release any time, but until some thorough testing and review is done I don't know if that really makes sense. We still want to get people involved in the branch as opposed to just downloading and using the binary release.

To take the next step I agree with Scott, we need to hear from those who are using the release branch in any way, preferably as a basis for real world solutions.

So, here is a request to the community: if you are using the release4.0 branch, please write to us and share your experiences and thoughts on the stability of the branch.

If you aren't comfortable sending this to the public mailing lists, feel free to send it to private@ofbiz.apache.org and that will only go to the Project Management Committee.

I think at this point what we do with this is pretty simple. If we hear from people with generally positive feedback we'll do a binary release and hopefully attract more users to it by doing so. If not, we'll wait a bit longer until more of us have a desire to invest in it.

Thanks!
-David


Scott Gray wrote:
> Hi Jacques
> 
> That's not entirely true, while I did commit a lot of fixes I'm not actually
> making heavy use of the release branch.  It would be good to hear from
> people who are making use of the branch.
> 
> Regards
> Scott
> 
> On 07/08/07, Jacques Le Roux <ja...@les7arts.com> wrote:
>> I would follow Scott opinion as I believe he is the most aware of the
>> release status.
>>
>> Jacques
>>
>> De : "Scott Gray" <le...@gmail.com>
>>> I wouldn't have any objections.
>>>
>>> Regards
>>> Scott
>>>
>>> On 07/08/07, Shi Yusen <sh...@langhua.cn> wrote:
>>>> Could it be released now?
>>>>
>>>> Shi Yusen/Beijing Langhua Ltd.
>>>>
>>>>
>>>>
> 

Re: No major bugs in release-4.0 branch, great work!

Posted by Scott Gray <le...@gmail.com>.
Hi Jacques

That's not entirely true, while I did commit a lot of fixes I'm not actually
making heavy use of the release branch.  It would be good to hear from
people who are making use of the branch.

Regards
Scott

On 07/08/07, Jacques Le Roux <ja...@les7arts.com> wrote:
>
> I would follow Scott opinion as I believe he is the most aware of the
> release status.
>
> Jacques
>
> De : "Scott Gray" <le...@gmail.com>
> > I wouldn't have any objections.
> >
> > Regards
> > Scott
> >
> > On 07/08/07, Shi Yusen <sh...@langhua.cn> wrote:
> > >
> > > Could it be released now?
> > >
> > > Shi Yusen/Beijing Langhua Ltd.
> > >
> > >
> > >
> >
>

Re: No major bugs in release-4.0 branch, great work!

Posted by Jacques Le Roux <ja...@les7arts.com>.
I would follow Scott opinion as I believe he is the most aware of the release status.

Jacques

De : "Scott Gray" <le...@gmail.com>
> I wouldn't have any objections.
> 
> Regards
> Scott
> 
> On 07/08/07, Shi Yusen <sh...@langhua.cn> wrote:
> >
> > Could it be released now?
> >
> > Shi Yusen/Beijing Langhua Ltd.
> >
> >
> >
> 

Re: No major bugs in release-4.0 branch, great work!

Posted by Scott Gray <le...@gmail.com>.
I wouldn't have any objections.

Regards
Scott

On 07/08/07, Shi Yusen <sh...@langhua.cn> wrote:
>
> Could it be released now?
>
> Shi Yusen/Beijing Langhua Ltd.
>
>
>

No major bugs in release-4.0 branch, great work!

Posted by Shi Yusen <sh...@langhua.cn>.
Could it be released now?

Shi Yusen/Beijing Langhua Ltd.



[jira] Commented: (OFBIZ-1170) FreeMarkerWorker class has a bug in its caching logic

Posted by "Adrian Crum (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517956 ] 

Adrian Crum commented on OFBIZ-1170:
------------------------------------

Jacques,

It would be preferable to commit the NewFreeMarkerWorker.patch because it addresses a common complaint about Freemarker templates in OFBiz - the Freemarker <#include> directive doesn't always work.

In addition, the old code created a Configuration instance for every Template instance, and then put them in the Template cache. The new code shares one Configuration instance between all template instances - reducing the amount of memory used in the template cache.


> FreeMarkerWorker class has a bug in its caching logic
> -----------------------------------------------------
>
>                 Key: OFBIZ-1170
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1170
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Adrian Crum
>            Assignee: Jacques Le Roux
>            Priority: Minor
>         Attachments: FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, NewFreeMarkerWorker.patch, NewFreeMarkerWorker.patch, NewFreeMarkerWorker.patch
>
>
> The FreeMarkerWorker class creates an instance of the Template class, initializes it with the current user's locale, then stores it in a cache. Other users will see the template rendered in the first user's locale, regardless of their locale setting.
> This can be demonstrated on the Hot Wax demo site in the WorkEffort calendar. Some elements in the screen are rendered in another locale, regardless of your current locale setting.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1170) FreeMarkerWorker class has a bug in its caching logic

Posted by "Adrian Crum (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Crum updated OFBIZ-1170:
-------------------------------

    Attachment: FreeMarkerWorker.patch

Oops, forgot to comment out TimeZone support after testing.


> FreeMarkerWorker class has a bug in its caching logic
> -----------------------------------------------------
>
>                 Key: OFBIZ-1170
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1170
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch
>
>
> The FreeMarkerWorker class creates an instance of the Template class, initializes it with the current user's locale, then stores it in a cache. Other users will see the template rendered in the first user's locale, regardless of their locale setting.
> This can be demonstrated on the Hot Wax demo site in the WorkEffort calendar. Some elements in the screen are rendered in another locale, regardless of your current locale setting.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1170) FreeMarkerWorker class has a bug in its caching logic

Posted by "Adrian Crum (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Crum updated OFBIZ-1170:
-------------------------------

    Attachment: FreeMarkerWorker.patch

Oops, left out an if statement. Improved patch.


> FreeMarkerWorker class has a bug in its caching logic
> -----------------------------------------------------
>
>                 Key: OFBIZ-1170
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1170
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: FreeMarkerWorker.patch, FreeMarkerWorker.patch
>
>
> The FreeMarkerWorker class creates an instance of the Template class, initializes it with the current user's locale, then stores it in a cache. Other users will see the template rendered in the first user's locale, regardless of their locale setting.
> This can be demonstrated on the Hot Wax demo site in the WorkEffort calendar. Some elements in the screen are rendered in another locale, regardless of your current locale setting.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1170) FreeMarkerWorker class has a bug in its caching logic

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12516235 ] 

Jacques Le Roux commented on OFBIZ-1170:
----------------------------------------

No problems (at least not this one) with the correcting only patch

> FreeMarkerWorker class has a bug in its caching logic
> -----------------------------------------------------
>
>                 Key: OFBIZ-1170
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1170
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, NewFreeMarkerWorker.patch, NewFreeMarkerWorker.patch
>
>
> The FreeMarkerWorker class creates an instance of the Template class, initializes it with the current user's locale, then stores it in a cache. Other users will see the template rendered in the first user's locale, regardless of their locale setting.
> This can be demonstrated on the Hot Wax demo site in the WorkEffort calendar. Some elements in the screen are rendered in another locale, regardless of your current locale setting.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1170) FreeMarkerWorker class has a bug in its caching logic

Posted by "Adrian Crum (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Crum updated OFBIZ-1170:
-------------------------------

    Attachment: FreeMarkerWorker.patch

The refactoring broke the Freemarker <#include> directive. Attached patch simply fixes the cache bug - no refactoring.


> FreeMarkerWorker class has a bug in its caching logic
> -----------------------------------------------------
>
>                 Key: OFBIZ-1170
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1170
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch
>
>
> The FreeMarkerWorker class creates an instance of the Template class, initializes it with the current user's locale, then stores it in a cache. Other users will see the template rendered in the first user's locale, regardless of their locale setting.
> This can be demonstrated on the Hot Wax demo site in the WorkEffort calendar. Some elements in the screen are rendered in another locale, regardless of your current locale setting.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1170) FreeMarkerWorker class has a bug in its caching logic

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12516233 ] 

Jacques Le Roux commented on OFBIZ-1170:
----------------------------------------

I got a problem with this patch in eCommerce side :

2007-07-29 19:52:47,593 (http-0.0.0.0-28080-Processor4) [ ProductStoreWorker.java:484:INFO ] getSurvey for product null
2007-07-29 19:52:51,296 (http-0.0.0.0-28080-Processor4) [ Log4JLoggerFactory.java:96 :ERROR] 
Method public java.io.Writer org.ofbiz.product.store.ProductStoreSurveyWrapper.render() throws org.ofbiz.content.survey.SurveyWrapper$SurveyWrapperException threw an exception when invoked on org.ofbiz.product.store.ProductStoreSurveyWrapper@6258e1
The problematic instruction:
----------
==> ${randomSurvey.render().toString()} [on line 32, column 11 in component://ecommerce/webapp/ecommerce/content/minipoll.ftl]
----------

Java backtrace for programmers:
----------
freemarker.template.TemplateModelException: Method public java.io.Writer org.ofbiz.product.store.ProductStoreSurveyWrapper.render() throws org.ofbiz.content.survey.SurveyWrapper$SurveyWrapperException threw an exception when invoked on org.ofbiz.product.store.ProductStoreSurveyWrapper@6258e1

This problem dissapears when I revert et re-appears when I reapply the patch.

> FreeMarkerWorker class has a bug in its caching logic
> -----------------------------------------------------
>
>                 Key: OFBIZ-1170
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1170
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, NewFreeMarkerWorker.patch, NewFreeMarkerWorker.patch
>
>
> The FreeMarkerWorker class creates an instance of the Template class, initializes it with the current user's locale, then stores it in a cache. Other users will see the template rendered in the first user's locale, regardless of their locale setting.
> This can be demonstrated on the Hot Wax demo site in the WorkEffort calendar. Some elements in the screen are rendered in another locale, regardless of your current locale setting.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-1170) FreeMarkerWorker class has a bug in its caching logic

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517797 ] 

Jacques Le Roux commented on OFBIZ-1170:
----------------------------------------

I have tested the FreeMarkerWorker.patch for some times now without any problems. I have also tried the  NewFreeMarkerWorker.patch without problems tonight. But I would prefer to have some other opinons before commiting it, thanks


> FreeMarkerWorker class has a bug in its caching logic
> -----------------------------------------------------
>
>                 Key: OFBIZ-1170
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1170
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Adrian Crum
>            Assignee: Jacques Le Roux
>            Priority: Minor
>         Attachments: FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, NewFreeMarkerWorker.patch, NewFreeMarkerWorker.patch, NewFreeMarkerWorker.patch
>
>
> The FreeMarkerWorker class creates an instance of the Template class, initializes it with the current user's locale, then stores it in a cache. Other users will see the template rendered in the first user's locale, regardless of their locale setting.
> This can be demonstrated on the Hot Wax demo site in the WorkEffort calendar. Some elements in the screen are rendered in another locale, regardless of your current locale setting.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1170) FreeMarkerWorker class has a bug in its caching logic

Posted by "Adrian Crum (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Crum updated OFBIZ-1170:
-------------------------------

    Attachment: NewFreeMarkerWorker.patch

Added a couple of JavaDoc comments and a few minor fixups. Okay, I think it's done.


> FreeMarkerWorker class has a bug in its caching logic
> -----------------------------------------------------
>
>                 Key: OFBIZ-1170
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1170
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, NewFreeMarkerWorker.patch, NewFreeMarkerWorker.patch
>
>
> The FreeMarkerWorker class creates an instance of the Template class, initializes it with the current user's locale, then stores it in a cache. Other users will see the template rendered in the first user's locale, regardless of their locale setting.
> This can be demonstrated on the Hot Wax demo site in the WorkEffort calendar. Some elements in the screen are rendered in another locale, regardless of your current locale setting.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-1170) FreeMarkerWorker class has a bug in its caching logic

Posted by "Adrian Crum (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Crum updated OFBIZ-1170:
-------------------------------

    Attachment: FreeMarkerWorker.patch

The Freemarker community came through with a description of the correct way to render a template in a multi-user/multi-threaded environment.

Attached patch uses the recommended template rendering process. See my comments in the

renderTemplate(Template template, Map context, Writer outWriter)

method.


> FreeMarkerWorker class has a bug in its caching logic
> -----------------------------------------------------
>
>                 Key: OFBIZ-1170
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-1170
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: SVN trunk, Release Branch 4.0
>            Reporter: Adrian Crum
>            Priority: Minor
>         Attachments: FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch, FreeMarkerWorker.patch
>
>
> The FreeMarkerWorker class creates an instance of the Template class, initializes it with the current user's locale, then stores it in a cache. Other users will see the template rendered in the first user's locale, regardless of their locale setting.
> This can be demonstrated on the Hot Wax demo site in the WorkEffort calendar. Some elements in the screen are rendered in another locale, regardless of your current locale setting.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.