4 Replies Latest reply on Mar 31, 2008 11:33 PM by stephen

    jndiPattern mis-configured in examples?

    stephen

      Seam reference:



      Seam lets you place wildcards of the form @wildcard@ in the components.xml file which can be replaced
      either by your Ant build script (at deployment time) or by providing a file named components.
      properties in the classpath (at development time).


      In bookings example the components.xml contains:


          <core:init jndi-pattern="@jndiPattern@" debug="true"/>




      The components.properties contains:


          jndiPattern #{ejbName}/local
      



      However the correct jndiPattern (for JBoss) would be


          jndiPattern jboss-seam-booking/#{ejbName}/local
      



      Sure enough when I tried to run the example from my IDE(A) without using ant it failed.
      After correcting the component.properties I was able to directly run/debug without ant.


      Same problem in other examples.


      How comes? Should I file a Jira issue?
      Nobody else ever runs without ant?

        • 1. Re: jndiPattern mis-configured in examples?
          pmuir

          The examples assume that you will use ant to deploy them. The ant script does the replacement of @jndiPattern with jboss-seam-booking/#{ejbName}/local for JBoss (or #{ejbName}/local for Tomcat deployments) and the components.properties is used for running tests. If you wanted to just do it through components.properties you would need one for tests, one for JBoss and one for Tomcat with Embedded JBoss, and deploy the correct one renamed to component.properties at deploy time.


          JBoss Tools does something similar to what I describe (different component.properties depending on classpath in use - deploy or test)

          • 2. Re: jndiPattern mis-configured in examples?
            stephen

            Thanks for the explanation, Pete.
            I'll just add my own components.properties when I compose the example project for IDEA.


            Still, my impression is that you are trying to get users away from plain Tomcat toward JBoss. So I think it would make sense to have the JBoss specific setting pre-confihgured in components.xml.


            At the very least there should be a comment in the components.properties



            The pattern in components.xml is replaced by an application server specific value by ant. This value here is for running tests only

            Currently it is quite weird, because the docs say that @foo@ can be replaced by a foo property defined in components.properties, but what you get is something slightly different.

            • 3. Re: jndiPattern mis-configured in examples?
              pmuir

              I think you are right.


              Please raise an issue in JIRA.

              • 4. Re: jndiPattern mis-configured in examples?
                stephen

                Thanks. I suppose you were referring to the comment part?!
                See http://jira.jboss.org/jira/browse/JBSEAM-2807