Examples of ResourceAdapter


Examples of com.alibaba.citrus.service.resource.support.ResourceAdapter

        com.alibaba.citrus.service.resource.Resource resource = createMock(com.alibaba.citrus.service.resource.Resource.class);

        expect(resource.lastModified()).andReturn(123L);
        replay(resource);

        ResourceAdapter adapter = new ResourceAdapter("/test", resource);

        assertEquals(123L, adapter.lastModified());
    }
View Full Code Here

Examples of com.sun.enterprise.deployment.runtime.connector.ResourceAdapter

            PoolInfo poolInfo, ConnectorDescriptor desc, String rarName) {

        ConnectorConnectionPool connectorPoolObj =
                new ConnectorConnectionPool(poolInfo);
        SunConnector sundesc = desc.getSunDescriptor();
        ResourceAdapter sunRAXML = sundesc.getResourceAdapter();

        connectorPoolObj.setMaxPoolSize(
                (String) sunRAXML.getValue(ResourceAdapter.MAX_POOL_SIZE));
        connectorPoolObj.setSteadyPoolSize(
                (String) sunRAXML.getValue(ResourceAdapter.STEADY_POOL_SIZE));
        connectorPoolObj.setMaxWaitTimeInMillis((String) sunRAXML.getValue(
                ResourceAdapter.MAX_WAIT_TIME_IN_MILLIS));
        connectorPoolObj.setIdleTimeoutInSeconds((String) sunRAXML.getValue(
                ResourceAdapter.IDLE_TIMEOUT_IN_SECONDS));
        connectorPoolObj.setPoolResizeQuantity((String) "2");
        connectorPoolObj.setFailAllConnections(false);
        connectorPoolObj.setMatchConnections(true); //always
View Full Code Here

Examples of com.sun.enterprise.tools.common.dd.connector.ResourceAdapter

            result.notApplicable(smh.getLocalString(getClass().getName()+".notApplicable1",
            "NOT APPLICABLE [AS�CONNECTOR]: sun-ra.xml descriptor object could not be obtained"));

     }
     else{
     ResourceAdapter ra = sc.getResourceAdapter();
     String idleTimeout = ra.getAttributeValue("idle-timeout-in-seconds");
     if(idleTimeout.length()==0)
     {
         result.failed(smh.getLocalString(getClass().getName()+".failed1",
                    "FAILED [AS-CONNECTOR resource-adapter] : idle-timeout-in-seconds cannot be empty"));
     }
View Full Code Here

Examples of javax.resource.spi.ResourceAdapter

        } catch (InvocationTargetException e) {
            throw new ResourceException("Cannot invoke method getResourceAdapter on the rar object.", e);
        }

        // cast object
        ResourceAdapter resourceAdapter = null;
        if (resourceAdapterObj instanceof ResourceAdapter) {
            resourceAdapter = (ResourceAdapter) resourceAdapterObj;
        } else {
            throw new ResourceException("Object found is not an instance of ResourceAdapter");
        }
View Full Code Here

Examples of javax.resource.spi.ResourceAdapter

            }

        }

        // get ResourceAdapter object
        ResourceAdapter resourceAdapter = null;
        try {
            resourceAdapter = MDBResourceAdapterHelper.getResourceAdapter(activationSpecName,
                    (Embedded) getConfiguration().getEZBServer());
        } catch (ResourceException e) {
            throw new EZBContainerException("Cannot get the resource adapter for this MDB factory", e);
View Full Code Here

Examples of javax.resource.spi.ResourceAdapter

   protected void startService() throws Exception
   {
      if (mcf != null)
         throw new DeploymentException("Stop the RARDeployment before restarting it");

      ResourceAdapter resourceAdapter = null;
      ConnectionDefinitionMetaData cdmd = cmd.getConnectionDefinition(dmd.getConnectionDefinition());
      rarName = dmd.getRarName();
      try
      {
         resourceAdapter = (ResourceAdapter) getServer().getAttribute(oldRarDeployment, "ResourceAdapter");
View Full Code Here

Examples of javax.resource.spi.ResourceAdapter

      if (mcf != null)
         throw new DeploymentException("Stop the RARDeployment before restarting it");

      ConnectorMetaData cmd = null;
      ConnectionDefinitionMetaData cdmd = null;
      ResourceAdapter resourceAdapter = null;
      if (oldRarDeployment != null)
      {
         try
         {
            resourceAdapter = (ResourceAdapter) getServer().getAttribute(oldRarDeployment, "ResourceAdapter");
View Full Code Here

Examples of javax.resource.spi.ResourceAdapter

    * @return the resource adapter
    * @throws Exception
    */
   public static ResourceAdapter createResourceAdapter(RARDeploymentMetaData ramd) throws Exception
   {
      ResourceAdapter adapter = createResourceAdapter(ramd.getConnectorMetaData());
     
      ConfigPropertyHandler configPropertyHandler = new ConfigPropertyHandler(adapter, adapter.getClass(), "ResourceAdapter: ");
      for(Iterator iter = ramd.getRaXmlMetaData().getProperties().iterator(); iter.hasNext();)
      {
         ConfigPropertyMetaData cpmd = (ConfigPropertyMetaData)iter.next();
         applyProperty(configPropertyHandler, cpmd, adapter.getClass());
      }
           
      return adapter;
   }
View Full Code Here

Examples of javax.resource.spi.ResourceAdapter

     
      // Load the class
      Class raClass = Thread.currentThread().getContextClassLoader().loadClass(className);
      if (ResourceAdapter.class.isAssignableFrom(raClass) == false)
         throw new DeploymentException(raClass.getName() + " is not a resource adapter class");
      ResourceAdapter result = (ResourceAdapter) raClass.newInstance();
     
      // Apply the properties
      ConfigPropertyHandler configPropertyHandler = new ConfigPropertyHandler(result, raClass, "ResourceAdapter: ");
      for (Iterator i = cmd.getProperties().iterator(); i.hasNext();)
      {
View Full Code Here

Examples of javax.resource.spi.ResourceAdapter

      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.",
                      _activationSpec.getClass().getName()));

    InjectManager webBeans = InjectManager.create();

    ResourceAdapter ra
      = (ResourceAdapter) webBeans.getReference(raClass);

    if (ra == null) {
      throw error(L.l("resource-adapter '{0}' must be configured in a <connector> tag.",
                      raClass.getName()));
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.