users@glassfish.java.net

Re: application-client.xml :: <callback-handler> ignores my class.

From: Witold Szczerba <pljosh.mail_at_gmail.com>
Date: Wed, 6 Dec 2006 23:03:55 +0100

2006/12/6, vince kraemer <Vince.Kraemer_at_sun.com>:
> This is a limitation outlined in the spec...
>
> I wish it was different. It isn't.
>
Hoooooooooly .... :) I have never got to that point in any
documentation. Thanks a lot for clarification.

> I have to trust that the folks that wrote the spec put the limitation in
> there for a reason that I haven't come to understand yet...

Well, interesting thing with that limitation in deed. Maybe they
wanted to avoid uncaught/unexpected problems during loading of
classes, as class loader would have introspect every single new class
and hold loading for the time needed by injection (injection of remote
resources is dangerous by itself).
In other words there would be no clear point for defining catches for
Naming/Network exceptions. That is what I think about that limitation
after thinking about it for a while...

So it looks like I should reserve a place in my Main class for every
possible bean injection and reference that beans as in my second
example, like:
Main.xyzSessionBean.doSomething()
in entire application. Actually id doesn't sound so bad... Don't you think?