You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Tomasz Skutnik <To...@e-point.pl> on 2002/09/03 09:13:05 UTC

Re: New Avalon application proposal

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jeff Turner wrote:
<snip>
|
| This is really cool :) Wheee..... Ant, Maven, starting instantly! Code
| and docs look very snazzy too. Top stuff :)
|
| Avalon dev people: if there's no objection, I'd like to add this to -apps
| (it's 300k)
|

:) Thanx

| Actually it was a PITA to get working, because at first I didn't realise
| you have to configure src/conf/*.properties files, and getting them wrong
| results in rather cryptic errors from Phoenix. I never did get Checkstyle
| working, and in the end just removed checkstyle.{conf,properties} from
| src/conf.
|

Just download Checkstyle distribution, unpack, and set 'checkstyle.home'
property pointing at that directory you've just unpacked into. I've
tested it with 2.4beta and everything worked fine. Drop me a note if
it's still a problem.

|
| There's one quite largish issue with Forehead. In
| ForeheadAppRunnerServer.java line 444, you create a new Forehead object:
|
| final Forehead forehead = new Forehead();
|

That's on purpose. I know the consequences. I'm working on it. Read
inside docs.

| Then Maven comes along and does:
|
| Forehead.getInstance().getClassLoader("root.maven")
|
| And throws a NPE, because getInstance() returns an unconfigured Forehead
| instance. Maven assumes that whatever configured Forehead, used it as a
| singleton and configured Forehead.getInstance().
|
| We can't just change the above line to:
|
| final Forehead forehead = Forehead.getInstance();
|
| because then we're reusing a single Forehead object for all hosted apps!
| So whichever initializes first will configure Forehead, and then all
| other apps die. In my case, Maven get configured first, and when I run
| Ant, Maven gets called and breaks.
|

That's Maven/Forehead fault. They're not written with server, but rather
command line environment in mind. Forehead uses thread-unsafe system
properties, ignores all external classloading issues, Maven makes
unnecessary assumptions about Forehead, etc. Read inside docs - I've
tried to explain the issue there. I can tweak class loaders, to make
every configured app see it's own, private, properly configured Forehead
instance, however I'd rather want to improve Forehead/Maven behaviour,
which seems quite easy. In addition it doesn't solve all problems (like
multithreading). I've asked about it and posted patch (to <bob (at)
eng.werken.com>, which is only mail contact I found on Forehead's web
page) to start discussion, but I haven't got any reply yet. So I'm still
waiting patiently - 5 days so far. Patching Maven seems even easier,
because last time I was looking at sources Maven used
Forehead.getInstance() method in only one place.

| I haven't sufficiently grokked appserver and forehead to figure out who's
| to blame. If Maven justified in assuming Forehead.getInstance() is
| configured?
|
| Anyway, very cool :)
|
|

Forehead/Maven are to blame (Forehead probably more). See above.

| --Jeff
|

<snip>

- --

Tomasz Skutnik, R&D Director, www.e-point.pl
tel +48 (22) 853 48 30, mob +48 501 555 705, fax +48 (22) 853 48 30
e-point S.A., ul. Filona 16, 02-658 Warsaw, Poland
PGP/GPG public key: http://scooter.ext.e-point.pl/tomasz.skutnik.gpg
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE9dGD+KoVCme/JcTgRAigYAJ0VRqF2TVCUnQsBzqnnam9cK7JLAgCfV0uh
1ERvnlKhnwjsRWiTUbz4IVE=
=Q1HD
-----END PGP SIGNATURE-----


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>