Package org.jboss.ejb3.session

Examples of org.jboss.ejb3.session.SessionContainer


      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


      Invocation copy = (Invocation) new MarshalledObjectForLocalCalls(invocation).get();
      copy.getMetaData().addMetaData(IS_LOCAL, IS_LOCAL, Boolean.TRUE, PayloadKey.AS_IS);
      org.jboss.aop.joinpoint.InvocationResponse response = null;

      // Invoke upon the container
      SessionContainer sc = (SessionContainer) container;
      response = sc.dynamicInvoke(copy);
     
      Map contextInfo = response.getContextInfo();
      if (contextInfo != null)
      {
         MarshalledObjectForLocalCalls wrappedException = (MarshalledObjectForLocalCalls) response.getContextInfo().get(IS_LOCAL_EXCEPTION);
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

      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

      throw new RuntimeException("IMPROPER USAGE");
   }

   public Object createPerClass(Advisor advisor)
   {
      SessionContainer container = (SessionContainer) advisor;
      return new ReplicantsManagerInterceptor(container.getClusterFamilies());
   }
View Full Code Here

      this.binding = binding;
   }

   protected Class<?>[] getInterfaces()
   {    
      SessionContainer statefulContainer = (SessionContainer) getContainer();
      RemoteHome remoteHome = (RemoteHome) statefulContainer.resolveAnnotation(RemoteHome.class);

      boolean bindTogether = false;

      if (remoteHome != null && bindHomeAndBusinessTogether(statefulContainer))
         bindTogether = true;
View Full Code Here

         throw namingException;
      }
      assert !Dispatcher.singleton.isRegistered(targetId) : targetId + " is already registered";
      Dispatcher.singleton.registerTarget(targetId, this);

      SessionContainer statefulContainer = (SessionContainer) getContainer();
      RemoteHome remoteHome = (RemoteHome) statefulContainer.resolveAnnotation(RemoteHome.class);
      if (remoteHome != null && !bindHomeAndBusinessTogether(statefulContainer))
      {
         Object homeProxy = createHomeProxy(remoteHome.value());
         String homeJndiName = ProxyFactoryHelper.getHomeJndiName(getContainer());
         log.debug("Binding home proxy at " + homeJndiName);
View Full Code Here

   public void stop() throws Exception
   {
      Util.unbind(getContainer().getInitialContext(), jndiName + PROXY_FACTORY_NAME);
      Dispatcher.singleton.unregisterTarget(getTargetId());
     
      SessionContainer statefulContainer = (SessionContainer) getContainer();
      RemoteHome remoteHome = (RemoteHome) statefulContainer.resolveAnnotation(RemoteHome.class);
      if (remoteHome != null && !bindHomeAndBusinessTogether(statefulContainer))
      {
         Util.unbind(getContainer().getInitialContext(), ProxyFactoryHelper.getHomeJndiName(getContainer()));
      }
      super.stop();
View Full Code Here

      super(container, binding.jndiBinding());
   }

   protected Class<?>[] getInterfaces()
   {     
      SessionContainer statefulContainer = (SessionContainer) getContainer();
      LocalHome localHome = (LocalHome) statefulContainer.resolveAnnotation(LocalHome.class);

      boolean bindTogether = false;

      if (localHome != null && bindHomeAndBusinessTogether(statefulContainer))
         bindTogether = true;
View Full Code Here

         NamingException namingException = new NamingException("Could not bind stateful local proxy with ejb name " + getContainer().getEjbName() + " into JNDI under jndiName: " + getContainer().getInitialContext().getNameInNamespace() + "/" + jndiName + PROXY_FACTORY_NAME);
         namingException.setRootCause(e);
         throw namingException;
      }

      SessionContainer statefulContainer = (SessionContainer) getContainer();
      LocalHome localHome = (LocalHome) ((EJBContainer) getContainer()).resolveAnnotation(LocalHome.class);
      if (localHome != null && !bindHomeAndBusinessTogether(statefulContainer))
      {
         Class[] interfaces = {localHome.value()};
         Object homeProxy = java.lang.reflect.Proxy.newProxyInstance(getContainer().getBeanClass().getClassLoader(),
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.