Package org.glassfish.resourcebase.resources.api

Examples of org.glassfish.resourcebase.resources.api.ResourceInfo


     * given a resource config bean, returns the resource name / jndi-name
     * @param resource
     * @return resource name / jndi-name
     */
    public static ResourceInfo getGenericResourceInfo(Resource resource){
        ResourceInfo resourceInfo = null;
        String resourceName = resource.getIdentity();
        resourceInfo = getGenericResourceInfo(resource, resourceName);
        return resourceInfo;
    }
View Full Code Here


    }

    public static ResourceInfo getGenericResourceInfo(Resource resource, String resourceName){
        if(resource.getParent() != null && resource.getParent().getParent() instanceof Application){
            Application application = (Application)resource.getParent().getParent();
            return new ResourceInfo(resourceName, application.getName());
        }else if(resource.getParent() != null && resource.getParent().getParent() instanceof Module){
            Module module = (Module)resource.getParent().getParent();
            Application application = (Application)module.getParent();
            return new ResourceInfo(resourceName, application.getName(), module.getName());
        }else{
            return new ResourceInfo(resourceName);
        }
    }
View Full Code Here

        if(_logger.isLoggable(Level.FINE)) {
            _logger.log(Level.FINE,"ConcurrentNamingObjectFactory: " + ref +
                    " Name:" + name);
        }
        BaseConfig config = (BaseConfig) ref.get(0).getContent();
        ResourceInfo resourceInfo = (ResourceInfo) ref.get(1).getContent();

        Object instance = null;
        switch(config.getType()) {
            case CONTEXT_SERVICE:
                instance = getContextService((ContextServiceConfig)config, resourceInfo);
View Full Code Here

        if(_logger.isLoggable(Level.FINE)) {
            _logger.log(Level.FINE, "ManagedExecutorServiceDeployer.deployResource() : jndi-name ["+jndiName+"], ");
        }


        ResourceInfo resourceInfo = new ResourceInfo(managedExecutorServiceRes.getJndiName(), applicationName, moduleName);
        ManagedExecutorServiceConfig config = new ManagedExecutorServiceConfig(managedExecutorServiceRes);

        javax.naming.Reference ref= new  javax.naming.Reference(
                javax.enterprise.concurrent.ManagedExecutorService.class.getName(),
                "org.glassfish.concurrent.runtime.deployer.ConcurrentObjectFactory",
View Full Code Here

    @Override
    public void deployResource(Object resource) throws Exception {
        ManagedExecutorService managedExecutorServiceResource =
                (ManagedExecutorService) resource;
        ResourceInfo resourceInfo = ResourceUtil.getResourceInfo(managedExecutorServiceResource);
        deployResource(resource, resourceInfo.getApplicationName(), resourceInfo.getModuleName());
    }
View Full Code Here

    @Override
    public void undeployResource(Object resource) throws Exception {
        ManagedExecutorService managedExecutorServiceResource =
                (ManagedExecutorService) resource;
        ResourceInfo resourceInfo = ResourceUtil.getResourceInfo(managedExecutorServiceResource);
        undeployResource(resource, resourceInfo.getApplicationName(), resourceInfo.getModuleName());
    }
View Full Code Here

    }

    @Override
    public void undeployResource(Object resource, String applicationName, String moduleName) throws Exception {
        ManagedExecutorService managedExecutorServiceRes = (ManagedExecutorService) resource;
        ResourceInfo resourceInfo = new ResourceInfo(managedExecutorServiceRes.getJndiName(), applicationName, moduleName);
        namingService.unpublishObject(resourceInfo, managedExecutorServiceRes.getJndiName());
        // stop the runtime object
        concurrentRuntime.shutdownManagedExecutorService(managedExecutorServiceRes.getJndiName());
    }
View Full Code Here

        if(_logger.isLoggable(Level.FINE)) {
            _logger.log(Level.FINE, "ManagedThreadFactoryDeployer.deployResource() : jndi-name ["+jndiName+"]");
        }


        ResourceInfo resourceInfo = new ResourceInfo(ManagedThreadFactoryRes.getJndiName(), applicationName, moduleName);
        ManagedThreadFactoryConfig config = new ManagedThreadFactoryConfig(ManagedThreadFactoryRes);

        javax.naming.Reference ref= new  javax.naming.Reference(
                javax.enterprise.concurrent.ManagedThreadFactory.class.getName(),
                "org.glassfish.concurrent.runtime.deployer.ConcurrentObjectFactory",
View Full Code Here

    @Override
    public void deployResource(Object resource) throws Exception {
        ManagedThreadFactory ManagedThreadFactoryResource =
                (ManagedThreadFactory) resource;
        ResourceInfo resourceInfo = ResourceUtil.getResourceInfo(ManagedThreadFactoryResource);
        deployResource(resource, resourceInfo.getApplicationName(), resourceInfo.getModuleName());
    }
View Full Code Here

    @Override
    public void undeployResource(Object resource) throws Exception {
        ManagedThreadFactory ManagedThreadFactoryResource =
                (ManagedThreadFactory) resource;
        ResourceInfo resourceInfo = ResourceUtil.getResourceInfo(ManagedThreadFactoryResource);
        undeployResource(resource, resourceInfo.getApplicationName(), resourceInfo.getModuleName());
    }
View Full Code Here

TOP

Related Classes of org.glassfish.resourcebase.resources.api.ResourceInfo

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.