Package org.jboss.ejb3.session

Examples of org.jboss.ejb3.session.SessionContainer


   }
  
   protected void validateEjb21Views()
   {
      // Obtain Container
      SessionContainer container = this.getContainer();
     
      // Obtain @LocalHome
      LocalHome localHome = container.getAnnotation(LocalHome.class);

      // Ensure that if EJB 2.1 Components are defined, they're complete
      this.validateEjb21Views(localHome == null ? null : localHome.value(), ProxyFactoryHelper
            .getLocalInterfaces(container));
View Full Code Here


               + getContainer().getInitialContext().getNameInNamespace() + "/" + jndiName + PROXY_FACTORY_NAME);
         namingException.setRootCause(e);
         throw namingException;
      }

      SessionContainer statefulContainer = (SessionContainer) getContainer();
      LocalHome localHome = this.getContainer().getAnnotation(LocalHome.class);
      if (localHome != null && !bindHomeAndBusinessTogether())
      {
         Class<?>[] interfaces =
         {localHome.value()};
         Object homeProxy = java.lang.reflect.Proxy.newProxyInstance(statefulContainer.getBeanClass().getClassLoader(),
               interfaces, new StatefulLocalHomeProxyInvocationHandler(statefulContainer));
         Util.rebind(statefulContainer.getInitialContext(), ProxyFactoryHelper.getLocalHomeJndiName(statefulContainer),
               homeProxy);
      }
   }
View Full Code Here

   public void stop() throws Exception
   {
      super.stop();
      Util.unbind(getContainer().getInitialContext(), jndiName + PROXY_FACTORY_NAME);
      SessionContainer statefulContainer = this.getContainer();
      LocalHome localHome = this.getContainer().getAnnotation(LocalHome.class);
      if (localHome != null && !bindHomeAndBusinessTogether())
      {
         Util.unbind(statefulContainer.getInitialContext(), ProxyFactoryHelper.getLocalHomeJndiName(statefulContainer));
      }
   }
View Full Code Here

      }
   }

   public Object createProxyBusiness()
   {
      SessionContainer sfsb = (SessionContainer) getContainer();
      Object id = sfsb.createSession();
      return this.createProxyBusiness(id);
   }
View Full Code Here

            .constructEjb21Proxy(proxy);
   }

   public Object createProxy(Class<?>[] initTypes, Object[] initValues)
   {
      SessionContainer sfsb = (SessionContainer) getContainer();
      Object id = sfsb.createSession(initTypes, initValues);
      return this.createProxy(id, SpecificationInterfaceType.EJB30_BUSINESS, null);
   }
View Full Code Here

      return this.createProxy(id, SpecificationInterfaceType.EJB30_BUSINESS, null);
   }

   public Object createProxyEjb21(Class<?>[] initTypes, Object[] initValues, String businessInterfaceType)
   {
      SessionContainer sfsb = (SessionContainer) getContainer();
      Object id = sfsb.createSession(initTypes, initValues);
      return this.createProxyEjb21(id, businessInterfaceType);
   }
View Full Code Here

      assert beanContext != null : "beanContext is null";
      assert businessInterface != null : "businessInterface is null";
     
      StatefulBeanContext ctx = (StatefulBeanContext) beanContext;
     
      SessionContainer container = ctx.getContainer();
      assert container == this : "beanContext not of this container (" + container + " != " + this + ")";
     
      boolean isRemote = false;
      boolean found = false;
      Class[] remoteInterfaces = ProxyFactoryHelper.getRemoteAndBusinessRemoteInterfaces(this);
View Full Code Here

         container = Ejb3Registry.getClusterContainer(containerClusterUid);
      
      if (container == null)
         throw new EJBException("Invalid (i.e. remote) invocation of local interface (null container) for " + containerGuid);
  
      SessionContainer sfsb = (SessionContainer)container;
      return sfsb.localInvoke(id, method, args, (FutureHolder) provider);
   }
View Full Code Here

  
   @Override
   protected final void validateEjb21Views()
   {
      // Obtain Container
      SessionContainer container = this.getContainer();
     
      // Obtain @RemoteHome
      RemoteHome remoteHome = container.getAnnotation(RemoteHome.class);

      // Ensure that if EJB 2.1 Components are defined, they're complete
      this.validateEjb21Views(remoteHome == null ? null : remoteHome.value(), ProxyFactoryHelper
            .getRemoteInterfaces(container));
   }
View Full Code Here

   }

   public Object invoke(Object proxy, Method method, Object[] args)
           throws Throwable
   {
      SessionContainer sfsb = (SessionContainer) getContainer();
      return sfsb.localHomeInvoke(method, args);
   }
View Full Code Here

TOP

Related Classes of org.jboss.ejb3.session.SessionContainer

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.