Package javax.ejb

Examples of javax.ejb.EJBContext


      return principal;
   }

   public boolean isUserInRole(String role)
   {
      EJBContext ejbContext = getAttachment(EJBContext.class);
      boolean isUserInRole = ejbContext.isCallerInRole(role);
      return isUserInRole;
   }
View Full Code Here


/* 43 */     super(msgContext);
/*    */   }
/*    */
/*    */   public Principal getUserPrincipal()
/*    */   {
/* 48 */     EJBContext ejbContext = (EJBContext)getAttachment(EJBContext.class);
/* 49 */     Principal principal = ejbContext.getCallerPrincipal();
/* 50 */     return principal;
/*    */   }
View Full Code Here

/* 50 */     return principal;
/*    */   }
/*    */
/*    */   public boolean isUserInRole(String role)
/*    */   {
/* 55 */     EJBContext ejbContext = (EJBContext)getAttachment(EJBContext.class);
/* 56 */     boolean isUserInRole = ejbContext.isCallerInRole(role);
/* 57 */     return isUserInRole;
/*    */   }
View Full Code Here

/*     */   public Object invokeHome(Invocation mi)
/*     */     throws Exception
/*     */   {
/* 144 */     if (this.securityProxy != null)
/*     */     {
/* 146 */       EJBContext ctx = null;
/* 147 */       EnterpriseContext ectx = (EnterpriseContext)mi.getEnterpriseContext();
/* 148 */       if (ectx != null)
/* 149 */         ctx = ectx.getEJBContext();
/* 150 */       Object[] args = mi.getArguments();
/* 151 */       this.securityProxy.setEJBContext(ctx);
View Full Code Here

         // JAX-WS MessageContext
         BeanProperty beanProp = sbc.getWebServiceContextProperty();
         if (beanProp != null)
         {
            EJBContext ejbCtx = beanCtx.getEJBContext();           
            jaxwsContext.addAttachment(EJBContext.class, ejbCtx);
            beanProp.set(beanCtx.getInstance(), jaxwsContext);
         }
      }
View Full Code Here

                // lookup in enc
                MessageDrivenContext sctx = (MessageDrivenContext)ctx.lookup("java:comp/env/mdbcontext");
                Assert.assertNotNull("The MessageDrivenContext got from java:comp/env/mdbcontext is null", sctx );

                // lookup using global name
                EJBContext ejbCtx = (EJBContext)ctx.lookup("java:comp/EJBContext");
                Assert.assertNotNull("The MessageDrivenContext got from java:comp/EJBContext is null ", ejbCtx );

                // verify context was set via legacy set method
                Assert.assertNotNull("The MessageDrivenContext is null from setter method", mdbContext);
            } catch (Exception e){
View Full Code Here

                // lookup in enc
                MessageDrivenContext messageDrivenContext = (MessageDrivenContext)ctx.lookup("java:comp/env/mdbcontext");
                Assert.assertNotNull("The SessionContext got from java:comp/env/mdbcontext is null", messageDrivenContext );

                // lookup using global name
                EJBContext ejbCtx = (EJBContext)ctx.lookup("java:comp/EJBContext");
                Assert.assertNotNull("The SessionContext got from java:comp/EJBContext is null ", ejbCtx );

                // verify context was set via legacy set method
                Assert.assertNotNull("The MdbContext is null from setter method", mdbContext );
            } catch (Exception e){
View Full Code Here

         // JAX-WS MessageContext
         BeanProperty beanProp = sbc.getWebServiceContextProperty();
         if (beanProp != null)
         {
            EJBContext ejbCtx = beanCtx.getEJBContext();           
            jaxwsContext.addAttachment(EJBContext.class, ejbCtx);
            beanProp.set(beanCtx.getInstance(), jaxwsContext);
         }
      }
View Full Code Here

         // JAX-WS MessageContext
         BeanProperty beanProp = sbc.getWebServiceContextProperty();
         if (beanProp != null)
         {
            EJBContext ejbCtx = beanCtx.getEJBContext();           
            jaxwsContext.addAttachment(EJBContext.class, ejbCtx);
            beanProp.set(beanCtx.getInstance(), jaxwsContext);
         }
      }
View Full Code Here

         // JAX-WS MessageContext
         BeanProperty beanProp = sbc.getWebServiceContextProperty();
         if (beanProp != null)
         {
            EJBContext ejbCtx = beanCtx.getEJBContext();           
            jaxwsContext.addAttachment(EJBContext.class, ejbCtx);
            beanProp.set(beanCtx.getInstance(), jaxwsContext);
         }
      }
View Full Code Here

TOP

Related Classes of javax.ejb.EJBContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.