1 2 3 4 Previous Next 53 Replies Latest reply on Sep 17, 2009 3:45 PM by Emmanuel Bernard Go to original post
      • 45. Re: Deploying ValidatorFactory
        Ales Justin Master

         

        "stan.silvert@jboss.com" wrote:
        Your code isn't working

        Ah yes, forgot to include mc-int jar in AS.
        I'll fix this.

        "stan.silvert@jboss.com" wrote:

        1) Build AS 5.2
        2) Build testsuite
        3) Start AS 5.2
        4) cd to testsuite and run:

        build one-test -Dtest=org.jboss.test.web.test.JSFIntegrationUnitTestCase


        OK, will run this once I'm done.

        • 46. Re: Deploying ValidatorFactory
          Ales Justin Master

           

          "alesj" wrote:
          OK, will run this once I'm done.

          C:\projects\branches\jbossas\Branch_5_x\testsuite>build one-test -Dtest=org.jboss.test.web.test.JSFIntegrationUnitTestCase
          Calling ..\tools\bin\ant.bat one-test -Dtest org.jboss.test.web.test.JSFIntegrationUnitTestCase
          Buildfile: build.xml
          
          one-test:
           [delete] Deleting: C:\projects\branches\jbossas\Branch_5_x\testsuite\output\log\test.log
           [junit] Running org.jboss.test.web.test.JSFIntegrationUnitTestCase
           [junit] Rhino classes (js.jar) not found - Javascript disabled
           [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 213,015 sec
          
          BUILD SUCCESSFUL
          


          • 47. Re: Deploying ValidatorFactory
            Pete Muir Master

            Stan, how close are we to getting the BV deployer into Branch_5_x? I am waiting on it :-)

            • 48. Re: Deploying ValidatorFactory
              Stan Silvert Master

              "Ready or Not" I'm going to try to put something in today. The JNDI stuff is the part that hasn't been fully worked out yet, but the part that creates the BV Factory should be there by the end of the day.

              Stan

              • 49. Re: Deploying ValidatorFactory
                Stan Silvert Master

                I did a snapshot release of the BV deployers and integrated into Branch_5_x.

                Current State of things:
                * The BV Factory is created and added to the DeploymentUnit by the BV deployer
                * The BV Factory from the DeploymentUnit is added to application scope for use by JSF. JSF/BV integration is working.
                * The BV Factory is bound to global JNDI at /BeanValidatorFactories/<DeploymentUnit.getSimpleName()>

                We know the JNDI part is wrong, so there will be changes. But hopefully those of you waiting on this stuff can now make further progress.

                Stan

                • 50. Re: Deploying ValidatorFactory
                  Pete Muir Master

                  Hi Stan,

                  I've tried out the getting the ValidatorFactory from the DeploymentUnit, however, I'm running into a problem, which *I think* is probably a bug, but I'm happy to be convinced otherwise :-)

                  If you have an EAR, the current deployer attaches the ValidatorFactory to the relevant modules of the EAR (e.g. war, ejb jars), and not to the top-level-deployment-unit (the EAR itself). I think it should (also) be attached to the top level deployment unit, because the ValidatorFactory is an application wide instance, not a per-module instance. Adding this to the deployer solves it:

                  if (!unit.isTopLevel() && !unit.getTopLevel().isAttachmentPresent(ValidatorFactory.class))
                   {
                   unit.getTopLevel().addAttachment(ValidatorFactory.class, vf);
                   }


                  If you are happy with this, I'll commit it.

                  • 51. Re: Deploying ValidatorFactory
                    Pete Muir Master

                    Ales says this is the wrong approach:

                    you should just fix the filter to accept top level as well


                    • 52. Re: Deploying ValidatorFactory
                      Stan Silvert Master

                       

                      "pete.muir@jboss.org" wrote:
                      Ales says this is the wrong approach:

                      you should just fix the filter to accept top level as well


                      I've fixed it now. However, what you end up with is a different instance for each deployment inside the EAR. I don't understand the BV Factory well enough to know if that is correct.

                      Emmanuel?

                      Stan

                      • 53. Re: Deploying ValidatorFactory
                        Emmanuel Bernard Master

                        you mean one ValidatorFActory per module.
                        That sounds about right. though I ahve not yet synced with Roberto to see if we go that (likely) route.

                        1 2 3 4 Previous Next