2 Replies Latest reply on Aug 4, 2008 2:45 PM by Wolfgang Knauf

    Use of JSR88 implementation (J2EE deployment api)

    Steffen Boehme Newbie

      Hi there,

      I've tried to use the JSR88 implementation of jboss for deploying j2ee components, but i run in trouble while connecting to the jboss server ...

      I don't know, which uri I have to use to get the a deployment manager, which is able to distribute and start some components.

      I have used this piece of code:

      JarFile deploymentJar = new JarFile(new File("lib/jboss-deployment.jar"));
      java.util.jar.Manifest manifestFile = deploymentJar.getManifest();
      Attributes attributes = manifestFile.getMainAttributes();
      String key = "J2EE-DeploymentFactory-Implementation-Class";
      String className = attributes.getValue(key);
      // className is now org.jboss.deployment.spi.factories.DeploymentFactoryImpl
      Class deploymentFactory = Class.forName(className);
      DeploymentFactory deploymentFactoryInstance = (DeploymentFactory) deploymentFactory.newInstance();
      DeploymentFactoryManager dfm = DeploymentFactoryManager.getInstance();
      String uri = "localhost:1099";
      String username = null;
      String password = null;
      DeploymentManager dm = null;
      // all works fine up to this point
      // but here I don't know, what uri I have to use to get the deployment manager ...
      try {
       dm = dfm.getDeploymentManager(uri, username, password);
      } catch (DeploymentManagerCreationException e) {

      Could somebody please tell me, what uri I have to use, to get my DeploymentManager from JBoss?

      Thanks a lot!