1 22 23 29 30 package org.jboss.test.security.clientlogin; 31 32 import java.security.Principal ; 33 import javax.ejb.SessionBean ; 34 import javax.ejb.SessionContext ; 35 36 42 public class BeanC implements SessionBean 43 { 44 private SessionContext context; 45 46 public void ejbCreate() 47 { 48 } 49 50 public void ejbActivate() 51 { 52 } 53 54 public void ejbPassivate() 55 { 56 } 57 58 public void ejbRemove() 59 { 60 } 61 62 public void setSessionContext(SessionContext context) 63 { 64 this.context = context; 65 } 66 67 public Principal callBeanAsClientLoginUser() 68 { 69 Principal caller = context.getCallerPrincipal(); 70 return caller; 71 } 72 public Principal callTarget() 73 { 74 Principal caller = context.getCallerPrincipal(); 75 return caller; 76 } 77 78 } 79 | Popular Tags |