1 Reply Latest reply on Jan 8, 2004 10:28 AM by Gary Kephart

    Catching LoginExceptions in a Swing client

    rikgibson Newbie


      Sort of following on from a recent thread, I'm endeavouring to use JAAS to log into JBoss (3.2.1) from a Swing client. I have the server configured to use a DatabaseLoginModule, with my app using a ClientLoginModule. Stuff seems to work as indicated in the earlier thread - the DB module gets invoked when an EJB is invoked, and if any credentials are wrong, back comes an exception.

      What I'd *like* to happen in the event of failure, is to be able to get a FailedLoginException back from LoginContext.login(), instead of it automatically succeeding and having to invoke an EJB method and getting a RemoteException[EJBException{SecurityException]] back - doesn't really lend itself to easily interpreting what went wrong and providing appropriate feedback.

      Is there any standard way of doing this using the prebuilt login modules, or am I going to have to code it myself?

      Rik Gibson