4 Replies Latest reply on Dec 11, 2008 7:17 PM by alesj

    5.0.0.GA deployment options for developers

    jgemski

      During development we use an exploded web application structure under a development folder (i.e. c:\dev). This enables us once running to simply change a JSP in place for example without going through a deployment step. We used to be able in JBoss 4.2.x to specify a Context element under the Host element in server.xml which referenced our dev folder. Worked great.

      It appears in JBoss 5.0.0.GA, I'm seeing this is no longer possible org.jboss.xb.binding.JBossXBRuntimeException: Context not found as a child of Host.

      As an alternative I tried the Host.appBase approach mentioned in Tomcat 6 docs, which worked when I tried under JBoss Web 2.1.1.GA directly. However in the AS5 container I ran into problems deploying other wars (i.e jmx-console) as well as my own.

      http://www.jboss.org/file-access/default/members/jbossas/freezone/docs/Installation_And_Getting_Started_Guide/5/html/Sample_JSF_EJB3_Application-Deploying_the_Application.html
      seems to imply a deploy step is required.

      Are there any options to run an exploded webapp outside the JBoss structure for development?





        • 1. Re: 5.0.0.GA deployment options for developers
          peterj

          Look in the file server/xxx/conf/bootstrap/profile-repository.xml, look for the bean named SerializableDeploymentRepositoryFactory and modify the applicationURIs property by adding another value. Example:

          <property name="applicationURIs">
           <array elementClass="java.net.URI">
           <value>${jboss.server.home.url}deploy</value>
           <value>file:///c:/dev</value>
           </array>


          Unlike the old URIList, you can only supply directories here (files will not work), so a trailing '/' is not required, but any directories listed participate in hot deployment (in earlier version only the first directory participated in hot deployment).

          • 2. Re: 5.0.0.GA deployment options for developers
            jgemski

            Thanks Peter. It worked perfectly.

            • 3. Re: 5.0.0.GA deployment options for developers
              rob.stryker

              On a similar note, we also used to be able (in 4.x) to add, at runtime and without modifying the configuration, another location to be scanned by calling the DeploymentScanner mbean and adding a url / folder that should be scanned. This was accomplished from a different process entirely.

              Is this still an option? I'm looking in the available JMX beans that are exposed and I'm not seeing one that matches up in this regard. I realize JMX is being de-emphasized in future releases, as it's no longer the base of the kernal.

              The use case I'm trying to solve here is, in an eclipse environment, a user may want to declare 3 or 4 "servers" using the same configuration / runtime data. All the information in the current deploy folder would still need to be deployed; we'd just want an additional separate area where deployments could be made from eclipse without "polluting" the primary deploy location server/${conf}/deploy.

              Currently the eclipse tooling sets up a place in eclipse metadata for deployments from the dev environment to be published to, and in 4.x I am able to add add it as a place to be scanned without modifying any xml files in the installation / configuration.

              *Any* possible solution is appreciated ;) Even if the only option is that I write my own MBean which interfaces directly with... erm... whatever handles where the deployment locations are (about which I know approximately zero right now ;) )

              • 4. Re: 5.0.0.GA deployment options for developers
                alesj

                 

                "rob.stryker@jboss.com" wrote:

                *Any* possible solution is appreciated ;) Even if the only option is that I write my own MBean which interfaces directly with... erm... whatever handles where the deployment locations are (about which I know approximately zero right now ;) )

                See JBOSS_HOME/server/default/conf/bootstrap/profile-repository.xml.

                And check ProfileService (PS) tests on how to get a hold of ProfileService/ManagementView reference:
                - http://anonsvn.jboss.org/repos/jbossas/trunk/testsuite/src/main/org/jboss/test/profileservice/test/ProfileServiceUnitTestCase.java

                You should get a hold of PS, and add new url to a runtime object - SerializableDeploymentRepositoryFactory.