[jira] Created: (WW-3307) Classfinder searching every sub-directory in the Glassfish directory for classes to be used for the action finder

View: New views
6 Messages — Rating Filter:   Alert me  

[jira] Created: (WW-3307) Classfinder searching every sub-directory in the Glassfish directory for classes to be used for the action finder

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Classfinder searching every sub-directory in the Glassfish directory for classes to be used for the action finder
-----------------------------------------------------------------------------------------------------------------

                 Key: WW-3307
                 URL: https://issues.apache.org/struts/browse/WW-3307
             Project: Struts 2
          Issue Type: Improvement
          Components: Plugin - Convention
    Affects Versions: 2.1.6
         Environment: Glassfish v2.1
            Reporter: James Cook


Further to :
https://issues.apache.org/struts/browse/WW-3234

The list of classes being given to the filter to look for actions was being taken from the Glassfish root directory, this led to anything and everything being given to the filter. This led to extremely long deployment times on Glassfish instances with multiple domains and applications during the file scan.

After mentioning to Musachy, I propose the following solution (I have an implementation running - if needed)

Have an 'include directories' parameter to the convention setting. Allowing for explicit setting of the directories to be scanned - thus filtering out the other directories from the list of URLs, if this is not specified then it falls back to the current scanning.

What are everyones thoughts on this?

 

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


[jira] Updated: (WW-3307) Classfinder searching every sub-directory in the Glassfish directory for classes to be used for the action finder

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ https://issues.apache.org/struts/browse/WW-3307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Musachy Barroso updated WW-3307:
--------------------------------

    Fix Version/s: 2.2.0
         Assignee: Musachy Barroso

Hi James, thanks for reporting, feel free to attach a patch here. It would be great if the list of dirs was relative to the webapp, and not absolute, but yeah I think that would work.

> Classfinder searching every sub-directory in the Glassfish directory for classes to be used for the action finder
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3307
>                 URL: https://issues.apache.org/struts/browse/WW-3307
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - Convention
>    Affects Versions: 2.1.6
>         Environment: Glassfish v2.1
>            Reporter: James Cook
>            Assignee: Musachy Barroso
>             Fix For: 2.2.0
>
>
> Further to :
> https://issues.apache.org/struts/browse/WW-3234
> The list of classes being given to the filter to look for actions was being taken from the Glassfish root directory, this led to anything and everything being given to the filter. This led to extremely long deployment times on Glassfish instances with multiple domains and applications during the file scan.
> After mentioning to Musachy, I propose the following solution (I have an implementation running - if needed)
> Have an 'include directories' parameter to the convention setting. Allowing for explicit setting of the directories to be scanned - thus filtering out the other directories from the list of URLs, if this is not specified then it falls back to the current scanning.
> What are everyones thoughts on this?
>  

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


[jira] Commented: (WW-3307) Classfinder searching every sub-directory in the Glassfish directory for classes to be used for the action finder

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/struts/browse/WW-3307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47000#action_47000 ]

James Cook commented on WW-3307:
--------------------------------

No probs, the apporach was more of a match that a direct list of dirs.

E.g. if our project/WAR name = MYAPP.war

Then I specify:

 <init-param>
            <param-name>struts.convention.include.directories</param-name>
            <param-value>MYAPP</param-value>
        </init-param>

So now any urls that do not contain/match MYAPP will be removed from the action search.

Does this seem a good solution?

> Classfinder searching every sub-directory in the Glassfish directory for classes to be used for the action finder
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3307
>                 URL: https://issues.apache.org/struts/browse/WW-3307
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - Convention
>    Affects Versions: 2.1.6
>         Environment: Glassfish v2.1
>            Reporter: James Cook
>            Assignee: Musachy Barroso
>             Fix For: 2.2.0
>
>
> Further to :
> https://issues.apache.org/struts/browse/WW-3234
> The list of classes being given to the filter to look for actions was being taken from the Glassfish root directory, this led to anything and everything being given to the filter. This led to extremely long deployment times on Glassfish instances with multiple domains and applications during the file scan.
> After mentioning to Musachy, I propose the following solution (I have an implementation running - if needed)
> Have an 'include directories' parameter to the convention setting. Allowing for explicit setting of the directories to be scanned - thus filtering out the other directories from the list of URLs, if this is not specified then it falls back to the current scanning.
> What are everyones thoughts on this?
>  

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


