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 #416 (closed)

Opened 18 years ago

Closed 16 years ago

Race condition on `ServiceFactory.setUmask()`

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

Description

To set a umask for a particular call, one calls ServiceFactory.setUmask(Permissions). However, between calling SF.setUmask() and service.someMethod() another thread might reset the umask.

  • Document the need for synchronization, or
  • Change the method to ServiceFactory.setUmask( ServiceInterface, Permissions ) and handle the synchronization internally.

Change History (4)

comment:1 Changed 18 years ago by jmoore

  • Milestone changed from Unscheduled to 3.0-M4

Another option would be to use a PrincipalHolder rather than a Principal so that the threads don't compete.

It may also be necessary that new ServiceFactory() NOT return a static instance for similar reasons.

comment:2 Changed 18 years ago by jmoore

Should also provide a ServiceFactory.getUmask() method so that something of the form:

  Permissions oldPermissions = sf.getUmask();
  try {
      sf.setUmask(newPermissions);
      // do something
  } finally {
      if (sf!=null) sf.setUmask(oldPermissions);
  }

can be done.

comment:3 Changed 17 years ago by jmoore

  • Milestone changed from 3.0-Beta2 to 3.0-Beta3

This needs the new session management code: proposals/SessionsAndMessages

comment:4 Changed 16 years ago by jmoore

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

Merged into #864.

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.65349 sec.)

We're Hiring!