Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

propogating security principals from web tier to EJB tier

Suresh Magi
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I was working with EJB and i had a basic doubt in security propogation from the web tier to EJB tier.

I deployed an EJB on JBOSS app server and in that bean i was trying to get the caller principal object from the EJBContext and i was printing the name of the principal.


then i created ordinary EJB client which is a java class and when i invoked the business method i was getting the below error

Exception in thread "main" javax.ejb.EJBException: java.lang.IllegalStateException: No valid security context for the caller identity
at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(

This error sounds meaningful but how will i set the security context from the java class. If it can be done then is this the same way that the security principal propogates from web tier to EJB tier. Whether "Realms" anywhere related to this topic or is it altogether a different topic?

Suresh B
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic