/** * Create and initialize an embeddable EJB container with an * set of configuration properties and names of modules to be initialized. * * @param properties One or more spec-defined or vendor-specific properties. * The spec reserves the prefix "javax.ejb." for spec-defined properties. * @return EJBContainer instance * @throws EJBException Thrown if the container or application could not * be successfully initialized. */ public static EJBContainer createEJBContainer(Map<?, ?> properties) throws EJBException { for(EJBContainerProvider factory : factories) { EJBContainer container = factory.createEJBContainer(properties); if(container != null) return container; } throw new EJBException("Unable to instantiate container with factories " + factories); }
/** * Create and initialize an embeddable EJB container with an * set of configuration properties and names of modules to be initialized. * * @param properties One or more spec-defined or vendor-specific properties. * The spec reserves the prefix "javax.ejb." for spec-defined properties. * @return EJBContainer instance * @throws EJBException Thrown if the container or application could not * be successfully initialized. */ public static EJBContainer createEJBContainer(Map<?, ?> properties) throws EJBException { for(EJBContainerProvider factory : factories) { EJBContainer container = factory.createEJBContainer(properties); if(container != null) return container; } throw new EJBException("Unable to instantiate container with factories " + factories); }
/** * Create and initialize an embeddable EJB container with an * set of configuration properties and names of modules to be initialized. * * @param properties One or more spec-defined or vendor-specific properties. * The spec reserves the prefix "javax.ejb." for spec-defined properties. * @return EJBContainer instance * @throws EJBException Thrown if the container or application could not * be successfully initialized. */ public static EJBContainer createEJBContainer(Map<?, ?> properties) throws EJBException { for(EJBContainerProvider factory : factories) { EJBContainer container = factory.createEJBContainer(properties); if(container != null) return container; } throw new EJBException("Unable to instantiate container with factories " + factories); }
/** * Create and initialize an embeddable EJB container with an * set of configuration properties and names of modules to be initialized. * * @param properties One or more spec-defined or vendor-specific properties. * The spec reserves the prefix "javax.ejb." for spec-defined properties. * @return EJBContainer instance * @throws EJBException Thrown if the container or application could not * be successfully initialized. */ public static EJBContainer createEJBContainer(Map<?, ?> properties) throws EJBException { for(EJBContainerProvider factory : factories) { EJBContainer container = factory.createEJBContainer(properties); if(container != null) return container; } throw new EJBException("Unable to instantiate container with factories " + factories); }
/** * Create and initialize an embeddable EJB container with an * set of configuration properties and names of modules to be initialized. * * @param properties One or more spec-defined or vendor-specific properties. * The spec reserves the prefix "javax.ejb." for spec-defined properties. * @return EJBContainer instance * @throws EJBException Thrown if the container or application could not * be successfully initialized. */ public static EJBContainer createEJBContainer(Map<?, ?> properties) throws EJBException { for(EJBContainerProvider factory : factories) { EJBContainer container = factory.createEJBContainer(properties); if(container != null) return container; } throw new EJBException("Unable to instantiate container with factories " + factories); }
/** * Create and initialize an embeddable EJB container with an * set of configuration properties and names of modules to be initialized. * * @param properties One or more spec-defined or vendor-specific properties. * The spec reserves the prefix "javax.ejb." for spec-defined properties. * @return EJBContainer instance * @throws EJBException Thrown if the container or application could not * be successfully initialized. */ public static EJBContainer createEJBContainer(Map<?, ?> properties) throws EJBException { for(EJBContainerProvider factory : factories) { EJBContainer container = factory.createEJBContainer(properties); if(container != null) return container; } throw new EJBException("Unable to instantiate container with factories " + factories); }
for (EJBContainerProvider provider : providers) { try { container = provider.createEJBContainer(properties); if (container != null) { break;
public static EJBContainer createEJBContainer(java.util.Map<?, ?> properties) { if (properties == null) { properties = Collections.EMPTY_MAP; } try { ClassLoader loader = Thread.currentThread().getContextClassLoader(); // go check the loader files. List<Object> providers = ProviderLocator.getServices(EJBContainerProvider.class.getName(), EJBContainer.class, loader); for (Object o : providers) { EJBContainer container = ((EJBContainerProvider) o).createEJBContainer(properties); if (container != null) { return container; } } throw new EJBException("Provider error. No provider definition found"); } catch (EJBException e) { // if the container provider throws an EJBException, don't wrap another one // around the original. throw e; } catch (Exception e) { throw new EJBException("Provider error. No provider found", e); } }
for (EJBContainerProvider provider : providers) { try { container = provider.createEJBContainer(properties); if (container != null) { break;
for (EJBContainerProvider provider : providers) { try { container = provider.createEJBContainer(properties); if (container != null) { break;
public static EJBContainer createEJBContainer(java.util.Map<?, ?> properties) { if (properties == null) { properties = Collections.EMPTY_MAP; } try { ClassLoader loader = Thread.currentThread().getContextClassLoader(); // go check the loader files. List<Object> providers = ProviderLocator.getServices(EJBContainerProvider.class.getName(), EJBContainer.class, loader); for (Object o : providers) { EJBContainer container = ((EJBContainerProvider) o).createEJBContainer(properties); if (container != null) { return container; } } throw new EJBException("Provider error. No provider definition found"); } catch (EJBException e) { // if the container provider throws an EJBException, don't wrap another one // around the original. throw e; } catch (Exception e) { throw new EJBException("Provider error. No provider found", e); } }
= (EJBContainerProvider) cl.newInstance(); EJBContainer container = provider.createEJBContainer(properties);
for (EJBContainerProvider provider : providers) { try { container = provider.createEJBContainer(properties); if (container != null) { break;
for (EJBContainerProvider provider : providers) { try { container = provider.createEJBContainer(properties); if (container != null) { break;
/** * Create and initialize an embeddable EJB container with a set of configuration properties. * @param properties * @return */ public static EJBContainer createEJBContainer(java.util.Map<?, ?> properties) { List<EJBContainerProvider> ejbContainerProviders = getEJBContainerProviders(); if (ejbContainerProviders == null || ejbContainerProviders.isEmpty()) { throw new EJBException("No EJB Container Provider provider found"); } // Ask each provider if they can create a container for the given properties for (EJBContainerProvider provider : ejbContainerProviders) { EJBContainer ejbContainer = provider.createEJBContainer(properties); if (ejbContainer != null) { return ejbContainer; } } throw new EJBException("Unable to build any EJBContainer from providers + '" + ejbContainerProviders + "'."); }