Examples of InitMethodMetaData


Examples of org.jboss.metadata.ejb.spec.InitMethodMetaData

      assertEquals(MyStatefulBean.class.getName(), preDestroy.getClassName());
      // @Init
      InitMethodsMetaData initMethods = bean.getInitMethods();
      assertNotNull(initMethods);
      assertEquals(1, initMethods.size());
      InitMethodMetaData initMethod = initMethods.get(0);
      assertEquals("init", initMethod.getBeanMethod().getMethodName());
      // @PostActivate
      LifecycleCallbacksMetaData postActivates = bean.getPostActivates();
      assertNotNull(postActivates);
      assertEquals(1, postActivates.size());
      LifecycleCallbackMetaData postActivate = postActivates.get(0);
View Full Code Here

Examples of org.jboss.metadata.ejb.spec.InitMethodMetaData

      assertEquals(Multiview21Remote.class.getName(), bean.getRemote());
      assertEquals(SetHelper.createSet(Multiview3Remote.class.getName()), bean.getBusinessRemotes());
      InitMethodsMetaData initMethods = bean.getInitMethods();
      assertNotNull(initMethods);
      assertEquals(1, initMethods.size());
      InitMethodMetaData initMethod = initMethods.get(0);
      assertEquals("create", initMethod.getBeanMethod().getMethodName());
   }
View Full Code Here

Examples of org.jboss.metadata.ejb.spec.InitMethodMetaData

/*     */   {
/*  57 */     Init init = (Init)this.finder.getAnnotation(method, Init.class);
/*  58 */     if (init == null) {
/*  59 */       return null;
/*     */     }
/*  61 */     InitMethodMetaData metaData = new InitMethodMetaData();
/*  62 */     NamedMethodMetaData beanMethod = new NamedMethodMetaData();
/*  63 */     metaData.setBeanMethod(beanMethod);
/*  64 */     NamedMethodMetaData createMethod = new NamedMethodMetaData();
/*  65 */     metaData.setCreateMethod(createMethod);
/*     */
/*  67 */     String alternativeName = init.value().length() > 0 ? init.value() : method.getName();
/*     */
/*  70 */     if (method.getDeclaringClass().isInterface())
/*     */     {
View Full Code Here

Examples of org.jboss.metadata.ejb.spec.InitMethodMetaData

/*  85 */     return metaData;
/*     */   }
/*     */
/*     */   public void process(SessionBeanMetaData bean, Method method)
/*     */   {
/*  90 */     InitMethodMetaData initMethod = create(method);
/*  91 */     if (initMethod == null) {
/*  92 */       return;
/*     */     }
/*  94 */     if (bean.getSessionType() != SessionType.Stateful) {
/*  95 */       throw new IllegalArgumentException("Init annotation is only valid on a stateful bean");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.