Examples of BootManager


Examples of org.apache.yoko.orb.OB.BootManager

        HelloWorld hello = hwImpl._this(orb);

        // Add reference to the boot manager
        try {
            byte[] oid = ("hw").getBytes();
            BootManager bootManager = BootManagerHelper.narrow(
                orb.resolve_initial_references("BootManager"));
            bootManager.add_binding(oid, hello);
        } catch (InvalidName ex) {
            throw new RuntimeException();
        } catch (AlreadyExists ex) {
            throw new RuntimeException();
        }
View Full Code Here

Examples of org.apache.yoko.orb.OB.BootManager

        HelloWorld hello = hwImpl._this(orb);

        // Add reference to the boot manager
        try {
            byte[] oid = ("hw").getBytes();
            BootManager bootManager = BootManagerHelper.narrow(
                orb.resolve_initial_references("BootManager"));
            bootManager.add_binding(oid, hello);
        } catch (InvalidName ex) {
            throw new RuntimeException();
        } catch (AlreadyExists ex) {
            throw new RuntimeException();
        }
View Full Code Here

Examples of vn.pyco.tinycms.services.BootManager

     * @see org.apache.tapestry5.services.ApplicationInitializerFilter#initializeApplication(org.apache.tapestry5.services.Context, org.apache.tapestry5.services.ApplicationInitializer)
     */
    @Override
    public void initializeApplication(Context context, ApplicationInitializer initializer) {
        // Init boot from boot file path
        BootManager bootManager = BootManager.getInstance();
        bootManager.setBootFilePath(context.getRealFile("/WEB-INF/boot.properties").getAbsolutePath());
       
        //handle DataInitializer
        if (bootManager.isSetup()) {
            List<DataInitializer> dataInitializers = new ArrayList<DataInitializer>();
            String[] beanNames = _appContext.getBeanNamesForType(DataInitializer.class);
            for (String beanName : beanNames) {
                dataInitializers.add((DataInitializer) _appContext.getBean(beanName));
            }
           
            dataInitializers = sortInitializers(dataInitializers);
            for (DataInitializer dataInitializer : dataInitializers) {
                try {
                    dataInitializer.initialize();
                } catch (Exception e) {
                    logger.error("An error ocurred when initilizing entities.", e);
                }
            }
           
            bootManager.setSetup(false);
            bootManager.save();
        }
       
        initializer.initializeApplication(context);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.