• Post Reply Bookmark Topic Watch Topic
  • New Topic

Better Authentication Method  RSS feed

 
Kurt McDermott
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to login from Adobe BlazeDS to my EJB. BlazeDS may or may not matter for my questions. BlazeDS has a POJO that references the EJB with InitialContext. The POJO gets the user name and password from the BlazeDS session variables that another method has set. The POJO calls login in the EJB and then a business method.

Can the EJB be stateless? I read that stateless EJBs cannot maintain state between method calls. Is there no state even if I call two business methods within the same POJO method? The POJO initializes the EJB during construction as an instance variable.

Is there an better alternative to my login mechanism? I don't think JAAS roles fit my needs, as I use user-based permissions. In my application, I need to check whether a user has been granted access to individual database rows.
 
Armindo Cachada
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I think it is ok to use BlazeDS for many things but not for login since you need to create a session object to store information about the user.
Why don't you just use HttpService for that? It should be straightforward.
Some info that you might find helpful:

http://simplyolaf.blogspot.com/2009/07/adobe-flex-with-struts-2-using.html
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!