Package org.apache.turbine.services

Examples of org.apache.turbine.services.ServiceManager


    public TurbineNonPersistentSchedulerServiceTest(String name)
            throws Exception
    {
        super(name);

        ServiceManager serviceManager = TurbineServices.getInstance();
        serviceManager.setApplicationRoot(".");

        Configuration cfg = new BaseConfiguration();
        cfg.setProperty(PREFIX + "classname", TurbineNonPersistentSchedulerService.class.getName());

        cfg.setProperty(PREFIX + "scheduler.jobs", "SimpleJob");
        cfg.setProperty(PREFIX + "scheduler.job.SimpleJob.ID", "1");
        cfg.setProperty(PREFIX + "scheduler.job.SimpleJob.SECOND", "10");
        cfg.setProperty(PREFIX + "scheduler.job.SimpleJob.MINUTE", "-1");
        cfg.setProperty(PREFIX + "scheduler.job.SimpleJob.HOUR", "-1");
        cfg.setProperty(PREFIX + "scheduler.job.SimpleJob.WEEK_DAY", "-1");
        cfg.setProperty(PREFIX + "scheduler.job.SimpleJob.DAY_OF_MONTH", "-1");
        cfg.setProperty(PREFIX + "enabled", "true");

        serviceManager.setConfiguration(cfg);

        try
        {
            serviceManager.init();
        }
        catch (Exception e)
        {
            e.printStackTrace();
            fail();
View Full Code Here


        }
    }

    public void testSelection() throws Exception
    {
        ServiceManager serviceManager = TurbineServices.getInstance();
          serviceManager.setApplicationRoot(".");

          Configuration cfg = new BaseConfiguration();

          cfg.setProperty(PREFIX + "classname",
                          MockSecurityService.class.getName());

          cfg.setProperty(PREFIX + "acl.class",
                          TurbineAccessControlList.class.getName());

          // We must run init!
          cfg.setProperty(PREFIX+"earlyInit", "true");

          /* Ugh */

//         cfg.setProperty("services." + FactoryService.SERVICE_NAME + ".classname",
   //                       TurbineFactoryService.class.getName());

          serviceManager.setConfiguration(cfg);

          serviceManager.init();

          Class aclClass = TurbineSecurity.getService().getAclClass();

          if(!aclClass.getName().equals(TurbineAccessControlList.class.getName()))
          {
View Full Code Here

TOP

Related Classes of org.apache.turbine.services.ServiceManager

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.