Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Bug #1164 (closed)

Opened 15 years ago

Closed 15 years ago

Executor.excute might need to work in separate thread

Reported by: jamoore Owned by: jamoore
Priority: critical Cc: atarkowska
Sprint: n.a.
Total Remaining Time: n.a.

Description

When an @Transactional doWork() method is inside of another @Transactional call, the Hibernate session can get confused about saving or not saving Event objects (error: ProperyValueAccess exception on Event.containingEvent)

Post #1158, this caused IShare.createShare() to break since it calls into @Transactional(readOnly=false) SessionManager methods.

Change History (3)

comment:1 Changed 15 years ago by jmoore

r3452 has an initial workaround.

comment:2 Changed 15 years ago by jmoore

  • Milestone changed from Unscheduled to OMERO-Beta4

See also r3631

comment:3 Changed 15 years ago by jmoore

  • Resolution set to fixed
  • Status changed from new to closed

r3789 contains an improved implementation with ExecutorService.submit(Callable). The idiom is:

  Future<Long> future = executor.submit(new Callable<Long>(){
     return new Long(1L);
  }
  // Some time later
  Long long = executor.get(future);

See #1201 for another concrete usage.

Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.61788 sec.)

We're Hiring!