3 Replies Latest reply on Jan 24, 2008 4:27 AM by deruelle_jean

    Deployers conflict

    deruelle_jean

      Hi,

      We are currently building a sip servlets (JSR 289) implementation that aims to be able to run both on top of Tomcat and Jboss. (available at https://sip-servlets.dev.java.net/)
      Unfortunately for us, the specs mandates that compliant containers should be able to deploy sip servlets bundled as a sar archive (.sar extension, same as jboss service archive extension). A valid sar file should contain a sip.xml in its WEB-INF directory.

      This requirement made me look into Jboss AS 4.2.2.GA code and I found that the current SARDeployer will accept any file with .sar extension (in its accepts method, actually through the SubDeployerSupport accepts method). However if the sar file deployed doesn't contain a META-INF/jboss-service.xml it will fail to deploy.

      This prevents us to provide our custom Tomcat Deployer to deploy sip servlet archive file (sar file with a sip.xml)

      We have a proposition to correct the situation so that we can use Jboss as a sip servlets converged container :

      Provide an accepts method in SARDeployer that enforce checks to see if the sar file contains a META-INF/jboss-service.xml. If not the method would return false and won't accept the deployment, leaving it for our sip servlets deployer to process and accept since it will contain a sip.xml.

      We might have missed something. if not, do you think that would be possible ? If so should I open an issue in JIRA or something ?

      Thx.
      Best regards
      Jean Deruelle

        • 1. Re: Deployers conflict
          alesj

          This issue is easily solvable in JBoss5, where the deployers have more flexible architecture.

          • 2. Re: Deployers conflict
            starksm64

            You should open a jira issue so that people can discuss whether it makes sense to support in this in the 4.x codebase. The proposal you suggest sounds fine.

            • 3. Re: Deployers conflict
              deruelle_jean

              I created the Feature request at http://jira.jboss.org/jira/browse/JBAS-5168.

              If I may, I have another request but this time regarding the AbstractWebDeployer.

              Still regarding sip servlets, sip servlets can be converged applications. It means that they can be an HTTP+SIP application and that servlets from both side can play togehter nicely and are tighly integrated by sharing the same context and others objects and as such seen as a web application. They can be packaged as a war or sar. The specification establishes the equivalence of .sar and .war archive formats in the context of SIP Servlet containers so that a .war archive should also be able to contain sip application components and a .sar archive should be able to contain web application components.

              As such we really need to extend the AbstractWebContainer or for that matter the JbossWeb component to fully leverage the exsiting code allowing web deployment rather then duplicating it and going into maintenance nightmares.

              But this is not currently possible since the AbstractWebContainer uses hardcoded values to check for .war extension in its init() method and parseMetaData() method.

              It could be made flexible and allowing for any extensions quite easily (instead of checking lastIndexOf(".war") rather check lastIndexOIf(".") ?). This way we could deploy war or sar leveraging the existing Jboss code.

              Do you think that would be possible ?
              If so should I create a Jira Issue too ?

              Best regards,
              Jean Deruelle