Package com.sun.enterprise.config.serverbeans

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


        if (ctx==null || poolName==null || serverName==null || eResName==null) {
            return false;
        }

        Resources rBean = ServerBeansFactory.getDomainBean(ctx).getResources();

        JdbcResource[] jdbcBeans = rBean.getJdbcResource();

        // no jdbc resource in the domain, so it is not possible
        // for the jdbc pool to be in use by a server in this domain
        if (jdbcBeans == null) {
            return false;
View Full Code Here


        if (ctx==null || poolName==null || serverName==null || eResName==null) {
            return false;
        }

        Resources rBean = ServerBeansFactory.getDomainBean(ctx).getResources();

        ConnectorResource[] conBeans = rBean.getConnectorResource();

        // no connector resource in the domain, so it is not possible
        // for the connector pool to be in use by a server in this domain
        if (conBeans == null) {
            return false;
View Full Code Here

     * @throws  ConfigException  if a config parsing exception
     */
    static String getResourceType(ConfigContext ctx, String id,
            boolean includePool) throws ConfigException {

        Resources root = ((Domain)ctx.getRootConfigBean()).getResources();

        ConfigBean res = root.getJdbcResourceByJndiName(id);
        if ( res != null ) {
            return Resources.JDBC_RESOURCE;
        }

        res = root.getMailResourceByJndiName(id);
        if ( res != null ) {
            return Resources.MAIL_RESOURCE;
        }

        res = root.getCustomResourceByJndiName(id);
        if ( res != null ) {
            return Resources.CUSTOM_RESOURCE;
        }

        res = root.getExternalJndiResourceByJndiName(id);
        if ( res != null ) {
            return Resources.EXTERNAL_JNDI_RESOURCE;
        }

        res = root.getPersistenceManagerFactoryResourceByJndiName(id);
        if ( res != null) {
            return Resources.PERSISTENCE_MANAGER_FACTORY_RESOURCE;
        }

        res = root.getAdminObjectResourceByJndiName(id);
        if ( res != null ) {
            return Resources.ADMIN_OBJECT_RESOURCE;
        }

        res = root.getConnectorResourceByJndiName(id);
        if ( res != null ) {
            return Resources.CONNECTOR_RESOURCE;
        }

        res = root.getResourceAdapterConfigByResourceAdapterName(id);
        if ( res != null ) {
            return Resources.RESOURCE_ADAPTER_CONFIG;
        }

        if (includePool) {
            res = root.getJdbcConnectionPoolByName(id);
            if ( res != null ) {
                return Resources.JDBC_CONNECTION_POOL;
            }

            res = root.getConnectorConnectionPoolByName(id);
            if ( res != null ) {
                return Resources.CONNECTOR_CONNECTION_POOL;
            }
        }

View Full Code Here

        Object clusterOrServer) throws ConfigException
    {
        final ConfigContext configContext = getConfigContext();
        final Domain domain = ConfigAPIHelper.getDomainConfigBean(
            configContext);
        final Resources resources = domain.getResources();      
        ConnectorResource[] crs = resources.getConnectorResource();
        for (int i = 0; i < crs.length; i++) {
            if (isSystemApp(crs[i].getObjectType())) {
                addResourceReference(clusterOrServer, crs[i].isEnabled(),
                    crs[i].getJndiName());
            }
        }
               
        JdbcResource[] jrs = resources.getJdbcResource();
        for (int i = 0; i < jrs.length; i++) {
            if (isSystemApp(jrs[i].getObjectType())) {
                addResourceReference(clusterOrServer, jrs[i].isEnabled(),
                    jrs[i].getJndiName());
            }
View Full Code Here

            _logger.fine("[ResourceTargetHelper] Target [" + _name
                + "] is a resource adapter config resource target of type ["
                + _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;
View Full Code Here

            return np;
        }
        private <T extends ConfigBeanProxy> NotProcessed handleAddEvent(T instance) {
            NotProcessed np = null;
            if(instance instanceof Application){
                Resources resources = ((Application)instance).getResources();
                pingConnectionPool(resources);

                Application app = (Application)instance;
                List<Module> modules = app.getModule();
                if(modules != null){
View Full Code Here

            return np;
        }
        private <T extends ConfigBeanProxy> NotProcessed handleAddEvent(T instance) {
            NotProcessed np = null;
            if(instance instanceof Application){
                Resources resources = ((Application)instance).getResources();
                pingConnectionPool(resources);

                Application app = (Application)instance;
                List<Module> modules = app.getModule();
                if(modules != null){
View Full Code Here

        deployGlobalResources();
        //deployApplicationScopedResources();
    }

    private void deployGlobalResources() {
        Resources allResources = resourceManager.getAllResources();
        Collection<Resource> resources = resourcesUtil.filterConnectorResources(allResources, moduleName, false);
        resourceManager.deployResources(resources);
    }
View Full Code Here

            }

            if (getRuntime().isServer() || getRuntime().isEmbedded()) {
                ConnectorRegistry registry = ConnectorRegistry.getInstance();
                if (registry.isTransparentDynamicReconfigPool(poolInfo)) {
                    Resources resources = getRuntime().getResources(poolInfo);
                    ResourcePool resourcePool = null;
                    if (resources != null) {
                        resourcePool = (ResourcePool) ConnectorsUtil.getResourceByName(resources, ResourcePool.class, poolInfo.getName());
                        if (resourcePool != null) {
                            ResourceDeployer deployer = getRuntime().getResourceDeployer(resourcePool);
View Full Code Here

     */
    private void checkAndDeletePool(ConnectorResource cr) throws Exception {
        String poolName = cr.getPoolName();
        ResourceInfo resourceInfo = ConnectorsUtil.getResourceInfo(cr);
        PoolInfo poolInfo = new PoolInfo(poolName, resourceInfo.getApplicationName(), resourceInfo.getModuleName());
        Resources resources = (Resources) cr.getParent();
        //Its possible that the ConnectorResource here is a ConnectorResourceeDefinition. Ignore optimization.
        if (resources != null) {
            try {
                boolean poolReferred =
                        ResourcesUtil.createInstance().isPoolReferredInServerInstance(poolInfo);
View Full Code Here

TOP

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

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.