Package com.caucho.jca.ra

Examples of com.caucho.jca.ra.ResourceArchive


  private ResourceAdapter findResourceAdapter(Class cl)
  {
    if (_ra != null)
      return _ra;

    ResourceArchive ra
      = ResourceArchiveManager.findResourceArchive(cl.getName());

    if (ra == null) {
      throw new ConfigException(L.l("'{0}' does not have a defined resource-adapter.  Either define it in a <resource-adapter> property or check the rar or META-INF/resin-ra.xml files",
                                    cl.getName()));
    }

    InjectManager webBeans = InjectManager.create();
    String raName = ra.getResourceAdapterClass().getName();

    Instance<ResourceAdapter> instance
      = _raInstance.select(Names.create(raName));

    ResourceAdapter resourceAdapter = instance.get();
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

    if (_messagingType != null) {
    }
    else if (_activationSpec != null) {
      String specName = _activationSpec.getClass().getName();

      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();
      } catch (Exception e) {
        throw error(e);
      }

      MessageListenerConfig listener = ra.getMessageListener(specName);

      _messagingType = listener.getMessageListenerType();
    }
    else if (MessageListener.class.isAssignableFrom(getEJBClass())) {
      _messagingType = MessageListener.class;
View Full Code Here

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

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

      ResourceArchive raCfg = ResourceArchiveManager.findResourceArchive(specType);

      if (raCfg == null)
        throw error(L.l("'{0}' is an unknown activation-spec.  Make sure the .rar file for the driver is properly installed.",
                        specType));

      Class<?> raClass = raCfg.getResourceAdapterClass();

      if (raClass == null)
        throw error(L.l("resource-adapter class does not exist for activation-spec '{0}'.  Make sure the .rar file for the driver is properly installed.",
                        raClass.getName()));
View Full Code Here

TOP

Related Classes of com.caucho.jca.ra.ResourceArchive

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.