Package com.sun.enterprise.config.serverbeans

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


public class ResourceAdapterConfigDeployer implements ResourceDeployer {

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

        ResourceAdapterConfig domainConfig =
            (com.sun.enterprise.config.serverbeans.ResourceAdapterConfig)resource;
        String rarName = domainConfig.getResourceAdapterName();
        ConnectorRuntime crt = ConnectorRuntime.getRuntime();
        _logger.log(Level.FINE,
                   "Calling backend to add resource adapterConfig ",rarName);
        crt.addResourceAdapterConfig(rarName,domainConfig);
        _logger.log(Level.FINE,
View Full Code Here


                   "Added resource adapterConfig in backend",rarName);
    }

    public synchronized void undeployResource(Object resource)
                  throws Exception {
        ResourceAdapterConfig domainConfig =
            (com.sun.enterprise.config.serverbeans.ResourceAdapterConfig)resource;
        String rarName = domainConfig.getResourceAdapterName();
        ConnectorRuntime crt = ConnectorRuntime.getRuntime();
        crt.deleteResourceAdapterConfig(rarName);
    }
View Full Code Here

        // config change object for the application entry
        ConfigAdd configAdd = ConfigChangeFactory.createConfigAdd(_ctx, xpath);
        list.add(configAdd);

        // add resource adapter config
        ResourceAdapterConfig raConfig =
            findResourceAdapterConfigByName(applicationName);

        // if resource adapter config is found
        if (raConfig != null) {
            ConfigAdd raConfigChange =
                ConfigChangeFactory.createConfigAdd(_ctx, raConfig.getXPath());

            // add the resource adapter config to the dependent config changes
            list.add(raConfigChange);
        }
View Full Code Here

                            new DependencyResolver(ctx, effective);
                    List list = dr.getConfigDeleteForApplication(appName);
                    app.addDependentConfigChange(list);

                    // remove resource adapter config if found
                    ResourceAdapterConfig raConfig =
                        dr.findResourceAdapterConfigByName(appName);

                    if (raConfig != null) {
                        app.addDependentConfigChange(
                            dr.getConfigDeleteForResource(raConfig) );
View Full Code Here

                + _type +"]");

            // resource adapter config bean
            Resources root =
                ((Domain)_context.getRootConfigBean()).getResources();
            ResourceAdapterConfig raConfig =
                root.getResourceAdapterConfigByResourceAdapterName(_name);

            // found the resource adapter config
            if (raConfig != null) {
                String fullRAName = raConfig.getResourceAdapterName();
                String appName = null;
                int idx = fullRAName.indexOf("#");
                if (idx > 0) {
                    appName = fullRAName.substring(0, idx);
                } else {
View Full Code Here

        }

        try {
            ConfigSupport.apply(new SingleConfigCode<Resources>() {
                public Object run(Resources param) throws PropertyVetoException, TransactionFailure {
                    ResourceAdapterConfig newResource = createConfigBean(param, properties);
                    param.getResources().add(newResource);
                    return newResource;
                }
            }, resources);
View Full Code Here

        return status;
    }

    private ResourceAdapterConfig createConfigBean(Resources param, Properties properties) throws PropertyVetoException,
            TransactionFailure {
        ResourceAdapterConfig newResource = param.createChild(ResourceAdapterConfig.class);
        newResource.setResourceAdapterName(raName);
        if(threadPoolIds != null) {
            newResource.setThreadPoolIds(threadPoolIds);
        }
        newResource.setObjectType(objectType);
        if (name != null) {
            newResource.setName(name);
        }
        if (properties != null) {
            for ( Map.Entry e : properties.entrySet()) {
                Property prop = newResource.createChild(Property.class);
                prop.setName((String)e.getKey());
                prop.setValue((String)e.getValue());
                newResource.getProperty().add(prop);
            }
        }
        return newResource;
    }
View Full Code Here

     */

    private void updateRAConfigInDescriptor(ConnectorDescriptor connectorDescriptor,
                                            String moduleName) {

        ResourceAdapterConfig raConfig =
                ConnectorRegistry.getInstance().getResourceAdapterConfig(moduleName);

        List<Property> raConfigProps = null;
        if (raConfig != null) {
            raConfigProps = raConfig.getProperty();
        }

        if(_logger.isLoggable(Level.FINE)) {
            _logger.fine("current RAConfig In Descriptor " + connectorDescriptor.getConfigProperties());
        }
View Full Code Here

                // validate the RA bean now.
                beanValidator.validateJavaBean(ra, moduleName);

                ConnectorRegistry registry = ConnectorRegistry.getInstance();
                String poolId = null;
                ResourceAdapterConfig raConfig = registry.getResourceAdapterConfig(moduleName_);
                if (raConfig != null) {
                    poolId = raConfig.getThreadPoolIds();
                }
                this.bootStrapContextImpl = new BootstrapContextImpl(poolId, moduleName_, jcl);
                validateWorkContextSupport(desc);

                startResourceAdapter(bootStrapContextImpl);
View Full Code Here

     */
    protected void loadRAConfiguration() throws ConnectorRuntimeException {
        try {
            Set mergedProps;
            ConnectorRegistry registry = ConnectorRegistry.getInstance();
            ResourceAdapterConfig raConfig = registry.getResourceAdapterConfig(moduleName_);
            List<Property> raConfigProps = new ArrayList<Property>();
            mergedProps = mergeRAConfiguration(raConfig, raConfigProps);
            logMergedProperties(mergedProps);

            SetMethodAction setMethodAction = new SetMethodAction(this.resourceadapter_, mergedProps);
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.serverbeans.ResourceAdapterConfig

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.