[jboss-user] [EJB/JBoss] - Re: How to get the current user in a SessionBean from the Se

jaikiran do-not-reply at jboss.com
Tue Apr 8 08:13:28 EDT 2008


"beherenow" wrote : That's right but..
  | 
  | How do you get the current sessionContext?

There's a callback method setSessionContext which gets called by the container. See this for more details http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/ejb/SessionBean.html#setSessionContext(javax.ejb.SessionContext)

You can use this method to store the sessionContext:

private SessionContext sessionContext;
  | public void setSessionContext(SessionContext sessCtx) {
  |  this.sessionContext = sessCtx;
  | }

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142333#4142333

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4142333



More information about the jboss-user mailing list