Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 346334

Summary: Clean up and refactor runtime code
Product: z_Archived Reporter: Matt Heitz <mheitz>
Component: EDTAssignee: Matt Heitz <mheitz>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: jshavor
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Matt Heitz CLA 2011-05-18 15:52:06 EDT
Lots to do...these are only a few suggestions...

We generate Java enums for EGL enumerations, so the runtime should use enums for all enumerations.  For example, EDictionary's order should be an OrderingKind.  System enums like OrderingKind should be pre-generated, included in the runtime, and the generator should know not to generate it if it's used in a .egl file.

Get rid of RunUnit, Runtime, Loader.  Have no RunUnit at all, for SE use statics (MyLib.getInstance()) and for EE store things in the request scope...take JEE/EJB/LWI things out of classes like StartupInfo.  Replace SysLibJni with something that doesn't require JNI.
Comment 1 Matt Heitz CLA 2011-05-26 11:01:18 EDT
Also, don't pass the Executable to all the operation methods.  Only pass in what's needed.
Comment 2 Matt Heitz CLA 2011-06-08 12:57:48 EDT
I've removed ExecutableBase.ezeProgram and stopped passing an Executable to methods that don't need it.
Comment 3 Matt Heitz CLA 2011-06-17 17:14:45 EDT
I'm moving this out to Future since I8 has ended.  This is really too big for just one work item.  It should be broken into several pieces.

I started thinking about using static values for libraries and other resources that have been stored in a RunUnit in RBD.  These include file handles and many other things.  Tim wanted no RunUnit object, just static storage.  I can envision part of how that'll work in JSE.  For example, we can use singletons for libraries.  But with no central repository like a RunUnit it's hard to unload them: sure we can null out the singleton, but we cache the instance in each program that uses the library, how do we clear them?

And on the JEE side, Tim wanted store stuff in the request.  But I've heard it's a bad idea to store large amounts of data in a session or request.
Comment 4 Matt Heitz CLA 2011-08-26 14:42:20 EDT
Made JEE and JSE RunUnit classes, and a Runtime class to manage them.  For EE each Thread has its own RunUnit, and for SE there's one RunUnit per JVM.

I also removed more leftovers from RBD and things that support features not in EDT 0.7.