Pretty faces Annotation with mutiple jar

Splash Forums PrettyFaces Users Pretty faces Annotation with mutiple jar

This topic contains 7 replies, has 3 voices, and was last updated by  jvr 2 years, 2 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #26196

    jvr
    Participant

    Hi,

    I am using pretty faces annotations in my project.
    I am maintaining no of jar files.
    In the main web.xml
    I have configured this.
    <context-param>
    <param-name>com.ocpsoft.pretty.SCAN_LIB_DIRECTORY</param-name>
    <param-value>true</param-value>
    </context-param>
    We are maintaining separate web-fragment.xml files for individual jars
    In the 1st jar (web-fragment.xml)
    <context-param>
    <param-name>com.ocpsoft.pretty.BASE_PACKAGES</param-name>
    <param-value>com.mycompany.web.issue.controller</param-value>
    </context-param>

    In the 2nd jar (web-fragment.xml)

    <context-param>
    <param-name>com.ocpsoft.pretty.BASE_PACKAGES</param-name>
    <param-value>com.mycompany.web.assembl</param-value>
    </context-param>

    Doing so, it is working for only the 1 jar but not remaining jars.
    Is this right approach to configure individually for individual or Should only be configured once in main web.xml.
    Can any one pls help?

    • This topic was modified 2 years, 2 months ago by  jvr.
    • This topic was modified 2 years, 2 months ago by  jvr.
    #26199

    I don’t think that you can have context-params for the same name in different web-fragments. These fragments are merged by the container at deployment time. I think this is the reason only one of them works as the overwrite each other. 🙁

    #26201

    That is correct. You need to add all of the packages in a comma separated list to the main web.xml.

    #26202

    jvr
    Participant

    Thanks, I have already tride this way, It works 🙂
    But i would like to know is there any alternative solution for this.

    • This reply was modified 2 years, 2 months ago by  jvr.
    • This reply was modified 2 years, 2 months ago by  jvr.
    #26203

    jvr
    Participant

    And One doubt by using pretty faces annotation, if we specify no of packages in the context-params web.xml whether it leads to performance issue?.

    for eg:

    <context-param>
    <param-name>com.ocpsoft.pretty.BASE_PACKAGES</param-name>
    <param-value>com.mycompany.web.assembl,com.mycompany.web.issue.controller</param-value>
    </context-param>

    #26208

    If you don’t limit the number of packages to scan, PrettyFaces will scan all classes.

    However, this will be done only once at startup time (at least in production mode).

    #26210

    There’s no performance impact after the application has started in production mode, as Christian says.

    #26213

    jvr
    Participant

    Thank you Christian, Lincoln

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

Comments are closed.