users@glassfish.java.net

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

From: Witold Szczerba <pljosh.mail_at_gmail.com>
Date: Tue, 5 Dec 2006 23:21:28 +0100

Well, as long as I can use Glassfish v2 with <callback-handler> it is
quite simple to provide my own login panel. What bothers me is how to
provide all the necessary information, so server could treat me as
logged in before asking application client to ask me for
user/password. I saw example in book:
"Mastering Enterprise JavaBeans 3.0"
by:

2006/12/5, Tim Quinn <Timothy.Quinn_at_sun.com>:
>
>
> Witold Szczerba wrote:
> > 2006/12/5, Tim Quinn <Timothy.Quinn_at_sun.com>:
> >>
> >>
> >>
> >> Witold Szczerba wrote:
> >>
> >
> > Yes, I saw that 'programmatic login' description, but for me this is
> > far, far more complicated than it should be; well I mean, why there is
> > need to write so many lines of code, to configure some 'policy' files
> > on the server itself, when all that is actually needed is to provide
> > username and password or something else inside some serializable
> > object... For me that should be something like one or two additional
> > lines of simple code, but it is not :/ That is what bothers me :) From
> > my point of view (which is in fact very limited) it is like doing
> > something very, very simple in very, very complicated way...
> I understand your frustration! Of course things would be much better if
> your callback handler were being invoked correctly, but even building a
> custom callback handler sounds like more work than you'd like to have to
> do. I have had on my to-do list for a while creating a sample callback
> handler that people could use as a starting point for their own. At
> least that might reduce the coding that individual developers would have
> to do to use a callback handler.
> >
> > And one thing about injection. You mentioned "if your app client uses
> > annotations...". Maybe you know why @EJB annotation based injection is
> > not working in application clients? Some time ago, I tried injecting
> > some @Resource, I can't remember what that was, but it worked well.
> > When I have added some @EJB public static field, all I got was null.
> > So, the only way I can get session bean is through Context which is
> > not what I really love, but couldn't figure out anything better :/
> > Some people say that injection is not working for Application Clients
> > that resides outside JEE server (like my client, using Java WebStart),
> > but I saw @Resource object injected on my own eyes. Why @EJB isn't
> > working that way as well?
> The ideal would be if you have a small example that shows the problem,
> please open a GlassFish issue and attach the sample app to the new
> issue. This ought to be working. One other thing you can try if you
> see problems when you launch the app client using Java Web Start is to
> start the client using the appclient script and see if the same problem
> occurs. This helps us know whether the problem is related to the Java
> Web Start support itself or is a more general app client issue.
>
> Thanks.
>
> - Tim
>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> > For additional commands, e-mail: users-help_at_glassfish.dev.java.net
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>