Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
pmuir committed Jun 16, 2010
1 parent 1e9781b commit 1da17bf
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -158,6 +158,7 @@ public List<CodeFragment> getRecentCodeFragments()
* modify returned Codes without affecting database (when we call this
* function from another session bean
*/

@TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)
public List<CodeFragment> searchCodeFragments(CodeFragment code, int page, QueryInfo info)
{
Expand Down Expand Up @@ -205,6 +206,8 @@ public List<CodeFragment> searchCodeFragments(CodeFragment code, int page, Query
int allRecords = q.getResultList().size();
q.setFirstResult(page * PAGE_SIZE);
q.setMaxResults(PAGE_SIZE);

@SuppressWarnings("unchecked")
List<CodeFragment> codes = q.getResultList();

info.setPage(page);
Expand Down

0 comments on commit 1da17bf

Please sign in to comment.