[otj-users] OTJ-Issues
Oliver Neumann
1beast at web.de
Fri Jul 21 09:29:42 CEST 2006
Hello there,
i got some issues with OTJ. Im using the JARs of the latest
eclipse-otdt-0.9.10 (not 0.9.12) within a tool outside of eclipse. The
necessary jars are within the classpath and i use the tool to download
aspectcode from a db and to compile these locally. After the build is start
annoher tool which gets extended by the teams.
1. Problem - Builder
All works fine most of the time but sometimes the compilation fails because
he didn't generated some class-files. Namely the missing ones are
CompiereTeam$__OT__Confined.class
CompiereTeam$Confined.class
CompiereTeam$IConfined.class
CompiereTeam$ILowerable.class
where CompiereTeam is the teamclass. These files are missing for every
generated team, not just one. The CompiereTeam.java is fine as he is able to
comile it most of the times. The compilation is done by the following line
within my tool:
org.eclipse.jdt.internal.compiler.batch.Main.compile("-nowarn -classpath " +
srcHome + ";" +classpath+ " " + filepath);
srcHome = Home of the source-files
classpath = The classpath
filepath = Path of the file to compile
As these files are missed he cant run the application and i need to restart
the build process. In general it works at least for the second time but its
not practical if you need to restart the process twice for sure. As a
workaround im about to implement a check within the builder that regenerates
the classes automatically if he doesnt find one of these files - but its
just a workaround. Oh and the generated class-files of the previous-build
are getting deleted everytime before the builder starts his work so the
preconditions ( in the way of available files) for the builder are the same
on each new start.
2. Problem - Team activation
I have several teamclasses which should be activated in the destination
application. Its all working like it should if i use the OT-Configfile to
activate them with the -Dot.teamconfig=%CONFIG_FILE% parameter. But now i'd
like to use the dynamic Team-activation/deactivation. For this i wrote a
thread which run-method gets called by a timer continuesly. Each of the
teamclasses is generated once by:
Class teamC = Class.forName(teamClassName);
Object obj = teamC.newInstance();
The instantiated teamclass is stored within a list. On each run-cycle i
check if each of these teamclasses should be active or not and i
(de)actiavtion them by:
theTeam.activate(Team.ALL_THREADS);
theTeam.deactivate(Team.ALL_THREADS);
This is working good for many teams but not for all. Some just dont get
activated like they do with the config-file. Well i think its a great
feature of OT and thus i'd like to have it running - but till now i cant use
it :/
Does anyone knows one of the issue or a solution for them ?
Any help is appreciated...
best regards,
Oliver
More information about the otj-users
mailing list