Package com.caucho.ejb.manager

Examples of com.caucho.ejb.manager.EjbManager


      }
      else {
        fillDefaultModules();
      }

      EjbManager ejbManager = EjbManager.create();

      if (_ejbPaths.size() != 0) {
        for (Path path : _ejbPaths) {
          // ejbManager.addRoot(path);
          _loader.addJar(path);
        }

        _loader.validate();

      // XXX:??
      /*
      */

        // starts with the environment
        // ejbServer.start();
      }
   
      // ioc/0p63
      Path ejbJar = rootDir.lookup("META-INF/ejb-jar.xml");

      if (ejbJar.canRead()) {
        ejbManager.configureRootPath(rootDir);
      }

      _loader.start();

      // updates the invocation caches
View Full Code Here


  {
    if (_ejbPaths.contains(ejbPath))
      return;

    _ejbPaths.add(ejbPath);
    EjbManager ejbContainer = EjbManager.create();

    //ejbContainer.addRoot(ejbPath);
  }
View Full Code Here

      return;

    // ioc/0j08
    boolean isXmlConfig = true;

    EjbManager ejbContainer = EjbManager.create(_cdiManager.getClassLoader());
   
    if (isXmlConfig
        && (annotatedType.isAnnotationPresent(Stateful.class)
            || annotatedType.isAnnotationPresent(Stateless.class)
            || annotatedType.isAnnotationPresent(Singleton.class)
            || annotatedType.isAnnotationPresent(MessageDriven.class)
            || annotatedType.isAnnotationPresent(JmsMessageListener.class)
            || ejbContainer != null && ejbContainer.isConfiguredBean(annotatedType.getJavaClass()))) {
      if (ejbContainer != null) {
        ejbContainer.createBean(annotatedType, null);
        event.veto();
      }
    }
   
    /*
 
View Full Code Here

        && (annotated.isAnnotationPresent(Stateful.class)
            || annotated.isAnnotationPresent(Stateless.class)
            || annotated.isAnnotationPresent(Singleton.class)
            || annotated.isAnnotationPresent(MessageDriven.class)
            || annotated.isAnnotationPresent(JmsMessageListener.class))) {
      EjbManager ejbContainer = EjbManager.create();

      if (bean instanceof ManagedBeanImpl<?>) {
        // XXX: shouldn't reach processBeanImpl
        if (true)
          throw new IllegalStateException(String.valueOf(annotated));
       
        ManagedBeanImpl<T> mBean = (ManagedBeanImpl<T>) bean;
        AnnotatedType<T> annType = mBean.getAnnotatedType();
       
        ejbContainer.createBean(annType, mBean.getInjectionTarget());
       
        if (event instanceof ProcessBeanImpl<?>)
          ((ProcessBeanImpl<?>) event).veto();
      }
    }
View Full Code Here

      if (_moduleRoots != null) {
        for (Path path : _moduleRoots)
          _classLoader.addURL(new URL(path.getURL()));

        EjbManager manager = EjbManager.getCurrent();

        manager.setGlobalClassLoader(_parentClassLoader);
        manager.setScannableRoots(_moduleRoots);
      }
     
      _classLoader.addScanRoot();
      _application.start();
    }
View Full Code Here

    _primaryKey = primaryKey;
  }
 
  private Object readResolve()
  {
    EjbManager manager = EjbManager.create();
   
    StatefulManager<?> ejbManager
      = (StatefulManager<?>) manager.getServerByEjbName(_ejbName);
   
    if (ejbManager == null)
      throw new IllegalStateException(L.l("'{0}' is an unknown @Stateful ejb-name for deserialization in {1}",
                                          _ejbName, manager));
   
View Full Code Here

    _protocolContainer.setProtocolManager(_ejbManager.getProtocolManager());
    _protocolContainer.setURLPrefix(_urlPrefix);
    _protocolContainer.setWorkPath(_workPath);

    EjbManager manager = _ejbManager;

    for (; manager != null; manager = manager.getParent()) {
      manager.getProtocolManager().addProtocolContainer(_protocolContainer);
    }
  }
View Full Code Here

      _protocolContainer.setServerManager(_ejbManager);
      _protocolContainer.setURLPrefix(_urlPrefix);
      _protocolContainer.setWorkPath(_workPath);
   
      EjbManager manager = _ejbManager;

      for (; manager != null; manager = manager.getParent()) {
        manager.getProtocolManager().addProtocolContainer(_protocolContainer);
      }
    }
  }
View Full Code Here

    }
  }

  public void destroy()
  {
    EjbManager manager = _ejbManager;

    for (; manager != null; manager = manager.getParent()) {
      manager.getProtocolManager().removeProtocolContainer(_protocolContainer);
    }
  }
View Full Code Here

  public EjbProtocolManager(EjbManager ejbContainer) throws ConfigException
  {
    _ejbContainer = ejbContainer;
    _loader = _ejbContainer.getClassLoader();

    EjbManager parent = ejbContainer.getParent();
    if (parent != null) {
      _localJndiPrefix = parent.getProtocolManager().getLocalJndiPrefix();
      _remoteJndiPrefix = parent.getProtocolManager().getRemoteJndiPrefix();
      _jndiPrefix = parent.getProtocolManager().getJndiPrefix();
    }
  }
View Full Code Here

TOP

Related Classes of com.caucho.ejb.manager.EjbManager

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.