Forums Register Login

use acl or string comparision

+Pie Number of slices to send: Send
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
Did Steve tell you that? Fuh - Steve. Just look at this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 612 times.
Similar Threads
Help with exceptions
arraylist in ejb
validating user,password in ejb
defining static araylist in stateless session ejb
ejb error
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 02:19:52.