Package com.sun.enterprise.ee.synchronization

Examples of com.sun.enterprise.ee.synchronization.SynchronizationException


            app = ((Domain)_ctx.getRootConfigBean()).
                                    getApplications().
                                    getAppclientModuleByName(appName);
        } catch (ConfigException ce) {
            String msg=_localStrMgr.getString("UnknownApplicationId", appName);
            throw new SynchronizationException(msg, ce);
        }

        AppclientModuleRequestBuilder appReqBuilder =
             new AppclientModuleRequestBuilder(_ctx,_serverName);
View Full Code Here


            app = ((Domain)_ctx.getRootConfigBean()).
                                    getApplications().
                                    getEjbModuleByName(appName);
        } catch (ConfigException ce) {
            String msg=_localStrMgr.getString("UnknownApplicationId", appName);
            throw new SynchronizationException(msg, ce);
        }

        EjbModuleRequestBuilder appReqBuilder =
             new EjbModuleRequestBuilder(_ctx,_serverName);
View Full Code Here

            app = ((Domain)_ctx.getRootConfigBean()).
                                    getApplications().
                                    getLifecycleModuleByName(appName);
        } catch (ConfigException ce) {
            String msg=_localStrMgr.getString("UnknownApplicationId", appName);
            throw new SynchronizationException(msg, ce);
        }

        LifecycleModuleRequestBuilder appReqBuilder =
             new LifecycleModuleRequestBuilder(_ctx,_serverName);
View Full Code Here

            app = ((Domain)_ctx.getRootConfigBean()).
                                    getApplications().
                                    getWebModuleByName(appName);
        } catch (ConfigException ce) {
            String msg=_localStrMgr.getString("UnknownApplicationId", appName);
            throw new SynchronizationException(msg, ce);
        }

        WebModuleRequestBuilder appReqBuilder =
             new WebModuleRequestBuilder(_ctx,_serverName);
View Full Code Here

            app = ((Domain)_ctx.getRootConfigBean()).
                                    getApplications().
                                    getConnectorModuleByName(appName);
        } catch (ConfigException ce) {
            String msg=_localStrMgr.getString("UnknownApplicationId", appName);
            throw new SynchronizationException(msg, ce);
        }

        ConnectorModuleRequestBuilder appReqBuilder =
             new ConnectorModuleRequestBuilder(_ctx,_serverName);
View Full Code Here

            app = ((Domain)_ctx.getRootConfigBean()).
                                    getApplications().
                                    getExtensionModuleByName(appName);
        } catch (ConfigException ce) {
            String msg=_localStrMgr.getString("UnknownApplicationId", appName);
            throw new SynchronizationException(msg, ce);
        }

       ExtensionModuleRequestBuilder appReqBuilder =
             new ExtensionModuleRequestBuilder(_ctx,_serverName);
View Full Code Here

        try {
            // reads DAS system JMX connector information
            dpr.read();
        } catch (IOException ioe) {
            String msg=_localStrMgr.getString("DASPropertyReadError");
            throw new SynchronizationException(msg, ioe);
        }

      TransactionManager txMgr=TransactionManager.getTransactionManager();

        // begin a transaction for the synchronization; it is a
        // single threaded transaction
        Transaction tx = txMgr.begin(1);

        boolean httpException             = false;
        HttpGroupRequestMediator httpGrm  = null;
        try {
            // execute synchronization using http
            String url = HttpUtils.getSynchronizationURL(_ctx, dpr);
            httpGrm = new HttpGroupRequestMediator(dpr, allReqs, tx, url);
            httpGrm.run();
        } catch (Exception e) {
            httpException = true;
        }

        // if web path based synchronization failed
        if (httpGrm.isException() || httpException) {

            _logger.log(Level.FINE,
                "Http based synchronization failed, trying jmx based impl..",
                httpGrm.getException());

            // re-try the synchronization request using jmx
            JmxGroupRequestMediator jmxGrm =
                    new JmxGroupRequestMediator(dpr, allReqs, tx);
            jmxGrm.run();

            if (jmxGrm.isException()) {
                // synchronization failed
                throw new SynchronizationException(jmxGrm.getException());
            }
        }
    }
View Full Code Here

        try {
            sc.connect();
            _logger.log(Level.FINEST,
                    "clb.admin.ConnectedToDAS" );
        } catch (IOException ie) {
           throw new SynchronizationException("Connection to SynchronizationClientImpl failed. IOException occured while trying to connect " + ie.getMessage());
        }
        String instanceRoot = System.getProperty(SystemPropertyConstants.INSTANCE_ROOT_PROPERTY);

        String configName = getConfigName(e, serverName);

        String clbTargetLocation = instanceRoot + File.separator + CONFIG + File.separator + configName;

        //Added as a workaround for scenario when config-dir does not exist
        //under instance config
        final File clbTargetDir = new File(clbTargetLocation);
        if (!clbTargetDir.exists()) {
            try {
                AccessController.doPrivileged(new PrivilegedAction() {
                    public Object run() {
                        clbTargetDir.mkdir();
                        return null;
                    }
                });
            } catch (SecurityException ex) {
                throw new SynchronizationException(
                    "Unable to create directory " + clbTargetLocation, ex);
            }
        }
       
        _logger.log(Level.FINEST,
View Full Code Here

            }

            return config.getName();

        } catch (ConfigException ce) {
            throw new SynchronizationException("Unable to resolve configuration name");
        }

    }
View Full Code Here

        try {
            sc.connect();
            _logger.log(Level.FINEST,
                    "clb.admin.ConnectedToDAS" );
        } catch (IOException ie) {
           throw new SynchronizationException("Connection to SynchronizationClientImpl failed. IOException occured while trying to connect " + ie.getMessage());
        }
        String instanceRoot = System.getProperty(SystemPropertyConstants.INSTANCE_ROOT_PROPERTY);

        String configName = getConfigName(e, serverName);

        String clbTargetLocation = instanceRoot + File.separator + CONFIG + File.separator + configName;

        //Added as a workaround for scenario when config-dir does not exist
        //under instance config
        final File clbTargetDir = new File(clbTargetLocation);
        if (!clbTargetDir.exists()) {
            try {
                AccessController.doPrivileged(new PrivilegedAction() {
                    public Object run() {
                        clbTargetDir.mkdir();
                        return null;
                    }
                });
            } catch (SecurityException ex) {
                throw new SynchronizationException(
                    "Unable to create directory " + clbTargetLocation, ex);
            }
        }
       
        if(oldXMLFileName !=null)
View Full Code Here

TOP

Related Classes of com.sun.enterprise.ee.synchronization.SynchronizationException

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.