Package javax.ejb

Examples of javax.ejb.LocalHome


            declaredMethods = javax.ejb.EJBObject.class.getMethods();
            for(Method declaredMethod : declaredMethods)
               virtualMethods.add(declaredMethod);
         }

         LocalHome localHome = getAnnotation(LocalHome.class);
         if (localHome != null)
         {
            Method[] declaredMethods = localHome.value().getMethods();
            for(Method declaredMethod : declaredMethods)
               virtualMethods.add(declaredMethod);

            declaredMethods = javax.ejb.EJBLocalObject.class.getMethods();
            for(Method declaredMethod : declaredMethods)
View Full Code Here


                    /*
                     * @LocalHome
                     */
                    if (remoteBean.getLocalHome() == null) {
                        LocalHome localHome = getInheritableAnnotation(clazz, LocalHome.class);
                        if (localHome != null) {
                            Class<?> homeClass = localHome.value();
                            try {
                                Method create = null;
                                for (Method method : homeClass.getMethods()) {
                                    if (method.getName().startsWith("create")) {
                                        create = method;
View Full Code Here

/* 43 */     super(finder);
/*    */   }
/*    */
/*    */   public void process(SessionBeanMetaData metaData, Class<?> type)
/*    */   {
/* 48 */     LocalHome annotation = (LocalHome)this.finder.getAnnotation(type, LocalHome.class);
/* 49 */     if (annotation == null) {
/* 50 */       return;
/*    */     }
/* 52 */     metaData.setLocalHome(annotation.value().getName());
/*    */   }
View Full Code Here

/* 335 */     return getBusinessInterfaces(beanClass.getSuperclass(), interfaces);
/*     */   }
/*     */
/*     */   public static Class<?> getLocalHomeInterface(Container container)
/*     */   {
/* 341 */     LocalHome li = (LocalHome)((EJBContainer)container).getAnnotation(LocalHome.class);
/* 342 */     if (li != null)
/* 343 */       return li.value();
/* 344 */     return null;
/*     */   }
View Full Code Here

/*     */   }
/*     */
/*     */   protected Class<?>[] getInterfaces()
/*     */   {
/*  57 */     EJBContainer statelessContainer = (EJBContainer)getContainer();
/*  58 */     LocalHome localHome = (LocalHome)statelessContainer.resolveAnnotation(LocalHome.class);
/*     */
/*  60 */     boolean bindTogether = false;
/*     */
/*  62 */     if ((localHome != null) && (bindHomeAndBusinessTogether(statelessContainer))) {
/*  63 */       bindTogether = true;
/*     */     }
/*     */
/*  66 */     Set localInterfaces = new HashSet();
/*  67 */     localInterfaces.addAll(Arrays.asList(ProxyFactoryHelper.getLocalAndBusinessLocalInterfaces(getContainer())));
/*     */
/*  70 */     ensureEjb21ViewComplete(localHome == null ? null : localHome.value(), ProxyFactoryHelper.getLocalInterfaces(getContainer()));
/*     */
/*  74 */     if (localInterfaces.size() > 0)
/*     */     {
/*  77 */       localInterfaces.add(JBossProxy.class);
/*     */
/*  80 */       if (bindTogether)
/*     */       {
/*  82 */         localInterfaces.add(localHome.value());
/*     */       }
/*     */
/*     */     }
/*     */     else
/*     */     {
View Full Code Here

/*     */   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()));
/*     */
/* 112 */       Util.rebind(getContainer().getInitialContext(), ProxyFactoryHelper.getLocalHomeJndiName(getContainer()), homeProxy);
/*     */     }
/*     */   }
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

/* 257 */           long hash = MethodHashing.methodHash(declaredMethods[i]);
/* 258 */           this.advisedMethods.put(hash, declaredMethods[i]);
/*     */         }
/*     */       }
/*     */
/* 262 */       LocalHome localHome = (LocalHome)resolveAnnotation(LocalHome.class);
/* 263 */       if (localHome != null)
/*     */       {
/* 265 */         Method[] declaredMethods = localHome.value().getMethods();
/* 266 */         for (int i = 0; i < declaredMethods.length; i++)
/*     */         {
/* 268 */           long hash = MethodHashing.methodHash(declaredMethods[i]);
/* 269 */           this.advisedMethods.put(hash, declaredMethods[i]);
/*     */         }
View Full Code Here

/*     */   }
/*     */
/*     */   protected Class<?>[] getInterfaces()
/*     */   {
/*  71 */     SessionContainer statefulContainer = (SessionContainer)getContainer();
/*  72 */     LocalHome localHome = (LocalHome)statefulContainer.resolveAnnotation(LocalHome.class);
/*     */
/*  74 */     boolean bindTogether = false;
/*     */
/*  76 */     if ((localHome != null) && (bindHomeAndBusinessTogether(statefulContainer))) {
/*  77 */       bindTogether = true;
/*     */     }
/*     */
/*  80 */     Set localInterfaces = new HashSet();
/*  81 */     localInterfaces.addAll(Arrays.asList(ProxyFactoryHelper.getLocalAndBusinessLocalInterfaces(getContainer())));
/*     */
/*  84 */     ensureEjb21ViewComplete(localHome == null ? null : localHome.value(), ProxyFactoryHelper.getLocalInterfaces(getContainer()));
/*     */
/*  88 */     localInterfaces.add(JBossProxy.class);
/*     */
/*  91 */     if (bindTogether)
/*     */     {
/*  93 */       localInterfaces.add(localHome.value());
/*     */     }
/*     */
/*  97 */     return (Class[])localInterfaces.toArray(new Class[0]);
/*     */   }
View Full Code Here

/* 118 */       namingException.setRootCause(e);
/* 119 */       throw namingException;
/*     */     }
/*     */
/* 122 */     SessionContainer statefulContainer = (SessionContainer)getContainer();
/* 123 */     LocalHome localHome = (LocalHome)((EJBContainer)getContainer()).resolveAnnotation(LocalHome.class);
/* 124 */     if ((localHome != null) && (!bindHomeAndBusinessTogether(statefulContainer)))
/*     */     {
/* 126 */       Class[] interfaces = { localHome.value() };
/* 127 */       Object homeProxy = Proxy.newProxyInstance(getContainer().getBeanClass().getClassLoader(), interfaces, new StatefulLocalHomeProxy(getContainer()));
/*     */
/* 129 */       Util.rebind(getContainer().getInitialContext(), ProxyFactoryHelper.getLocalHomeJndiName(getContainer()), homeProxy);
/*     */     }
/*     */   }
View Full Code Here

TOP

Related Classes of javax.ejb.LocalHome

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.