Project

General

Profile

Bug #9819

SESSION:FIRST-ASYNC-REQUEST and SESSION:LAST-ASYNC-REQUEST

Added by Constantin Asofiei over 1 year ago. Updated about 1 year ago.

Status:
WIP
Priority:
Normal
Assignee:
Target version:
-
Start date:
Due date:
% Done:

70%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
reviewer:
production:
No
env_name:
topics:

History

#2 Updated by Constantin Asofiei over 1 year ago

  • Assignee set to Eduard Soltan

These LAST/FIRST-ASYNC-REQUEST attributes are currently supported in FWD only in for the SERVER handle. This is undocumented, and looks like it also is supported at the SESSION.

For conversion, what needs to be done:
  • extract the getFirstAsyncRequest and getLastAsyncRequest methods from p2j.util.Server into another interface
  • change SessionUtils to implement this interface
  • in handle, add specific unwrap method for this interface
  • in methods_attributes.rules, fix conversion to emit proper unwrap (for server), and emit proper Java methods for SESSION handle

The test is:

def var h as handle.
message h:FIRST-ASYNC-REQUEST.
message SESSION:FIRST-ASYNC-REQUEST.
message h:LAST-ASYNC-REQUEST.
message SESSION:LAST-ASYNC-REQUEST.

#3 Updated by Eduard Soltan over 1 year ago

Constantin Asofiei wrote:

These LAST/FIRST-ASYNC-REQUEST attributes are currently supported in FWD only in for the SERVER handle. This is undocumented, and looks like it also is supported at the SESSION.

For conversion, what needs to be done:
  • extract the getFirstAsyncRequest and getLastAsyncRequest methods from p2j.util.Server into another interface
  • change SessionUtils to implement this interface

I see that in SessionUtils all methods are static. In case it will implement an interface should make getFirstAsyncRequest and getLastAsyncRequest non-static methods.
And SessionUtil.getFirstAsyncRequest and SessionUtil.getLastAsyncRequest could not be emitted.

#4 Updated by Constantin Asofiei over 1 year ago

Eduard Soltan wrote:

I see that in SessionUtils all methods are static. In case it will implement an interface should make getFirstAsyncRequest and getLastAsyncRequest non-static methods.

No, register the interface to asHandle. The methods will be static in SessionUtils.

#5 Updated by Eduard Soltan over 1 year ago

Added conversion support on 9819a, rev. 15806.

#6 Updated by Constantin Asofiei over 1 year ago

Review for 9819a rev 15806:
  • SessionUtils
    • return (handle) handle.UNKNOWN_ARGUMENT; is not OK - you need to return new handle().
  • AsyncRequestAttributes
    • please fix the history entry and copyright year
    • the javadoc is wrong, this is not only for SESSION, is also for Server handle

#7 Updated by Eduard Soltan over 1 year ago

Constantin Asofiei wrote:

Review for 9819a rev 15806:
  • SessionUtils
    • return (handle) handle.UNKNOWN_ARGUMENT; is not OK - you need to return new handle().
  • AsyncRequestAttributes
    • please fix the history entry and copyright year
    • the javadoc is wrong, this is not only for SESSION, is also for Server handle

Fixed review issues and changed the copyright year of all modified files.

#8 Updated by Eduard Soltan over 1 year ago

Constantin, should I perform a conversion of a large GUI application overnight as a regression test?

I have made conversion of Regression test project, and it went fine.

#9 Updated by Constantin Asofiei over 1 year ago

Eduard Soltan wrote:

Constantin, should I perform a conversion of a large GUI application overnight as a regression test?

I have made conversion of Regression test project, and it went fine.

Go ahead.

#10 Updated by Eduard Soltan over 1 year ago

I had a problem with my workstation and had to redo the conversion. I performed the conversion with 9818a of a large GUI application, and there are no conversion difference.

#11 Updated by Constantin Asofiei over 1 year ago

  • Status changed from New to Merge Pending
  • % Done changed from 0 to 100

Please merge after 9773a.

#12 Updated by Constantin Asofiei over 1 year ago

Actually 9773a is in trunk, please merge now.

#13 Updated by Eduard Soltan over 1 year ago

9819a was merged to trunk rev. 15831 and archived.

#14 Updated by Constantin Asofiei over 1 year ago

  • Status changed from Merge Pending to Closed

#15 Updated by Constantin Asofiei over 1 year ago

  • % Done changed from 100 to 70
  • Status changed from Closed to WIP

Placing back in WIP, the runtime for these SESSION attributes needs to be implemented.

#16 Updated by Constantin Asofiei about 1 year ago

I can not make SESSION:FIRST/LAST-ASYNC-REQUEST to return anything else other than unknown with 11.7:
  • start program:
    def var h as handle.
    def var ha as handle.
    
    procedure procAsync.
       message "a server" h:first-async-request h:last-async-request.
       message "a session" session:first-async-request session:last-async-request.
       pause 1.
    end.
    
    create server h.
    // message h:connect("-AppService catest -sessionModel Session-free").
    message h:connect("-URL http://localhost:8810/apsv -sessionModel Session-free"). // change this to have a PASOE connection
    run a.p on server h asynchronous set ha event-procedure "procAsync".
    message "b server" h:first-async-request h:last-async-request.
    message "b session" session:first-async-request session:last-async-request.
    wait-for procedure-complete of ha.
    message h:disconnect().
    delete object h.
    
  • a.p
    message "a session" session:first-async-request session:last-async-request view-as alert-box.
    
    message "running" view-as alert-box .
    pause 4.
    
    

Eduard, please try to run the above test with 12.8 OpenEdge.

#17 Updated by Eduard Soltan about 1 year ago

Do I have the change message h:connect("-URL http://localhost:8810/apsv -sessionModel Session-free"). the connection string somehow?

#18 Updated by Constantin Asofiei about 1 year ago

Eduard Soltan wrote:

Do I have the change message h:connect("-URL http://localhost:8810/apsv -sessionModel Session-free"). the connection string somehow?

If you want to run in OE, yes. Otherwise, for FWD, it depends on how your directory.xml app_services is configured.

Also available in: Atom PDF