3 Replies Latest reply on Mar 29, 2009 9:36 PM by gavin.king

    Declaring Beans from xml

      I've tried to play with beans.xml but had no success. Does declaring beans from xml already work?


      I've tried this one:


      <Beans xmlns="urn:java:ee">
          <Integer>
              <Named>TestInt</Named>
              <value>4711</value>
          </Integer>
      </Beans>
      


      Should give me a named bean, but from the JBoss logfile it doesn't look like.


      This should throw an Definition Exception, since there is no such class:


      <Beans xmlns="urn:java:ee">
          <asdfkhlsadklfsd/>
      </Beans>
      



      However the beans.xml is beeing parsed since changing it to be non xml gives an org.xml.sax.SAXParseException.

        • 1. Re: Declaring Beans from xml
          nickarls

          There is still a huge hole in the implementation where the xml will be (in the next release). Currently, there is only a stub that recognizes (and does some parsing on?) the beans.xml but it doesn't really do anything with it.

          • 2. Re: Declaring Beans from xml
            pmuir

            Nicklas Karlsson wrote on Mar 17, 2009 12:16:


            There is still a huge hole in the implementation where the xml will be (in the next release). Currently, there is only a stub that recognizes (and does some parsing on?) the beans.xml but it doesn't really do anything with it.


            Specifically, it currently parses out enabled deployment types only

            • 3. Re: Declaring Beans from xml
              gavin.king

              Probably a really really good idea to abort deployment or at the very least log an INFO if we find something in the XML that we don't currently understand :-)