Package org.glassfish.resourcebase.resources.api

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


    }

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


            _logger.log(Level.FINE, "ContextServiceDeployer.deployResource() : jndi-name ["+jndiName+"], " +
                    " context-info ["+contextInfo+"]");
        }


        ResourceInfo resourceInfo = new ResourceInfo(contextServiceRes.getJndiName(), applicationName, moduleName);
        ContextServiceConfig config = new ContextServiceConfig(contextServiceRes);

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

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

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

    }

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

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


        ResourceInfo resourceInfo = new ResourceInfo(ManagedScheduledExecutorServiceRes.getJndiName(), applicationName, moduleName);
        ManagedScheduledExecutorServiceConfig config = new ManagedScheduledExecutorServiceConfig(ManagedScheduledExecutorServiceRes);

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

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

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

    }

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

    public static ResourceInfo getResourceInfo(BindableResource resource){

        if(resource.getParent() != null && resource.getParent().getParent() instanceof Application){
            Application application = (Application)resource.getParent().getParent();
            return new ResourceInfo(resource.getJndiName(), 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(resource.getJndiName(), application.getName(), module.getName());
        }else{
            return new ResourceInfo(resource.getJndiName());
        }
    }
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.