Examples of CciTemplate


Examples of org.springframework.jca.cci.core.CciTemplate

    given(connectionFactory.getConnection()).willReturn(connection);
    given(connection.createInteraction()).willReturn(interaction);
    given(interaction.execute(interactionSpec, inputOutputRecord, inputOutputRecord)).willReturn(true);

    CciTemplate ct = new CciTemplate(connectionFactory);
    ct.execute(interactionSpec, inputOutputRecord, inputOutputRecord);

    verify(interaction).execute(interactionSpec, inputOutputRecord, inputOutputRecord);
    verify(interaction).close();
    verify(connection).close();
  }
View Full Code Here

Examples of org.springframework.jca.cci.core.CciTemplate

    given(connectionFactory.getConnection()).willReturn(connection);
    given(connection.createInteraction()).willReturn(interaction);
    given(interaction.execute(interactionSpec, inputOutputRecord)).willReturn(null);

    CciTemplate ct = new CciTemplate(connectionFactory);
    Record tmpOutputRecord = ct.execute(interactionSpec,
        inputOutputRecord);
    assertNull(tmpOutputRecord);

    verify(interaction).execute(interactionSpec, inputOutputRecord);
    verify(interaction).close();
View Full Code Here

Examples of org.springframework.jca.cci.core.CciTemplate

    tt.execute(new TransactionCallbackWithoutResult() {
      @Override
      protected void doInTransactionWithoutResult(TransactionStatus status) {
        assertTrue("Has thread connection", TransactionSynchronizationManager.hasResource(connectionFactory));
        CciTemplate ct = new CciTemplate(connectionFactory);
        ct.execute(interactionSpec, record, record);
      }
    });

    verify(localTransaction).begin();
    verify(interaction).close();
View Full Code Here

Examples of org.springframework.jca.cci.core.CciTemplate

    try {
      tt.execute(new TransactionCallback<Void>() {
        @Override
        public Void doInTransaction(TransactionStatus status) {
          assertTrue("Has thread connection", TransactionSynchronizationManager.hasResource(connectionFactory));
          CciTemplate ct = new CciTemplate(connectionFactory);
          ct.execute(interactionSpec, record, record);
          throw new DataRetrievalFailureException("error");
        }
      });
    }
    catch (Exception ex) {
View Full Code Here

Examples of org.springframework.jca.cci.core.CciTemplate

   * @param connectionFactory the CCI ConnectionFactory to create a CciTemplate for
   * @return the new CciTemplate instance
   * @see #setConnectionFactory(javax.resource.cci.ConnectionFactory)
   */
  protected CciTemplate createCciTemplate(ConnectionFactory connectionFactory) {
    return new CciTemplate(connectionFactory);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.