openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <ppod...@apache.org>
Subject Re: Weird Performance Problem
Date Mon, 21 Jan 2008 18:34:18 GMT

Are you are beginning/committing 1000 transactions to insert 1000 instances?


Chengdong Lu wrote:
> 
> 
> My test is to insert 1000 records into the table. The test code is like
> this:
>  private static void insertJPA() throws DAOException, SQLException {
>   DAOFactory daoF = new DAOFactory();
>   AccountDao accountDao = daoF.getAccountDao();
>   System.out.println(new java.util.Date().toString());
> 
>   for (int i = 0; i<1000; i++)
>   {
> 
>    TransactionProxy tran = accountDao.beginTransaction();
>    Account newuser = new Account();
>    newuser.setName("user" + i);
>    //newuser.setFullname("User No. " + i);
>    //newuser.setDescript("Common user");
>    accountDao.insert(newuser);
>    accountDao.commitTransaction(tran);
>   }
>  }
> 
> 

-- 
View this message in context: http://www.nabble.com/Weird-Performance-Problem-tp14998594p15003474.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Mime
View raw message