Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-13310

Issues with ejb-security quickstart

    XMLWordPrintable

    Details

      Description

      I am not able to run this quickstart successfully.

      I add the user.
      I configure the server.
      I deploy the quickstart.

      When I run 'mvn exec:exec' I see an exception in the console. I tracked that down to a misplaced ending bracket at this line:

      https://github.com/jbossas/eap-quickstarts/blob/7.x/ejb-security/src/main/java/org/jboss/as/quickstarts/ejb_security/RemoteClient.java#L50

      However, even when I move it past the lines that put out the nice message, it does not work.

      The server is throwing a 'Throwable' instead of an 'EJBAccessException', so for this to work, it has to catch a 'Throwable' :

              try {
                  hasAdminPermission = reference.administrativeMethod();
              } catch (EJBAccessException e) {
                  System.out.println("\nPrincipal has admin permission: " + hasAdminPermission);
                  System.out.println("\n\n* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\n\n");
              } catch (Throwable t) {
                  System.out.println("\nTHROWABLE! Principal has admin permission: " + hasAdminPermission);
                  System.out.println("\n\n* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *\n\n\n");
              }
      

      Should it be throwing an EJBAccessException instead of a throwable?

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              sguilhen Stefan Guilhen
              Reporter:
              sgilda Sande Gilda (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: