0 Replies Latest reply on Jan 10, 2005 6:23 PM by Victor Batista

    Optimized loading Without Transactions

    Victor Batista Newbie

      I have several SessionBean methods which retrieve lists os records from the DB. If I wan't these methods to have no transaction, how can I avoid the "performance penalty" referred on the book JBossCMP (Chapter 6->Optimized Loading->Transactions)?

      Book Excerpts:
      "The performance impact of running without a transaction will be demonstrated with an example
      similar to Listing 6-1. This example uses an on-find optimized query that selects the first four
      gangsters (to keep the result set small), and it is executed without a wrapper transaction. "

      "Normally this would be the only query executed, but since this code is not running in a
      transaction, all of the preloaded data is thrown away as soon as findAll returns. Then at Arrow 2
      JBossCMP executes the following four queries (one for each loop): 21..."

      How can I avoid this penalty on methods without Transactions?

      Thanks in advance,
      Victor Batista