This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JBoss/WildFly and the fly likes Jboss5 EJB3 security just wouldn't work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Jboss5 EJB3 security just wouldn Watch "Jboss5 EJB3 security just wouldn New topic
Author

Jboss5 EJB3 security just wouldn't work

Mustafa Garhi
Ranch Hand

Joined: Nov 05, 2008
Posts: 111
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
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9912
    
158

See Q10 here http://community.jboss.org/wiki/SecurityFAQ

[My Blog] [JavaRanch Journal]
 
Don't get me started about those stupid light bulbs.
 
subject: Jboss5 EJB3 security just wouldn't work
 
Similar Threads
Why? null is not a common object,then what it is?
core java
Error while deplloying the application on JBoss.
JTable ClassCastException
how to compare if object exists in arraylist and add if doesn't