Package org.jboss.ejb3.session

Examples of org.jboss.ejb3.session.SessionContainer


/* 136 */       throw namingException;
/*     */     }
/* 138 */     assert (!Dispatcher.singleton.isRegistered(targetId)) : (targetId + " is already registered");
/* 139 */     Dispatcher.singleton.registerTarget(targetId, this);
/*     */
/* 141 */     SessionContainer statefulContainer = (SessionContainer)getContainer();
/* 142 */     RemoteHome remoteHome = (RemoteHome)statefulContainer.resolveAnnotation(RemoteHome.class);
/* 143 */     if ((remoteHome != null) && (!bindHomeAndBusinessTogether(statefulContainer)))
/*     */     {
/* 145 */       Object homeProxy = createHomeProxy(remoteHome.value());
/* 146 */       String homeJndiName = ProxyFactoryHelper.getHomeJndiName(getContainer());
/* 147 */       log.debug("Binding home proxy at " + homeJndiName);
View Full Code Here


/*     */   public void stop() throws Exception
/*     */   {
/* 154 */     Util.unbind(getContainer().getInitialContext(), this.jndiName + "StatefulProxyFactory");
/* 155 */     Dispatcher.singleton.unregisterTarget(getTargetId());
/*     */
/* 157 */     SessionContainer statefulContainer = (SessionContainer)getContainer();
/* 158 */     RemoteHome remoteHome = (RemoteHome)statefulContainer.resolveAnnotation(RemoteHome.class);
/* 159 */     if ((remoteHome != null) && (!bindHomeAndBusinessTogether(statefulContainer)))
/*     */     {
/* 161 */       Util.unbind(getContainer().getInitialContext(), ProxyFactoryHelper.getHomeJndiName(getContainer()));
/*     */     }
/* 163 */     super.stop();
View Full Code Here

/* 41 */     throw new RuntimeException("IMPROPER USAGE");
/*    */   }
/*    */
/*    */   public Object createPerClass(Advisor advisor)
/*    */   {
/* 46 */     SessionContainer container = (SessionContainer)advisor;
/* 47 */     return new ReplicantsManagerInterceptor(container.getClusterFamilies());
/*    */   }
View Full Code Here

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

/*  66 */     super(container, binding.jndiBinding());
/*     */   }
/*     */
/*     */   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;
View Full Code Here

/* 117 */       NamingException namingException = new NamingException("Could not bind stateful local proxy with ejb name " + getContainer().getEjbName() + " into JNDI under jndiName: " + getContainer().getInitialContext().getNameInNamespace() + "/" + this.jndiName + "StatefulProxyFactory");
/* 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()));
View Full Code Here

/*     */
/*     */   public void stop() throws Exception
/*     */   {
/* 135 */     super.stop();
/* 136 */     Util.unbind(getContainer().getInitialContext(), this.jndiName + "StatefulProxyFactory");
/* 137 */     SessionContainer statefulContainer = (SessionContainer)getContainer();
/* 138 */     LocalHome localHome = (LocalHome)((EJBContainer)getContainer()).resolveAnnotation(LocalHome.class);
/* 139 */     if ((localHome != null) && (!bindHomeAndBusinessTogether(statefulContainer)))
/*     */     {
/* 141 */       Util.unbind(getContainer().getInitialContext(), ProxyFactoryHelper.getLocalHomeJndiName(getContainer()));
/*     */     }
View Full Code Here

/*     */     }
/*     */   }
/*     */
/*     */   public Object createProxy()
/*     */   {
/* 147 */     SessionContainer sfsb = (SessionContainer)getContainer();
/* 148 */     Object id = sfsb.createSession();
/* 149 */     return constructProxy(new StatefulLocalProxy(getContainer(), id, this.vmid));
/*     */   }
View Full Code Here

/* 154 */     return constructProxy(new StatefulLocalProxy(getContainer(), id, this.vmid));
/*     */   }
/*     */
/*     */   public Object createProxy(Class[] initTypes, Object[] initValues)
/*     */   {
/* 159 */     SessionContainer sfsb = (SessionContainer)getContainer();
/* 160 */     Object id = sfsb.createSession(initTypes, initValues);
/* 161 */     return constructProxy(new StatefulLocalProxy(getContainer(), id, this.vmid));
/*     */   }
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

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.