[jira] Commented: (WW-3307) Classfinder searching every sub-directory in the Glassfish directory for classes to be used for the action finder

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/struts/browse/WW-3307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47003#action_47003 ]

Musachy Barroso commented on WW-3307:
-------------------------------------

yes, that sounds good, we usually follow the pattern of allowing a list of regular expressions, instead of a simple pattern, so we cover as many uses cases as possible.

> Classfinder searching every sub-directory in the Glassfish directory for classes to be used for the action finder
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3307
>                 URL: https://issues.apache.org/struts/browse/WW-3307
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - Convention
>    Affects Versions: 2.1.6
>         Environment: Glassfish v2.1
>            Reporter: James Cook
>            Assignee: Musachy Barroso
>             Fix For: 2.2.0
>
>
> Further to :
> https://issues.apache.org/struts/browse/WW-3234
> The list of classes being given to the filter to look for actions was being taken from the Glassfish root directory, this led to anything and everything being given to the filter. This led to extremely long deployment times on Glassfish instances with multiple domains and applications during the file scan.
> After mentioning to Musachy, I propose the following solution (I have an implementation running - if needed)
> Have an 'include directories' parameter to the convention setting. Allowing for explicit setting of the directories to be scanned - thus filtering out the other directories from the list of URLs, if this is not specified then it falls back to the current scanning.
> What are everyones thoughts on this?
>  

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


[jira] Commented: (WW-3307) Classfinder searching every sub-directory in the Glassfish directory for classes to be used for the action finder

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/struts/browse/WW-3307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47013#action_47013 ]

James Cook commented on WW-3307:
--------------------------------

Ok cool, will convert to a nicer regex.

Since I have done this to 2.1.6, would you like to me checkout head and make my changes to that?, I will confirm, but I think I only change the Struts2 action finder class.

> Classfinder searching every sub-directory in the Glassfish directory for classes to be used for the action finder
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3307
>                 URL: https://issues.apache.org/struts/browse/WW-3307
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - Convention
>    Affects Versions: 2.1.6
>         Environment: Glassfish v2.1
>            Reporter: James Cook
>            Assignee: Musachy Barroso
>             Fix For: 2.2.0
>
>
> Further to :
> https://issues.apache.org/struts/browse/WW-3234
> The list of classes being given to the filter to look for actions was being taken from the Glassfish root directory, this led to anything and everything being given to the filter. This led to extremely long deployment times on Glassfish instances with multiple domains and applications during the file scan.
> After mentioning to Musachy, I propose the following solution (I have an implementation running - if needed)
> Have an 'include directories' parameter to the convention setting. Allowing for explicit setting of the directories to be scanned - thus filtering out the other directories from the list of URLs, if this is not specified then it falls back to the current scanning.
> What are everyones thoughts on this?
>  

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


[jira] Commented: (WW-3307) Classfinder searching every sub-directory in the Glassfish directory for classes to be used for the action finder

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ https://issues.apache.org/struts/browse/WW-3307?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47023#action_47023 ]

Musachy Barroso commented on WW-3307:
-------------------------------------

yes please make any patches against trunk (both struts and xwork)

> Classfinder searching every sub-directory in the Glassfish directory for classes to be used for the action finder
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3307
>                 URL: https://issues.apache.org/struts/browse/WW-3307
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - Convention
>    Affects Versions: 2.1.6
>         Environment: Glassfish v2.1
>            Reporter: James Cook
>            Assignee: Musachy Barroso
>             Fix For: 2.2.0
>
>
> Further to :
> https://issues.apache.org/struts/browse/WW-3234
> The list of classes being given to the filter to look for actions was being taken from the Glassfish root directory, this led to anything and everything being given to the filter. This led to extremely long deployment times on Glassfish instances with multiple domains and applications during the file scan.
> After mentioning to Musachy, I propose the following solution (I have an implementation running - if needed)
> Have an 'include directories' parameter to the convention setting. Allowing for explicit setting of the directories to be scanned - thus filtering out the other directories from the list of URLs, if this is not specified then it falls back to the current scanning.
> What are everyones thoughts on this?
>  

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