users@glassfish.java.net

Re: My own GUI Login Dialog

From: <glassfish_at_javadesktop.org>
Date: Tue, 08 May 2007 05:11:35 PDT

Miro,

The Java EE specification chapter EE 9 discusses application clients and describes how you can implement javax.security.auth.callback.CallbackHandler with your own class. It also includes schema for the application-client.xml descriptor which is where you specify which class should be used to collect that information.

You can also look in the GlassFish documentation, in particular the Developers Guide: https://glassfish.dev.java.net/nonav/javaee5/docs/AS91DG.pdf

Look in this section:

Developing Applications and Application Components->Developing Java Clients.

Note that the app client container can request the user for the login information in two cases: In the process of contacting a guarded EJB and also just prior to dependency injection. So, if you use annotations in your app client to refer to guarded EJBs in the server your implementation of javax.security.auth.callback.CallbackHandler will be used even before your main program is executed.

NetBeans should provide a convenient way to specify which class in your client implements this interface and should build that into the descriptor for you.

- Tim
[Message sent by forum member 'tjquinn' (tjquinn)]

http://forums.java.net/jive/thread.jspa?messageID=215976