• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

EJB 3.0: Defining user roles

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I have a bit of confusion in defining the user roles in an ejb application. I got a sample code from the book 'EJB 3 in action'



My doubt is how to associate the roles 'BIDDER','CSR' AND 'ADMIN' shown above?
I mean where to define the mapping for these roles?

Can someone please help?

Thanks
 
author & internet detective
Posts: 42148
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This tends to be application server specific and go in a vendor defined xml file. What app server are you using?
 
anand tiwari
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using JBoss application server.Can you please tell in which xml file the entires will go if i want to define the user roles??
 
Jeanne Boyarsky
author & internet detective
Posts: 42148
937
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I haven't used JBoss specifically. Let's move this to the JBoss forum where someone is more likely to know.
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anand,

Which is the login module that you are using with the bean? Each login module has its own way of defining roles. For UserRolesLoginModule, which relies on properties files (users.properties and roles.properties), the roles can be mentioned as below:

roles.properties:
----------------

#username=rolename
myname=ADMIN
someone=BIDDER
otherguy=CSR



where myname, someone, otherguy are the names of the individuals and ADMIN, BIDDER, CSR are the roles.

Here is an good wiki article about UsersRolesLoginModule in JBoss.
 
reply
    Bookmark Topic Watch Topic
  • New Topic