亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? ejbtestrunnerbean.java

?? server-config-guide.rar,jboss 4.3配置及測試源碼
?? JAVA
字號:
/* * JUnitEJB * * Distributable under LGPL license. * See terms of license at gnu.org. */package org.jboss.test.util.ejb;import java.lang.reflect.Constructor;import java.util.Properties;import javax.ejb.EJBException;import javax.ejb.SessionBean;import javax.ejb.SessionContext;import javax.naming.Binding;import javax.naming.InitialContext;import javax.naming.NamingException;import javax.naming.NamingEnumeration;import javax.transaction.Status;import javax.transaction.SystemException;/** * Implementation of the ejb test runner. * * @see EJBTestRunner * * @author <a href="mailto:dain@daingroup.com">Dain Sundstrom</a> * @author Scott.Stark@jboss.org * @version $Revision: 1.1 $ */public class EJBTestRunnerBean implements SessionBean{   transient private SessionContext ctx;   private String runnerJndiName;   /** Run the specified test method on the given class name using a Properties    * map built from all java:comp/env entries.    *     * @param className the name of the test class    * @param methodName the name of the test method    * @throws RemoteTestException If any throwable is thrown during     * execution of the method, it is wrapped with a RemoteTestException and     * rethrown.    */   public void run(String className, String methodName)      throws RemoteTestException   {      Properties props = new Properties();      try      {         InitialContext ctx = new InitialContext();         NamingEnumeration bindings = ctx.listBindings("java:comp/env");         while( bindings.hasMore() )         {            Binding binding = (Binding) bindings.next();            String name = binding.getName();            String value = binding.getObject().toString();            props.setProperty(name, value);         }      }      catch(NamingException e)      {         throw new RemoteTestException(e);      }      run(className, methodName, props);   }   /** Run the specified test method on the given class name    *      * @param className the name of the test class    * @param methodName the name of the test method    * @param props    * @throws RemoteTestException If any throwable is thrown during     * execution of the method, it is wrapped with a RemoteTestException and     * rethrown.    */    public void run(String className, String methodName, Properties props)      throws RemoteTestException   {      EJBTestCase testCase = getTestInstance(className, methodName);      setUpEJB(testCase, props);      RemoteTestException exception = null;      try      {         runTestCase(testCase);      }      catch (RemoteTestException e)      {         exception = e;      }      finally      {         try         {            tearDownEJB(testCase, props);         }         catch (RemoteTestException e)         {            // favor the run exception if one was thrown            if (exception != null)            {               exception = e;            }         }         if (exception != null)         {            throw exception;         }      }   }   /**    * Runs the setUpEJB method on the specified test case    * @param testCase the actual test case that will be run    * @throws RemoteTestException If any throwable is thrown during execution     * of the method, it is wrapped with a RemoteTestException and rethrown.    */   private void setUpEJB(EJBTestCase testCase, Properties props)      throws RemoteTestException   {      try      {         ctx.getUserTransaction().begin();         try         {            testCase.setUpEJB(props);         }         catch (Throwable e)         {            throw new RemoteTestException(e);         }         if (ctx.getUserTransaction().getStatus() == Status.STATUS_ACTIVE)         {            ctx.getUserTransaction().commit();         }      }      catch (Throwable e)      {         try         {            ctx.getUserTransaction().rollback();         }         catch (SystemException unused)         {            // eat the exception we are exceptioning out anyway         }         if (e instanceof RemoteTestException)         {            throw (RemoteTestException) e;         }         throw new RemoteTestException(e);      }   }   /**    * Runs the test method on the specified test case    * @param testCase the actual test case that will be run    * @throws RemoteTestException If any throwable is thrown during execution     * of the method, it is wrapped with a RemoteTestException and rethrown.    */   private void runTestCase(EJBTestCase testCase) throws RemoteTestException   {      try      {         ctx.getUserTransaction().begin();         try         {            testCase.runBare();         }         catch (Throwable e)         {            throw new RemoteTestException(e);         }         if (ctx.getUserTransaction().getStatus() == Status.STATUS_ACTIVE)         {            ctx.getUserTransaction().commit();         }      }      catch (Throwable e)      {         try         {            ctx.getUserTransaction().rollback();         }         catch (SystemException unused)         {            // eat the exception we are exceptioning out anyway         }         if (e instanceof RemoteTestException)         {            throw (RemoteTestException) e;         }         throw new RemoteTestException(e);      }   }   /**    * Runs the tearDownEJB method on the specified test case    * @param testCase the actual test case that will be run    * @throws RemoteTestException If any throwable is thrown during execution     * of the method, it is wrapped with a RemoteTestException and rethrown.    */   private void tearDownEJB(EJBTestCase testCase, Properties props)      throws RemoteTestException   {      try      {         ctx.getUserTransaction().begin();         try         {            testCase.tearDownEJB(props);         }         catch (Throwable e)         {            throw new RemoteTestException(e);         }         if (ctx.getUserTransaction().getStatus() == Status.STATUS_ACTIVE)         {            ctx.getUserTransaction().commit();         }      }      catch (Throwable e)      {         try         {            ctx.getUserTransaction().rollback();         }         catch (SystemException unused)         {            // eat the exception we are exceptioning out anyway         }         if (e instanceof RemoteTestException)         {            throw (RemoteTestException) e;         }         throw new RemoteTestException(e);      }   }   /**    * Gets a instance of the test class with the specified class name and    * initialized to execute the specified method.    *    * @param className the name of the test class    * @param methodName the name of the test method    * @return a new instance of the test class with the specified class name and    *    initialized to execute the specified method.    */   private EJBTestCase getTestInstance(String className, String methodName)   {      Class testClass = null;      try      {         ClassLoader loader = Thread.currentThread().getContextClassLoader();         testClass = loader.loadClass(className);      }      catch (ClassNotFoundException e)      {         throw new EJBException("Test class not found : " + className);      }      Constructor constructor = null;      try      {         constructor = testClass.getConstructor(new Class[]{String.class});      }      catch (Exception e)      {         e.printStackTrace();         throw new EJBException("Test class does not have a constructor " +            "which has a single String argument.");      }      try      {         EJBTestCase testCase =            (EJBTestCase) constructor.newInstance(new Object[]{methodName});         testCase.setServerSide(true);         return testCase;      }      catch (Exception e)      {         e.printStackTrace();         throw new EJBException("Cannot instantiate test class: " +            testClass.getName());      }   }   public void ejbCreate()   {   }   public void ejbRemove()   {   }   public void ejbActivate()   {   }   public void ejbPassivate()   {   }   public void setSessionContext(SessionContext ctx)   {      this.ctx = ctx;   }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成人tv网| 亚洲综合激情网| 日韩欧美在线观看一区二区三区| 99精品在线观看视频| 大美女一区二区三区| 91麻豆国产香蕉久久精品| 国产iv一区二区三区| www.欧美亚洲| 99久久免费精品高清特色大片| 99精品在线免费| 色婷婷av一区二区三区之一色屋| 色婷婷综合久色| 欧美疯狂性受xxxxx喷水图片| 欧美日韩三级视频| 欧美肥妇bbw| 久久综合九色欧美综合狠狠 | 日本韩国欧美三级| 欧美主播一区二区三区| 欧美日韩三级一区| 日韩免费成人网| 欧美国产1区2区| 亚洲激情图片qvod| 午夜视频在线观看一区二区| 奇米精品一区二区三区在线观看| 蜜臀av性久久久久蜜臀av麻豆 | 亚洲欧美怡红院| 亚洲精品美国一| 日韩国产精品大片| 狠狠色丁香久久婷婷综合_中| 夫妻av一区二区| 日本乱码高清不卡字幕| 日韩欧美国产一区二区三区 | 亚洲与欧洲av电影| 免费成人在线影院| 91视频com| 欧美xxxx在线观看| 玉足女爽爽91| 国产在线视频精品一区| 色吧成人激情小说| 国产性天天综合网| 五月激情丁香一区二区三区| 国产成人免费在线观看不卡| 欧美日韩一区二区三区视频 | 99国产精品国产精品久久| 欧美人动与zoxxxx乱| 日本一区二区三区国色天香 | 岛国av在线一区| 91麻豆精品国产自产在线| 中文字幕在线不卡一区| 国产在线精品免费| 91麻豆精品国产91久久久使用方法| 精品国产一区二区在线观看| 一区二区三区毛片| 国产91在线看| 精品国产乱码久久久久久图片| 亚洲视频精选在线| 国产成a人亚洲| 日韩精品专区在线| 日本三级韩国三级欧美三级| 色欧美片视频在线观看在线视频| 国产日本欧洲亚洲| 国产在线播精品第三| 91精品国产综合久久国产大片| 亚洲欧美在线另类| 成人性生交大片免费看在线播放| 精品国产乱码久久久久久免费| 亚洲成人tv网| 欧美日韩日日摸| 亚洲综合免费观看高清完整版 | 国产激情视频一区二区在线观看| 91精品国产手机| 婷婷综合五月天| 色综合夜色一区| 一区二区日韩电影| 色香色香欲天天天影视综合网| 国产精品久久久久影院老司 | 国产精品一级片在线观看| 精品精品欲导航| 黄色精品一二区| 国产欧美一区二区在线| 懂色一区二区三区免费观看| 国产欧美日韩另类视频免费观看| 国产精品66部| 国产精品电影院| 色哟哟一区二区| 石原莉奈在线亚洲三区| 91精品国产综合久久久久久 | 91国产免费看| 亚洲电影在线播放| 欧美一区二区精美| 精品综合久久久久久8888| 久久久三级国产网站| 福利视频网站一区二区三区| 国产精品网站在线播放| 99久精品国产| 日韩va亚洲va欧美va久久| 欧美成人一级视频| 99re成人精品视频| 一区二区欧美精品| 久久综合色一综合色88| 成人免费不卡视频| 婷婷国产v国产偷v亚洲高清| 精品国产一二三| 91视频xxxx| 免费成人美女在线观看.| 2021国产精品久久精品| 成人app在线观看| 一区二区三区久久| 26uuu亚洲综合色| 一本一本大道香蕉久在线精品| 肉色丝袜一区二区| 国产女人aaa级久久久级| 欧美亚洲丝袜传媒另类| 国产一区二区免费看| 亚洲女厕所小便bbb| 日韩一级在线观看| 99国内精品久久| 三级亚洲高清视频| 日韩理论片网站| 日韩一区二区三区四区| 99vv1com这只有精品| 精品一区二区精品| 18欧美乱大交hd1984| 欧美一区二区三区公司| 一本久道中文字幕精品亚洲嫩| 美女久久久精品| 亚洲永久精品国产| 国产精品美女久久久久久久| 欧美videossexotv100| 在线影院国内精品| av亚洲精华国产精华精华 | 成人午夜av影视| 久久不见久久见免费视频7| 夜夜精品浪潮av一区二区三区| 久久综合九色综合欧美亚洲| 91精品国产综合久久精品app| av激情综合网| 国产精品伊人色| 美女诱惑一区二区| 天天影视网天天综合色在线播放| 亚洲婷婷国产精品电影人久久| 精品国产不卡一区二区三区| 欧美老肥妇做.爰bbww视频| 91玉足脚交白嫩脚丫在线播放| 国产一区二区三区在线看麻豆| 亚洲成人7777| 亚洲国产精品久久人人爱| 亚洲美女屁股眼交| 亚洲另类色综合网站| 亚洲另类春色校园小说| 亚洲资源在线观看| 亚洲v日本v欧美v久久精品| 一区二区三区在线高清| 亚洲日本成人在线观看| 国产亚洲成年网址在线观看| 久久亚洲二区三区| 久久精品视频免费| 久久精品日韩一区二区三区| 国产亚洲精久久久久久| 久久久精品国产免费观看同学| 久久夜色精品国产欧美乱极品| 精品捆绑美女sm三区| 久久久久久久综合色一本| 久久久亚洲高清| 亚洲美女少妇撒尿| 午夜精品福利一区二区蜜股av | av在线不卡观看免费观看| 不卡视频免费播放| 色一区在线观看| 欧美久久一二三四区| 91精品欧美综合在线观看最新| 欧美哺乳videos| 久久久不卡网国产精品二区| 国产精品久99| 一区二区三区鲁丝不卡| 日韩va欧美va亚洲va久久| 国产精品一区专区| 91麻豆成人久久精品二区三区| 欧美日韩免费高清一区色橹橹| 欧美一区二区三区四区视频| 久久日一线二线三线suv| 中文字幕第一区综合| 亚洲成av人**亚洲成av**| 九一九一国产精品| 色香蕉久久蜜桃| 精品国产露脸精彩对白| 亚洲精品综合在线| 国产一区二区三区黄视频| 色综合咪咪久久| 精品电影一区二区| 一区二区成人在线视频| 激情久久五月天| 欧美三级在线视频| 国产区在线观看成人精品| 亚洲成av人片| 91丨porny丨首页| 久久嫩草精品久久久久| 午夜精品久久久| 97久久精品人人做人人爽50路| 欧美一级爆毛片|