コード例 #1
0
 @AfterGroups(groups = "as5-plugin-ejb3")
 @Parameters("ejb3.test.jars.path")
 public void undeployTestJars(String jarPaths) {
   try {
     System.out.println("Undeploying EJB3 test jars from AS...");
     for (String jarPath : jarPaths.split(";")) {
       File jarFile = new File(jarPath);
       AppServerUtils.undeployFromAS(jarFile.getName());
     }
   } catch (Exception e) {
     fail("Failed to undeploy EJB3 test jars.", e);
   }
 }
コード例 #2
0
  @BeforeGroups(groups = "as5-plugin-ejb3")
  @Parameters("ejb3.test.jars.path")
  public void deployTestJars(String jarPaths) {
    try {
      System.out.println("Deploying EJB3 test jars to AS...");

      for (String jarPath : jarPaths.split(";")) {
        File jarFile = new File(jarPath);
        AppServerUtils.deployFileToAS(jarFile.getName(), jarFile, false);
      }
      // and discover the resources
      PluginContainer.getInstance().getInventoryManager().executeServiceScanImmediately();
    } catch (Exception e) {
      fail("Failed to deploy EJB3 test jars.", e);
    }
  }