• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Logging issues in web services

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an EJB web service (which uses @RolesAllowed on method level) and a RESTful web service on glassfish. I want to configure user authentication for both.

I want to log every every client calls into a log file. I want to log successful login, failed login and also log if the user is not authorized to call a specific EJB web service method based on the @RolesAllowed. What do I need to do for this?

I think there are two methodsto do this. Either I implement a custom realm in glassfish, but in that I don't know how I can log on the basis of @RolesAllowed. The other way is that if the user enters wrong login details, then she must be given access to my service as anonymous user and then I'll log the message in the service methods. What do you think about these approaches? Any other way to implement the login?

Any inputs are welcome.

Thank you for your time.
 
PI day is 3.14 (march 14th) and is also einstein's birthday. And this is merely a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic