← Prev in month ← Prev in thread
Next in thread → Next in month →

NEW ISSUE: @AllowsPassByReference requires more detailed description

From
Blohm, Henning <>
Date
2007-09-26T11:48:23+00:00
ID
Thread
NEW ISSUE: @AllowsPassByReference requires more detailed description
Title: NEW ISSUE: @AllowsPassByReference requires more detailed description

TARGET: 

Java Common Annotations and APIs specification, section "Java Annotations" / "@AllowsPassByReference"

DESCRIPTION: 

That section currently states the requirement that the callee must adhere to by-value semantics when indicating that a method of a remotable interface allows the optimization of by-reference parameter passing.

It lacks a descriptions of requirements on the caller to not modify a passed by-reference parameter during the execution of an @AllowsPassByReference method. Such concurrency situations may occur for example when

a) the caller is inherently multi-threaded and holds-on to parameters in concurrently executed threads

b) the caller is called back during an invocation of an @AllowsPassByReference method (which can happen in the same thread)

c) the @AllowsPassByReference method is in addition a @OneWay method (i.e. the caller will not wait for the completion of the actual service method)

PROPOSAL:

Discussions have not come to a conclusion so far. Here are some partial solutions and further proposals:

- allow @AllowsPassByReference for synchronous methods only (rules out problem c)

- put housekeeping responsibilities on the caller (i.e. simply be aware of of a)+b) ): promise to not change parameters between invocation and return of the method.
← Prev in month ← Prev in thread
Next in thread → Next in month →