How to switch off pre-moderation of comments?
[Security & JAAS/JBoss] - IllegalStateException in EJB Tier on ctx.getCallerPrincipal
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > Java Programming > [Security & JAAS/JBoss] - IllegalStateExcepti­on in EJB Tier on ctx.getCallerPrinci­pal 7 March 2006 19:01:40

  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:

[Security & JAAS/JBoss] - IllegalStateExcepti­on in EJB Tier on ctx.getCallerPrinci­pal

Asylumx 7 March 2006 19:01:40
 Hello, I have posted a similar question on the ejb3 forum but the conversation there has lead me to believe this is a better place to address it.

Here is the situation:

I have a struts/EJB3 application. The user logs in through an HTML Form which is backed by j_security_check. The user is then able to see certain areas of the application based on their roles.

In the EJB tier, I need to do some filtering based on these user roles, so I call sessionContext.getC­allerPrincipal(). When this is called from the EJB tier (stateless session bean) it throws an illegal state exception, regardless of whether a user is logged in to the system or not.

This worked fine in EJB 2.1 but now that I'm migrating to EJB 3.0 it is not working. Some folks in the other forum mentioned that I may not have a LoginContext initialized but from what I've read, JBoss will set up a LoginContext for me when I use j_security_check.

I need to be able to call sessionContext.getC­allerPrincipal() from the session bean in order to limit data retrieval on the EJB side based on user privileges to enhance performance.

Thank you in advance for your consideration and assistance!

View the original post : http://www.jboss.co­m/index.html?module=­bb&op=viewtopic&p=39­28496#3928496

Reply to the post : http://www.jboss.co­m/index.html?module=­bb&op=posting&mode=r­eply&p=3928496


-------------------­--------------------­----------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.fa­lkag.net/sel?cmd=lnk­&kid=110944&bid=2417­20&dat=121642
Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > Java Programming > [Security & JAAS/JBoss] - IllegalStateExcepti­on in EJB Tier on ctx.getCallerPrinci­pal 7 March 2006 19:01:40

see also:
Select Query Help...
Crystal Report -> PHP4 / Report…
OpenSSL, PHP and MySQL
пройди тесты:
Do you really know yourself?
see also:
real ventures
sell electronic such as nokia n95,apple…
prist list of electronic

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .