コード例 #1
0
    public void runOperationInTxnThrowingCheckedExcepting() throws IOException {
      assertTrue(session.getTransaction().isActive());
      JpaTestEntity entity = new JpaTestEntity();
      entity.setText(UNIQUE_TEXT_2);
      session.persist(entity);

      throw new FileNotFoundException();
    }
コード例 #2
0
    public void runOperationInTxnThrowingChecked() throws IOException {
      assertTrue(session.getTransaction().isActive());
      JpaTestEntity entity = new JpaTestEntity();
      entity.setText(TRANSIENT_UNIQUE_TEXT);
      session.persist(entity);

      throw new IOException();
    }
コード例 #3
0
 public void runOperationInTxn() {
   assertTrue(session.getTransaction().isActive());
   JpaTestEntity entity = new JpaTestEntity();
   entity.setText(UNIQUE_TEXT);
   session.persist(entity);
 }