Package org.jboss.ejb3.aop.annotation

Examples of org.jboss.ejb3.aop.annotation.CachingAnnotationRepository.resolveAnnotation()


/*     */   public void start()
/*     */     throws Exception
/*     */   {
/* 104 */     super.start();
/* 105 */     EJBContainer statelessContainer = (EJBContainer)getContainer();
/* 106 */     LocalHome localHome = (LocalHome)statelessContainer.resolveAnnotation(LocalHome.class);
/* 107 */     if ((localHome != null) && (!bindHomeAndBusinessTogether(statelessContainer)))
/*     */     {
/* 109 */       Class[] interfaces = { localHome.value() };
/* 110 */       Object homeProxy = Proxy.newProxyInstance(getContainer().getBeanClass().getClassLoader(), interfaces, new StatelessLocalProxy(getContainer()));
/*     */
View Full Code Here


/*     */   public void stop()
/*     */     throws Exception
/*     */   {
/* 119 */     super.stop();
/* 120 */     EJBContainer statelessContainer = (EJBContainer)getContainer();
/* 121 */     LocalHome localHome = (LocalHome)statelessContainer.resolveAnnotation(LocalHome.class);
/* 122 */     if ((localHome != null) && (!bindHomeAndBusinessTogether(statelessContainer)))
/*     */     {
/* 124 */       Util.unbind(getContainer().getInitialContext(), ProxyFactoryHelper.getLocalHomeJndiName(getContainer()));
/*     */     }
/*     */   }
View Full Code Here

/*     */   protected HomeHandle getHomeHandle() {
/* 114 */     EJBContainer ejbContainer = this.container;
/*     */
/* 116 */     HomeHandleImpl homeHandle = null;
/*     */
/* 118 */     RemoteBinding remoteBindingAnnotation = (RemoteBinding)ejbContainer.resolveAnnotation(RemoteBinding.class);
/* 119 */     if (remoteBindingAnnotation != null) {
/* 120 */       homeHandle = new HomeHandleImpl(ProxyFactoryHelper.getHomeJndiName(this.container));
/*     */     }
/* 122 */     return homeHandle;
/*     */   }
View Full Code Here

/* 129 */     Class pkClass = Object.class;
/* 130 */     HomeHandleImpl homeHandle = null;
/*     */
/* 132 */     EJBContainer ejbContainer = this.container;
/*     */
/* 134 */     Remote remoteAnnotation = (Remote)ejbContainer.resolveAnnotation(Remote.class);
/* 135 */     if (remoteAnnotation != null)
/* 136 */       remote = remoteAnnotation.value()[0];
/* 137 */     RemoteHome homeAnnotation = (RemoteHome)ejbContainer.resolveAnnotation(RemoteHome.class);
/* 138 */     if (homeAnnotation != null)
/* 139 */       home = homeAnnotation.value();
View Full Code Here

/* 132 */     EJBContainer ejbContainer = this.container;
/*     */
/* 134 */     Remote remoteAnnotation = (Remote)ejbContainer.resolveAnnotation(Remote.class);
/* 135 */     if (remoteAnnotation != null)
/* 136 */       remote = remoteAnnotation.value()[0];
/* 137 */     RemoteHome homeAnnotation = (RemoteHome)ejbContainer.resolveAnnotation(RemoteHome.class);
/* 138 */     if (homeAnnotation != null)
/* 139 */       home = homeAnnotation.value();
/* 140 */     RemoteBinding remoteBindingAnnotation = (RemoteBinding)ejbContainer.resolveAnnotation(RemoteBinding.class);
/* 141 */     if (remoteBindingAnnotation != null) {
/* 142 */       homeHandle = new HomeHandleImpl(remoteBindingAnnotation.jndiBinding());
View Full Code Here

/* 135 */     if (remoteAnnotation != null)
/* 136 */       remote = remoteAnnotation.value()[0];
/* 137 */     RemoteHome homeAnnotation = (RemoteHome)ejbContainer.resolveAnnotation(RemoteHome.class);
/* 138 */     if (homeAnnotation != null)
/* 139 */       home = homeAnnotation.value();
/* 140 */     RemoteBinding remoteBindingAnnotation = (RemoteBinding)ejbContainer.resolveAnnotation(RemoteBinding.class);
/* 141 */     if (remoteBindingAnnotation != null) {
/* 142 */       homeHandle = new HomeHandleImpl(remoteBindingAnnotation.jndiBinding());
/*     */     }
/* 144 */     EJBMetaDataImpl metadata = new EJBMetaDataImpl(remote, home, pkClass, true, false, homeHandle);
/*     */
View Full Code Here

/*     */
/*     */   public void start() throws Exception
/*     */   {
/* 120 */     super.start();
/* 121 */     EJBContainer statelessContainer = (EJBContainer)getContainer();
/* 122 */     RemoteHome remoteHome = (RemoteHome)statelessContainer.resolveAnnotation(RemoteHome.class);
/* 123 */     if ((remoteHome != null) && (!bindHomeAndBusinessTogether(statelessContainer)))
/*     */     {
/* 125 */       Object homeProxy = createHomeProxy(remoteHome.value());
/* 126 */       String jndiName = ProxyFactoryHelper.getHomeJndiName(getContainer());
/*     */       try
View Full Code Here

/*     */   public void stop()
/*     */     throws Exception
/*     */   {
/* 144 */     super.stop();
/* 145 */     EJBContainer statelessContainer = (EJBContainer)getContainer();
/* 146 */     RemoteHome remoteHome = (RemoteHome)statelessContainer.resolveAnnotation(RemoteHome.class);
/* 147 */     if ((remoteHome != null) && (!bindHomeAndBusinessTogether(statelessContainer)))
/*     */     {
/* 149 */       Util.unbind(getContainer().getInitialContext(), ProxyFactoryHelper.getHomeJndiName(getContainer()));
/*     */     }
/*     */   }
View Full Code Here

      Method member = beanClass.getDeclaredMethod("sayHi", String.class);
      String annotation = "javax.interceptor.Interceptors";
      String value = "@javax.interceptor.Interceptors (value={" + DummyInterceptor.class.getName() + ".class})";
      repository.addAnnotation(member, annotation, value);
     
      Interceptors interceptors = (Interceptors) repository.resolveAnnotation(member, Interceptors.class);
      assertArrayEquals(new Class[] { DummyInterceptor.class }, interceptors.value());
   }
}
View Full Code Here

         throws Exception
   {
      String ejbName = ejbNames.get(ejbIndex);

      ConsumerContainer container = super.getConsumerContainer(ejbIndex, consumer);
      ConsumerImpl annotation = new ConsumerImpl((Consumer) container
            .resolveAnnotation(Consumer.class));

      container.setAssemblyDescriptor(dd.getAssemblyDescriptor());

      if (consumer != null && !isAnnotatedBean())
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.