Object Teams Runtime Environment | |
The new byte code weaver, initially released with OTDT 2.3, has matured to the point where it is considered production-ready in 2.5. This weaver, called "Object Teams Dynamic Runtime Environment (OTDRE)", has two advantages over the traditional OTRE:
Maturity of the new weaver is witnessed by the fact that OTDT 2.5 in fact runs on this new runtime. Both weavers are supported by the compiler by generating specific infrastructure to be invoked from woven code. Due to the fundamental difference in weaving schemes, it is necessary to selected at compile time, which weaver should be targeted. Please see the section on target weaving schemes in the developers' guide. |
|
Tuning the weaver |
When per-thread activation of teams (§5.1.1) is used,
the runtime needs to be notified when new threads are started.
This happens by weaving into sub classes of
|
Define weavable regions |
Under OTDRE, every class in the system should be seen as the potential base class of some role to be loaded at runtime. It may be desirable to restrict this to specified "weavable code regions". Possible reasons include performance and protection (of sensitive code regions, e.g.). It is now possible to define such "weavable code regions" by providing a simple text file. Each line in this file will be interpreted as a prefix of class names (no support for wildcards at this point). A class whose fully qualified name matches one of these prefixes is weavable, all others cannot be woven into. The text file is announced to the runtime by providing its path in the file system as the value to the
system property |
Compiler | |
Preference UI for weaving scheme |
New UI is provided for selecting the weaving scheme: |
OT/Equinox | |
Use OTDRE by default |
When installing OT/Equinox (i.e., the plug-in |
Run / Debug | |
Auto-select weaver |
When launching an OT/Equinox-enabled application, the correct weaving scheme is now automatically selected by inspecting any OT/J projects involved in the launch. It is not necessary to explicitly pass any Object Teams specific arguments. For plain OT/J applications this was solved already in OTDT 2.3. |