Beispiel #1
0
  public static void main(String[] args) throws Exception {
    DeploymentUtils utils = null;
    try {
      utils = new DeploymentUtils();
      utils.addWarDeployment("war-example.war", SimpleServlet.class.getPackage(), true);
      utils.deploy();

      performCall("simple");
      performCall("legacy");
    } finally {
      utils.undeploy();
      safeClose(utils);
    }
  }
Beispiel #2
0
 public static void main(String[] args) throws Exception {
   DeploymentUtils utils = null;
   try {
     utils = new DeploymentUtils();
     utils.addWarDeployment("ws-example.war", true, EndpointImpl.class.getPackage());
     utils.deploy();
     testWSDL();
     testSOAPCall();
     testWebServiceRef();
   } finally {
     utils.undeploy();
     safeClose(utils);
   }
 }
Beispiel #3
0
  public static void main(String[] args) throws Exception {
    DeploymentUtils utils = new DeploymentUtils();
    try {
      utils.addDeployment("ejb3-rar.rar", SimpleQueueResourceAdapter.class.getPackage());
      utils.addDeployment("ejb3-mdb.jar", PostmanPatMDB.class.getPackage());
      utils.addDeployment("ejb3-example.jar", SimpleStatelessSessionBean.class.getPackage());
      utils.addDeployment("ejb3-mbean.sar", Test.class.getPackage());
      utils.deploy();

      MBeanServerConnection mbeanServer = utils.getConnection();

      SimpleStatelessSessionLocal bean =
          createProxy(
              mbeanServer,
              "java:global/ejb3-example/SimpleStatelessSessionBean!"
                  + SimpleStatelessSessionLocal.class.getName(),
              SimpleStatelessSessionLocal.class);
      String msg = bean.echo("Hello world");
      System.out.println(msg);

      exec(mbeanServer, ExerciseStateful.class);

      String singletonBeanJndiName =
          "java:global/ejb3-example/SimpleSingletonBean!" + SimpleSingletonLocal.class.getName();
      workOnSingletoBean(mbeanServer, singletonBeanJndiName, 100, 10);

      exec(mbeanServer, ExerciseBMT.class);

      exec(mbeanServer, ExerciseEchoService.class);

      exec(mbeanServer, ExercisePatClifton.class);
    } finally {
      utils.undeploy();
      safeClose(utils);
    }
  }