Package com.sun.ejb.containers

Examples of com.sun.ejb.containers.EjbContainerUtil


    }

    static void initEJBTimerService(String target) {
        EJBTimerService ts = null;

        EjbContainerUtil _ejbContainerUtil = EjbContainerUtilImpl.getInstance();
        EjbTimerService _ejbt = _ejbContainerUtil.getEjbTimerService(target);
        String resourceName = getTimerResource(_ejbt);

        File root = _ejbContainerUtil.getServerContext().getInstallRoot();
        boolean is_upgrade = isUpgrade(resourceName, _ejbt, root);

        File rootScratchDir = _ejbContainerUtil.getServerEnvironment().getApplicationStubPath();
        File appScratchFile = new File(rootScratchDir, TIMER_SERVICE_APP_NAME);

        // Remember the value before the file is created during deploy
        boolean removeOldTimers = is_upgrade && !appScratchFile.exists();

        boolean available = _ejbContainerUtil.getDeployment().isRegistered(TIMER_SERVICE_APP_NAME);
        if (available) {
            logger.log (Level.WARNING, "EJBTimerService had been explicitly deployed.");
        } else {
            if (resourceName != null) {
                available = deployEJBTimerService(root, appScratchFile, resourceName, is_upgrade);
View Full Code Here


        } else {
            DeployCommandParameters params = new DeployCommandParameters(app);
            params.name = TIMER_SERVICE_APP_NAME;

            try {
                EjbContainerUtil _ejbContainerUtil = EjbContainerUtilImpl.getInstance();
                // appScratchFile is a marker file and needs to be created on Das on the
                // first access of the Timer Service application
                if (_ejbContainerUtil.isDas() && appScratchFile.createNewFile() && !is_upgrade) {
                    params.origin = OpsParams.Origin.deploy;
                } else {
                    params.origin = OpsParams.Origin.load;
                }
                params.target = _ejbContainerUtil.getServerEnvironment().getInstanceName();

                ActionReport report = _ejbContainerUtil.getServices().
                        getService(ActionReport.class, "plain");
                Deployment deployment = _ejbContainerUtil.getDeployment();
                ExtendedDeploymentContext dc = deployment.getBuilder(
                        logger, params, report).source(app).build();
                dc.addTransientAppMetaData(DatabaseConstants.JTA_DATASOURCE_JNDI_NAME_OVERRIDE, resourceName);
                Properties appProps = dc.getAppProps();
                appProps.setProperty(ServerTags.OBJECT_TYPE, DeploymentProperties.SYSTEM_ALL);
View Full Code Here

    }

    static void initEJBTimerService(String target) {
        EJBTimerService ts = null;

        EjbContainerUtil _ejbContainerUtil = EjbContainerUtilImpl.getInstance();
        EjbTimerService _ejbt = _ejbContainerUtil.getEjbTimerService(target);
        String resourceName = getTimerResource(_ejbt);

        File root = _ejbContainerUtil.getServerContext().getInstallRoot();
        boolean is_upgrade = isUpgrade(resourceName, _ejbt, root);

        File rootScratchDir = _ejbContainerUtil.getServerEnvironment().getApplicationStubPath();
        File appScratchFile = new File(rootScratchDir, TIMER_SERVICE_APP_NAME);

        // Remember the value before the file is created during deploy
        boolean removeOldTimers = is_upgrade && !appScratchFile.exists();

        boolean available = _ejbContainerUtil.getDeployment().isRegistered(TIMER_SERVICE_APP_NAME);
        if (available) {
            logger.log (Level.WARNING, "EJBTimerService had been explicitly deployed.");
        } else {
            if (resourceName != null) {
                available = deployEJBTimerService(root, appScratchFile, resourceName, is_upgrade);
View Full Code Here

            params.name = TIMER_SERVICE_APP_NAME;

            try {
                // appScratchFile is a marker file and needs to be created on Das on the
                // first access of the Timer Service application - so use & instead of &&
                EjbContainerUtil _ejbContainerUtil = EjbContainerUtilImpl.getInstance();
                if (_ejbContainerUtil.isDas() && (!is_upgrade & appScratchFile.createNewFile())) {
                    params.origin = OpsParams.Origin.deploy;
                } else {
                    params.origin = OpsParams.Origin.load;
                }
                params.target = _ejbContainerUtil.getServerEnvironment().getInstanceName();

                ActionReport report = _ejbContainerUtil.getServices().
                        getService(ActionReport.class, "plain");
                Deployment deployment = _ejbContainerUtil.getDeployment();
                ExtendedDeploymentContext dc = deployment.getBuilder(
                        logger, params, report).source(app).build();
                dc.addTransientAppMetaData(DatabaseConstants.JTA_DATASOURCE_JNDI_NAME_OVERRIDE, resourceName);
                Properties appProps = dc.getAppProps();
                appProps.setProperty(ServerTags.OBJECT_TYPE, DeploymentProperties.SYSTEM_ALL);
View Full Code Here

    private void registerEjbInterceptor() {
        try {
            final Object interceptor = new EjbComponentInterceptor(locator);
            initialContext = getInitialContext();
            final EjbContainerUtil ejbUtil = EjbContainerUtilImpl.getInstance();
            final ApplicationInfo appInfo = ejbUtil.getDeployment().get((String)initialContext.lookup("java:app/AppName"));
            final List<String> tempLibNames = new LinkedList<String>();
            for (ModuleInfo moduleInfo : appInfo.getModuleInfos()) {
                final String jarName = moduleInfo.getName();
                if (jarName.endsWith(".jar")) {
                    final String moduleName = jarName.substring(0, jarName.length() - 4);
View Full Code Here

    }

    static void initEJBTimerService(String target) {
        EJBTimerService ts = null;

        EjbContainerUtil _ejbContainerUtil = EjbContainerUtilImpl.getInstance();
        EjbTimerService _ejbt = _ejbContainerUtil.getEjbTimerService(target);
        String resourceName = getTimerResource(_ejbt);

        File root = _ejbContainerUtil.getServerContext().getInstallRoot();
        boolean is_upgrade = isUpgrade(resourceName, _ejbt, root);

        File rootScratchDir = _ejbContainerUtil.getServerEnvironment().getApplicationStubPath();
        File appScratchFile = new File(rootScratchDir, TIMER_SERVICE_APP_NAME);

        // Remember the value before the file is created during deploy
        boolean removeOldTimers = is_upgrade && !appScratchFile.exists();

        boolean available = _ejbContainerUtil.getDeployment().isRegistered(TIMER_SERVICE_APP_NAME);
        if (available) {
            logger.log (Level.WARNING, "EJBTimerService had been explicitly deployed.");
        } else {
            if (resourceName != null) {
                available = deployEJBTimerService(root, appScratchFile, resourceName, is_upgrade);
View Full Code Here

            params.name = TIMER_SERVICE_APP_NAME;

            try {
                // appScratchFile is a marker file and needs to be created on Das on the
                // first access of the Timer Service application - so use & instead of &&
                EjbContainerUtil _ejbContainerUtil = EjbContainerUtilImpl.getInstance();
                if (_ejbContainerUtil.isDas() && (!is_upgrade & appScratchFile.createNewFile())) {
                    params.origin = OpsParams.Origin.deploy;
                } else {
                    params.origin = OpsParams.Origin.load;
                }
                params.target = _ejbContainerUtil.getServerEnvironment().getInstanceName();

                ActionReport report = _ejbContainerUtil.getServices().
                        getService(ActionReport.class, "plain");
                Deployment deployment = _ejbContainerUtil.getDeployment();
                ExtendedDeploymentContext dc = deployment.getBuilder(
                        logger, params, report).source(app).build();
                dc.addTransientAppMetaData(DatabaseConstants.JTA_DATASOURCE_JNDI_NAME_OVERRIDE, resourceName);
                Properties appProps = dc.getAppProps();
                appProps.setProperty(ServerTags.OBJECT_TYPE, DeploymentProperties.SYSTEM_ALL);
View Full Code Here

TOP

Related Classes of com.sun.ejb.containers.EjbContainerUtil

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.