[JBoss Seam] - EL enhancement failing if Scope is not Session
by kevin.genie
Hello:
The EL enhancement for passing parameters is not working for me if the scope of the component in which the Datamodel is declared is not Session. As in Booking example, I have a Search page with a datatable with value binding to a datamodel declared in SFSB with Session Scope. In the datatable, i have an s:link with enhanced EL expression to select the current row.
This worked fine for me until I changed the Scope of the SFSB to Conversation. When i changed the scope, the passed parameter is always null. The DataModel does not have any Scope annotation and there is no Factory method also. ( I have followed the Booking Search and Select example.) . Am I missing something or is this a limitation with EL enhancement/Datemodel Selection ?
Thanx
Kevin.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993392#3993392
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993392
19 years, 4 months
[Security & JAAS/JBoss] - JBoss with JAAS
by riteshpandey
Hi
I am securing my application with JAAS. But I am not being able to get the role of a user who is loggin.
My code is as follows.
............................
precad {
org.jboss.security.ClientLoginModule required;
};
..................
login-config.xml
<application-policy name = "precad">
<login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"
flag = "required">
<module-option name = "unauthenticatedIdentity">guest</module-option>
<module-option name = "dsJndiName">java:/MySqlDS</module-option>
<module-option name = "principalsQuery">SELECT PASSWD FROM USERS WHERE USERID=?</module-option>
<module-option name = "rolesQuery">SELECT ROLEID, 'Roles' FROM ROLES WHERE USERID=?</module-option>
</login-module>
</application-policy>
..............
client class is....
LoginContext lc = new LoginContext(PRECAD_LOGIN_CONTEXT,
new DialogCallbackHandler());
// attempt authentication
lc.login();
// TODO Call a user session bean instead!!!
//Subject subject = lc.getSubject();
Subject subject = lc.getSubject();
getProcessRemote().login();
where getProcessRemote is for Remote interface of stateless session bean.
...................
and sessionn bean is
public class UserProcessBean implements UserProcessRemote{
SessionContext sescont;
@PersistenceContext(unitName = "precad")
// private EntityManager manager;
//private static Logger logger = Logger.getLogger(UserProcessBean.class);
@SuppressWarnings("unchecked")
@RolesAllowed({"administrator","developer"})
public void login(/*Subject subject*/) throws UserProcessException {
try {
System.out.println("In SERVER LOGIN..............");
}
catch(Exception e){e.printStackTrace();}
I am using ejb3.
and I want that as a user login then my getProcessRemote.login() should return the role of this user. But I do not know that how to do it.
Please help me.
/Ritesh
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3993390#3993390
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3993390
19 years, 4 months