Package com.caucho.config

Examples of com.caucho.config.ConfigException


    else if ("Stateful".equals(sessionType))
      _sessionType = sessionType;
    else if ("Singleton".equals(sessionType))
      _sessionType = sessionType;
    else
      throw new ConfigException(L.l("'{0}' is an unknown sessionType",
                                    sessionType));
  }
View Full Code Here


   
    EjbBean<?> ejbBean = getConfig().getBeanConfig(getEjbName());
   
    if (ejbBean == null) {
      if (getEjbClass() == null)
        throw new ConfigException(L.l("'{0}' is an unknown EJB name",
                                      getEjbName()));
     
      ejbBean = createEjbBean(getEjbClass());
     
      if (getEjbName() != null) {
View Full Code Here

      else if (ejbClass.isAnnotationPresent(Stateless.class))
        _sessionType = "Stateless";
      else if (ejbClass.isAnnotationPresent(Stateful.class))
        _sessionType = "Stateful";
      else
        throw new ConfigException(L.l("'{0}' needs a configured session-type",
                                      ejbClass.getName()));
    }

    if ("Stateless".equals(_sessionType)) {
      Stateless stateless = new StatelessLiteral(name, mappedName, description);
      annType.addAnnotation(stateless);
     
      return new EjbStatelessBean<T>(getConfig(), rawAnnType, annType, moduleName);
    }
    else if ("Stateful".equals(_sessionType)) {
      Stateful stateful = new StatefulLiteral(name, mappedName, description);
      annType.addAnnotation(stateful);
     
      return new EjbStatefulBean<T>(getConfig(), rawAnnType, annType, moduleName);
    }
    else if ("Singleton".equals(_sessionType)) {
      Singleton singleton = new SingletonLiteral(name, mappedName, description);
      annType.addAnnotation(singleton);
     
      return new EjbSingletonBean<T>(getConfig(), rawAnnType, annType, moduleName);
    }
   
    throw new ConfigException(L.l("'{0}' is an unknown <session-type>",
                                  _sessionType));
  }
View Full Code Here

   */
  public void setConnectionFactory(JndiBuilder factory)
    throws ConfigException, NamingException
  {
    if (! (factory.getObject() instanceof ConnectionFactory))
      throw new ConfigException(L.l("'{0}' needs to implement javax.jms.ConnectionFactory.",
                                    factory.getObject()));

    _connectionFactory = (ConnectionFactory) factory.getObject();
  }
View Full Code Here

    }
    else if (type.equals("Bean")) {
      setContainerTransaction(false);
    }
    else
      throw new ConfigException(L.l("'{0}' is an unknown transaction-type.  transaction-type must be 'Bean' or 'Container'.", type));
  }
View Full Code Here

  public void setResourceAdapter(String name)
  {
    ResourceArchive ra = ResourceArchiveManager.findResourceArchive(name);

    if (ra == null)
      throw new ConfigException(L.l("'{0}' is an unknown resource-adapter"));
  }
View Full Code Here

      ResourceArchive ra
        = ResourceArchiveManager.findResourceArchive(specName);

      if (ra == null) {
        throw new ConfigException(L.l("'{0}' is an unknown activation-spec.  Make sure the JCA adapter is deployed in a .rar file",
                                      specName));
      }

      try {
        _activationSpec.validate();
View Full Code Here

  }
 
  private void validate()
  {
    if (! Modifier.isPublic(getEJBClass().getModifiers())) {
      throw new ConfigException(L.l("'{0}' must be public because it's a MessageDriven bean",
                                    getEJBClass().getName()));
    }
    Constructor<?> zeroCtor = null;
   
    for (Constructor<?> ctor : getEJBClass().getConstructors()) {
      if (ctor.getParameterTypes().length == 0)
        zeroCtor = ctor;
    }
   
    if (zeroCtor == null)
      throw new ConfigException(L.l("'{0}' needs a zero-arg constructor because it's a MessageDriven bean",
                                    getEJBClass().getName()));
   
    if (! Modifier.isPublic(zeroCtor.getModifiers())) {
      throw new ConfigException(L.l("'{0}' needs a public zero-arg constructor beause it's a MessageDriven bean",
                                    getEJBClass().getName()));
    }
  }
View Full Code Here

  deployActivationSpecServer(EjbManager ejbManager,
                             EjbLazyGenerator<X> lazyGenerator)
    throws ClassNotFoundException
  {
    if (_activationSpec == null)
      throw new ConfigException(L.l("ActivationSpec is required for ActivationSpecServer"));

    String specType = _activationSpec.getClass().getName();

    ResourceArchive raCfg = ResourceArchiveManager.findResourceArchive(specType);
View Full Code Here

  {
    MessageManager<X> manager;

    try {
      if (spec == null)
        throw new ConfigException(L.l("ActivationSpec is required for MessageServer"));

      if (ra == null)
        throw new ConfigException(L.l("ResourceAdapter is required for ActivationSpecServer"));


      manager = new MessageManager<X>(ejbManager,
                                      getEJBName(),
                                      moduleName,
View Full Code Here

TOP

Related Classes of com.caucho.config.ConfigException

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.