Examples of ConnectorResource


Examples of com.sun.enterprise.config.serverbeans.ConnectorResource

public class ConnectorResourceDeployer implements ResourceDeployer {

    static Logger _logger = LogDomains.getLogger(LogDomains.CORE_LOGGER);
    public synchronized void deployResource(Object resource) throws Exception {

        ConnectorResource domainResource =
            (com.sun.enterprise.config.serverbeans.ConnectorResource)resource;
        String jndiName = domainResource.getJndiName();
        String poolName = domainResource.getPoolName();
        ConnectorRuntime crt = ConnectorRuntime.getRuntime();
        _logger.log(Level.FINE,
                   "Calling backend to add connector resource",jndiName);

        //HACK so as to not try and load resources of embedded rar when the rar is not yet loaded.
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.ConnectorResource

        return result;
    }

    public synchronized void undeployResource(Object resource)
                  throws Exception {
        ConnectorResource domainResource =
           (com.sun.enterprise.config.serverbeans.ConnectorResource)resource;
        String jndiName = domainResource.getJndiName();
        ConnectorRuntime crt = ConnectorRuntime.getRuntime();
        crt.deleteConnectorResource(jndiName);
       
        //Since 8.1 PE/SE/EE - if no more resource-ref to the pool
        //of this resource in this server instance, remove pool from connector
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.ConnectorResource

     * {@inheritDoc}
     */
    public synchronized void deployResource(Object resource, String applicationName, String moduleName) throws Exception {
        //deployResource is not synchronized as there is only one caller
        //ResourceProxy which is synchronized
        ConnectorResource domainResource = (ConnectorResource) resource;
        ResourceInfo resourceInfo = new ResourceInfo(domainResource.getJndiName(), applicationName, moduleName);
        PoolInfo poolInfo = new PoolInfo(domainResource.getPoolName(), applicationName, moduleName);
        createConnectorResource(domainResource, resourceInfo, poolInfo);
    }
View Full Code Here

Examples of com.vaadin.server.ConnectorResource

        // "https://vaadin.com/download/prerelease/7.0/7.0.0/7.0.0.beta1/vaadin-all-7.0.0.beta1.zip");
        // addComponents(resource, components);
        // resource = new ExternalResource(
        // "https://vaadin.com/download/book-of-vaadin/current/pdf/book-of-vaadin.pdf");
        // addComponents(resource, components);
        ConnectorResource resource;
        resource = new StreamResource(new StreamResource.StreamSource() {

            @Override
            public InputStream getStream() {
                try {
View Full Code Here

Examples of com.vaadin.server.ConnectorResource

            getState()
                    .setMessages(
                            Arrays.asList("First state message",
                                    "Second state message"));
            // Dummy resource used to test URL translation
            Resource resource = new ConnectorResource() {
                @Override
                public String getMIMEType() {
                    return null;
                }
View Full Code Here

Examples of com.vaadin.server.ConnectorResource

                        sourceIndex);
                return false;
            }

            URLReference reference = sources.get(sourceIndex);
            ConnectorResource resource = (ConnectorResource) ResourceReference
                    .getResource(reference);
            stream = resource.getStream();
        } finally {
            session.unlock();
        }

        stream.writeResponse(request, response);
View Full Code Here

Examples of com.vaadin.server.ConnectorResource

                        sourceIndex);
                return false;
            }

            URLReference reference = sources.get(sourceIndex);
            ConnectorResource resource = (ConnectorResource) ResourceReference
                    .getResource(reference);
            stream = resource.getStream();
        } finally {
            session.unlock();
        }

        stream.writeResponse(request, response);
View Full Code Here

Examples of org.exolab.jms.config.ConnectorResource

        _log.info("Creating server interface for the " + connector.getScheme()
                  + " connector");

        ServerConnector server;
        ConnectorResource resource = ConnectorHelper.getConnectorResource(
                connector.getScheme(), _config);

        String className = resource.getServer().getImplementationClass();
        Class clazz;
        try {
            clazz = Class.forName(className);
        } catch (ClassNotFoundException exception) {
            throw new ServiceException("Failed to load class " + className);
View Full Code Here

Examples of org.glassfish.connectors.config.ConnectorResource

       
        jndiNameForConnectionPool = jndiName + JNDINAME_APPENDER;

        ActionReport subReport = report.addSubActionsReport();

        ConnectorResource cresource = null;
        Resource res = ConnectorsUtil.getResourceByName(domain.getResources(), ConnectorResource.class, jndiName);
        if (res instanceof ConnectorResource) {
            cresource = (ConnectorResource) res;
        }
        /* for (ConnectorResource cr : connResources) {
         if (cr.getJndiName().equals(jndiName))
         cresource = cr;
         } */
        if (cresource == null) {
            ParameterMap params = new ParameterMap();
            params.set("jndi_name", jndiName);
            params.set("DEFAULT", jndiName);
            params.set("target", target);
            commandRunner.getCommandInvocation("delete-admin-object", subReport, context.getSubject()).parameters(params).execute();

            if (ActionReport.ExitCode.FAILURE.equals(subReport.getActionExitCode())) {
                report.setMessage(localStrings.getLocalString("delete.jms.resource.cannotDeleteJMSAdminObject",
                        "Unable to Delete Admin Object."));
                report.setActionExitCode(ActionReport.ExitCode.FAILURE);
                return;
            }
        } else {
            // Delete the connector resource and connector connection pool
            String defPoolName = jndiNameForConnectionPool;
            String poolName = cresource.getPoolName();
            if (poolName != null && poolName.equals(defPoolName)) {
                ParameterMap params = new ParameterMap();
                params.set("DEFAULT", jndiName);
                params.set("connector_resource_name", jndiName);
                params.set("target", target);
View Full Code Here

Examples of org.glassfish.connectors.config.ConnectorResource

                    list.add(m);
                }
            }

            for (Object c: connectorResources) {
                ConnectorResource cr = (ConnectorResource) c;
                ConnectorConnectionPool cp = (ConnectorConnectionPool) ConnectorsUtil.getResourceByName(
                        domain.getResources(), ConnectorConnectionPool.class, cr.getPoolName());

                if (cp  != null && JMSRA.equals(cp.getResourceAdapterName())){
                    Map<String,String> m = new HashMap<>();
                    m.put("name", cr.getJndiName());
                    list.add(m);
                }
            }
        } catch (Exception e) {
            report.setMessage(localStrings.getLocalString("list.jms.resources.fail",
                    "Unable to list JMS Resources") + " " + e.getLocalizedMessage());
            report.setActionExitCode(ActionReport.ExitCode.FAILURE);
            report.setFailureCause(e);
            return;
        }
      } else {
            switch (resourceType) {
                case TOPIC_CF:
                case QUEUE_CF:
                case UNIFIED_CF:
                    for (Object c : connectorResources) {
                       ConnectorResource cr = (ConnectorResource)c;
                       ConnectorConnectionPool cp = (ConnectorConnectionPool)
                               ConnectorsUtil.getResourceByName(domain.getResources(), ConnectorConnectionPool.class, cr.getPoolName());
                       if(cp != null && resourceType.equals(cp.getConnectionDefinitionName()) && JMSRA.equals(cp.getResourceAdapterName())) {
                            Map<String,String> m = new HashMap<>();
                            m.put("name", cr.getJndiName());
                            list.add(m);
                        }
                    }
                    break;
                case TOPIC:
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.