1 Reply Latest reply on Nov 19, 2002 10:51 AM by f_kasper

    How to make sar deloy its jar files like they are in war's

    f_kasper

      Hi
      I am a newbie to JBoss and have tried to write my own connector for osworkflow.
      First i just implemented it as an servlet, which just worked fine. Then I moved on trying to do the same thing by an MBean. I had some trouble getting my MBean to find the jar's for the workflow, and the jar containing my MBean. This I handled by defining a classpath for my jars.
      my filestruct in the osworkflow.sar
      /osworkflow.sar/META-INF/jboss-service.xml
      /osworkflow.sar/META-INF/osworkflow.xml
      /osworkflow.sar/test.war/WEB-INF/lib/my_jars and workflow.jar

      But then it only works when i manually deploy my sar after the JBoss has bean started. The problem is that the DefaultDS hasn't been initialised yet.


      I have read the bought documentation but can't find the answers for the following questions

      Is it the right place to put the jars?
      Can i get the deployer to deploy my jars inside a sar (used by MBean), like they are deployed in a war's lib, by the AbstractWebContainer (It seams different, when it is in the war, there isn't registred a lot of services to jndi as there is in the sar deployment)?
      If the deployment can't act like an war: Is there a way to delay the deployment of the classpath files?
      I tried at the forum to ask the same question and got an answer to sole this in my start() function. How do i do this? Import the classes?

      My MBean (all workflow jar, is contained in the winger.jar):




      osWorkflow
      jboss:service=Naming
      jboss.jca:service=LocalTxDS,name=hsqldbDS

        • 1. Re: How to make sar deloy its jar files like they are in war
          f_kasper

          The difference between a deployment in WEB-IMF/lib/propertyset.jar and osworkflow.sar/probertyset.jar is that in the first example the jar is only available as a library, and in the second it is deployed!

          This lead to 2 new questions:
          How to handle the deployment order?
          The hsqldq-service.xml needs to be deployed before my osworkflow.sar in order to fix the deployment error.
          I found following in the conf/jboss-service.xml but can't get it working.:
          <!-- The URLComparator can be used to specify a deployment ordering
          - for deployments found in a scanned directory. The class specified
          - must be an implementation of java.util.Comparator, it must be able
          - to compare two URL objects, and it must have a no-arg constructor.
          - Two deployment comparators are shipped with JBoss:
          - - org.jboss.deployment.DeploymentSorter
          - Sorts by file extension, as follows:
          - "sar", "service.xml", "rar", "jar", "war", "wsr", "ear", "zip",
          - "*"
          - - org.jboss.deployment.scanner.PrefixDeploymentSorter
          - If the name portion of the url begins with 1 or more digits, those
          - digits are converted to an int (ignoring leading zeroes), and
          - files are deployed in that order. Files that do not start with
          - any digits will be deployed last, and they will be sorted by
          - extension as above with DeploymentSorter.
          - -->

          Second: how do I prevent the sar to deploy its lib, and just use it as an lib, as if they were deployed in *.war/WEB-INF/lib/my.jar?

          I really tried any possible way i could think of, but keep getting errors

          In advantage Thanks
          /Kasper