Package javax.ejb

Examples of javax.ejb.RemoteHome


    */
   public static Class<?>[] getRemoteAndBusinessRemoteInterfaces(Container container)
   {
      // Initialize
      Remote remoteAnnotation = ((EJBContainer) container).getAnnotation(Remote.class);
      RemoteHome remoteHomeAnnotation = ((EJBContainer) container).getAnnotation(RemoteHome.class);
      Set<Class<?>> remoteAndRemoteBusinessInterfaces = new HashSet<Class<?>>();
      Class<?> beanClass = container.getBeanClass();
      boolean isStateless = (container instanceof StatelessContainer) ? true : false;

      // Obtain business interfaces
      Class<?>[] businessInterfaces = ProxyFactoryHelper.getBusinessInterfaces(beanClass).toArray(new Class[]
      {});

      // EJBTHREE-1127
      // Determine remote interface from return value of "create" in Remote Home
      if (remoteHomeAnnotation != null)
      {
         remoteAndRemoteBusinessInterfaces.addAll(ProxyFactoryHelper.getReturnTypesFromCreateMethods(
               remoteHomeAnnotation.value(), isStateless));
      }

      // If @Remote is not defined
      if (remoteAnnotation == null)
      {
View Full Code Here


      Class<?>[] remotes = ProxyFactoryHelper.getRemoteInterfaces(this.getContainer());
      if (remotes != null && remotes.length > 0)
      {
         remote = remotes[0];
      }
      RemoteHome homeAnnotation = ejbContainer.getAnnotation(RemoteHome.class);
      if (homeAnnotation != null)
         home = homeAnnotation.value();
      RemoteBinding remoteBindingAnnotation = ejbContainer.getAnnotation(RemoteBinding.class);
      if (remoteBindingAnnotation != null)
         homeHandle = new HomeHandleImpl(remoteBindingAnnotation.jndiBinding());
     
      EJBMetaDataImpl metadata = new EJBMetaDataImpl(remote, home, pkClass, true, false, homeHandle);
View Full Code Here

   {
      // 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

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

      SessionSpecContainer statefulContainer = this.getContainer();
      RemoteHome remoteHome = statefulContainer.getAnnotation(RemoteHome.class);
      if (remoteHome != null && !bindHomeAndBusinessTogether())
      {
         Object homeProxy = createHomeProxy(remoteHome.value());
         String homeJndiName = ProxyFactoryHelper.getHomeJndiName(statefulContainer);
         log.debug("Binding home proxy at " + homeJndiName);
         Util.rebind(this.getContainer().getInitialContext(), homeJndiName, homeProxy);
      }
   }
View Full Code Here

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

   {
      // 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

         Class<?>[] remotes = ProxyFactoryHelper.getRemoteInterfaces(this);
         if (remotes != null && remotes.length > 0)
         {
            remote = remotes[0];
         }
         RemoteHome homeAnnotation = this.getAnnotation(RemoteHome.class);
         if (homeAnnotation != null)
            home = homeAnnotation.value();
         RemoteBinding remoteBindingAnnotation = this.getAnnotation(RemoteBinding.class);
         if (remoteBindingAnnotation != null)
            homeHandle = new HomeHandleImpl(remoteBindingAnnotation
                    .jndiBinding());
View Full Code Here

   }

   public void start() throws Exception
   {
      super.start();
      RemoteHome remoteHome = this.getContainer().getAnnotation(RemoteHome.class);
      if (remoteHome != null && !bindHomeAndEjb21ViewTogether(this.getContainer()))
      {
         Object homeProxy = createHomeProxy(remoteHome.value());
         String jndiName = ProxyFactoryHelper.getHomeJndiName(getContainer());
         try
         {
            log.debug("Binding proxy for " + getContainer().getEjbName() + " in JNDI at " + jndiName);
            Util.rebind(getContainer().getInitialContext(), jndiName, homeProxy);
View Full Code Here

   public void stop() throws Exception
   {
      super.stop();
      SessionSpecContainer statelessContainer = this.getContainer();
      RemoteHome remoteHome = this.getContainer().getAnnotation(RemoteHome.class);
      if (remoteHome != null && !bindHomeAndEjb21ViewTogether(statelessContainer))
      {
         Util.unbind(getContainer().getInitialContext(), ProxyFactoryHelper.getHomeJndiName(getContainer()));
      }
   }
View Full Code Here

   {
      // 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

TOP

Related Classes of javax.ejb.RemoteHome

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.