• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Jboss5 EJB3 security just wouldn't work

 
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have been struggling to find an example on internet that depicts how Security works in an EJB 3 and Jboss 5 combination.

I went through a few and nothing makes the code work.

Here is what i have:

C:\_B\softwares\jboss-5.1.0.GA\server\default\conf\users.properties:

mush=mushmush
nanu=nanunanu

C:\_B\softwares\jboss-5.1.0.GA\server\default\conf\roles.properties:
mush=user
nanu=student

My Remote Session bean:


And the client code is here:



The above code results in Exception in thread "main" javax.ejb.EJBAccessException: Invalid User.

And surprisingly the result doesn't change when i provide nanu/nanunanu as the credentials.

When is this authentication happening? Before even contacting the SessionBean is my call. Probably while trying to lookUp() it goes to my SessionBean's metadata and checks that it is secured and never lets the client go ahead.

This is now forcing me to download glassfish and move ahead.

Let me know if i have missed a trick.

Thanks in advance
Asif
 
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
See Q10 here http://community.jboss.org/wiki/SecurityFAQ
 
reply
    Bookmark Topic Watch Topic
  • New Topic