Examples of singleton()


Examples of com.caucho.config.inject.BeanBuilder.singleton()

      BeanBuilder factory = cdiManager.createBeanFactory(servlet.getClass());
      if (_var != null)
        factory.name(_var);

      cdiManager.addBean(factory.singleton(servlet));
    }
  }

  protected void validateClass(boolean requireClass)
    throws ServletException
View Full Code Here

Examples of com.caucho.config.inject.BeanBuilder.singleton()

      Jndi.bindDeepShort(_resourceAdapter.getName(), _ra);

      beanFactory.name(_resourceAdapter.getName());
    }

    manager.addBean(beanFactory.singleton(_ra));

    // create a default outbound factory
    if (_outboundList.size() == 0 && _jndiName != null && _rar != null) {
      ObjectConfig factoryConfig = _rar.getConnectionDefinition(null);
View Full Code Here

Examples of com.caucho.config.inject.BeanBuilder.singleton()

        beanManager.addBean(factory.name(getName())
                            .singleton(connectionFactory));
      }
      else
        beanManager.addBean(factory.singleton(connectionFactory));
    }
  }

  public class ConnectionListener {
    private String _name;
View Full Code Here

Examples of com.caucho.config.inject.BeanBuilder.singleton()

    // for backward compatibility <resource> is always ApplicationScoped
    // factory.scope(ApplicationScoped.class);
    factory.scope(Singleton.class);

    if (_object != null)
      beanManager.addBean(factory.singleton(_object));
    else
      beanManager.addBean(factory.bean());

    if (log.isLoggable(Level.CONFIG))
      logConfig();
View Full Code Here

Examples of com.caucho.config.inject.BeanBuilder.singleton()

        Jndi.bindDeepShort(getName(), resourceObject);

        beanManager.addBean(factory.name(getName()).singleton(resourceObject));
      }
      else {
        beanManager.addBean(factory.singleton(resourceObject));
      }
    }
  }
}
View Full Code Here

Examples of com.caucho.config.inject.BeanBuilder.singleton()

        factory.qualifier(CurrentLiteral.CURRENT);
      }
     
      factory.qualifier(DefaultLiteral.DEFAULT);

      Bean bean = factory.singleton(connectionFactory);

      cdiManager.addBean(bean);
    } catch (Exception e) {
      throw ConfigException.create(e);
    }
View Full Code Here

Examples of com.caucho.config.inject.BeanBuilder.singleton()

        // server/30b4
        factory.qualifier(Names.create(getName()));
        factory.qualifier(CurrentLiteral.CURRENT);
      }
     
      manager.addBean(factory.singleton(connectionFactory));
    }
  }

  public class ConnectionListener {
    private String _name;
View Full Code Here

Examples of com.caucho.config.inject.BeanBuilder.singleton()

        Jndi.bindDeepShort(getName(), resourceObject);

        manager.addBean(factory.name(getName()).singleton(resourceObject));
      }
      else
        manager.addBean(factory.singleton(resourceObject));
    }
  }
}
View Full Code Here

Examples of com.caucho.config.inject.BeanFactory.singleton()

    // server/12dt
    // for backward compatibility <resource> is always ApplicationScoped
    factory.scope(ApplicationScoped.class);

    if (_object != null)
      beanManager.addBean(factory.singleton(_object));
    else
      beanManager.addBean(factory.bean());

    if (log.isLoggable(Level.CONFIG))
      logConfig();
View Full Code Here

Examples of com.caucho.config.inject.BeanFactory.singleton()

        factory.binding(Names.create(getName()));
        // server/30i0
        factory.binding(CurrentLiteral.CURRENT);
      }

      Bean bean = factory.singleton(connectionFactory);

      manager.addBean(bean);
    } catch (Exception e) {
      throw ConfigException.create(e);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.