|Re: Debug configurations and passing System properties to JET2 [message #54256 is a reply to message #54127]
||Tue, 16 December 2008 14:19
| Paul Elder
Registered: July 2009
There isn't a JET debugger, and there is no plan for this release (Galileo,
As for setting system properties, again, there is nothing in plan. Perhaps a
tag executed early in the main template would do the trick? Personally, I'm
reluctant to play with system properties (that is, widely known ones) in
Eclipse - I'm never sure of what the impact of such a change would have on
plug-ins I don't know about or understand.
I have considered letting users predefine JET variables in the launch
configuration. Would this meet your needs?
"Paul Hammond" <firstname.lastname@example.org> wrote in message
> I notice that although one can create a JET2 transformation in 'Run
> configurations', there is no such item in 'Debug configurations. Any plans
> for one or reasons there isn't one?
> Secondly, is there anyway that one can set Java System properties for any
> JET2 transformation?
> I guess one can manually set them in ones TagFactory (although this can be
> too late in some cases) but it would be nice to be able to define them in
> say a Run configuration or set them as part of the JET2 preferences.
|Re: Debug configurations and passing System properties to JET2 [message #54361 is a reply to message #54256]
||Tue, 16 December 2008 19:05
| Paul Hammond
Registered: July 2009
Re System properties, where I'm coming from is say an example like Java
logging. Supposing you want to control the configuration of the LogManager
via the system property java.util.logging.config.file, a reasonable thing
to want to do, right now you can't do this in JET.
Even if I explicitly set this configuration myself, how do I know that
either JET2 or some other third party lib has not already called
Logger.getLogger() and set up their Loggers with a configuration I don't
want to use.
At best I can call reset() on the LogManager somewhere, set the System
property and then use the readConfiguration to read in my own config , but
then I'm doing extra work and going around the standard way of doing
things, that sort of thing. Also any Loggers that have been statically
created before I do this won't change as their Handlers will be inside
them already created. It will only affect future Loggers I create etc.
One may have many third party libraries in ones tags etc that have to run
in the JET plugin, and may absolutely require System properties to be set.
Applications like Tomcat for instance allow this when deploying ones
webapps. JET2 in a way, is kind of like a container, but for custom tags
rather than webapps.
In terms of your reluctance, I understand where you're coming from, but
there's a side where you can take the assumption that people know what
they're doing if they set these properties. If they don't, then they will
pay the ultimate penalty when their program doesn't work.
Setting System properties is a key standard part of Java and not I think a
bad thing in and of itself, so I think there's a reasonable case to
support it in something like JET where you have users interfacing in their
own code and needing to configure standard libraries in a standard way.
Have I persuaded you at all?
Powered by FUDForum
. Page generated in 0.01994 seconds