• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • WebLogic Server中CMP實體bean的性能調優[7]

    發表于:2010-03-11來源:作者:點擊數: 標簽:CMPBeanWeblogic實體SERVER
    WebLogic Server中CMP實體bean的性能調優[7] 性能測試工具 下面基于 Cactus 的測試驗證了該行為。假定一個Person CMP bean是利用樂觀并發部署的,并且cache-between-transaction被設置為true: ... public class OptimisticLockingTest extends Servlet Test

      WebLogic Server中CMP實體bean的性能調優[7]  性能測試工具 

       下面基于Cactus的測試驗證了該行為。假定一個Person CMP bean是利用樂觀并發部署的,并且cache-between-transaction被設置為true:

      ...

      public class OptimisticLockingTest extends ServletTestCase {

      private UserTransaction tx;

      protected void setUp() throws Exception {

      super.setUp();

      Context context = new InitialContext();

      this.tx = (UserTransaction)context

      .lookup("javax/transaction/UserTransaction");

      }

      public void testCacheBetweenTransactions() throws Exception {

      PersonLocalHome localHome = (PersonLocalHome)Locator

      .getLocalHome(PersonLocalHome.JNDI_NAME);

      // create record via CMP in first transaction

      this.tx.begin();

      PersonLocal local = localHome.create();

      local.setName("John");

      Long pk = local.getPrimaryKey();

      this.tx.commit();

      // update some field(s) via direct JDBC call in another

      // transaction. Assume that updatePersonNameViaJdbc()

      // method will update version column as well

      String newName = "Paul";

      this.tx.begin();

      updatePersonNameViaJdbc(pk, newName);

      this.tx.commit();

      // find CMP again and try to update name in yet

      // another transaction

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>