Instead of doing string comparision in each of the methods in stateless session ejb how can i use acl.
Following is stateless session bean:
IN each of the method userid and password will be passed.
The value of userid and password will be same for all of the methods
I need to validate the userid and password passed in each of the methods to see it matches �xxx� and �yyy� respectively .
Could you please suggest what are the ways of checking the username and password.
I was thinking of doing string comparision in each of the methods.
If the user id is valid or not.
public class TestBean implements SessionBean {
private final static boolean VERBOSE = true;
private SessionContext ctx;
public void ejbActivate() {
}
public void ejbRemove() {
}
public void ejbPassivate() {
}
public void setSessionContext(SessionContext ctx) {
this.ctx = ctx;
}
public void ejbCreate() throws CreateException {
try {
InitialContext ic = new InitialContext();
} catch (NamingException ne) {
throw new CreateException("Failed to find environment value " + ne);
}
}
public String Testmethod1( String user_id, String password,String data���) {
�..
return �..
}
public String Testmethod2( String user_id, String password,String data���) {
�..
return �..
}
public String Testmethod3( String user_id, String password,String data���) {
�..
return �..
}
Thanks,
smita
Following is stateless session bean:
IN each of the method userid and password will be passed.
The value of userid and password will be same for all of the methods
I need to validate the userid and password passed in each of the methods to see it matches �xxx� and �yyy� respectively .
Could you please suggest what are the ways of checking the username and password.
I was thinking of doing string comparision in each of the methods.
If the user id is valid or not.
public class TestBean implements SessionBean {
private final static boolean VERBOSE = true;
private SessionContext ctx;
public void ejbActivate() {
}
public void ejbRemove() {
}
public void ejbPassivate() {
}
public void setSessionContext(SessionContext ctx) {
this.ctx = ctx;
}
public void ejbCreate() throws CreateException {
try {
InitialContext ic = new InitialContext();
} catch (NamingException ne) {
throw new CreateException("Failed to find environment value " + ne);
}
}
public String Testmethod1( String user_id, String password,String data���) {
�..
return �..
}
public String Testmethod2( String user_id, String password,String data���) {
�..
return �..
}
public String Testmethod3( String user_id, String password,String data���) {
�..
return �..
}
Thanks,
smita