Package org.apache.fulcrum.yaafi.service.servicemanager

Examples of org.apache.fulcrum.yaafi.service.servicemanager.ServiceManagerService


     */
    public void testGetAndUseTestComponent()
    {
        try
        {
            ServiceManagerService serviceManagerService
                    = ServiceManagerServiceImpl.getInstance();
            assertNotNull(serviceManagerService);

            assertTrue(serviceManagerService.hasService(TestComponent.ROLE));
            TestComponent tc = (TestComponent)
                    serviceManagerService.lookup(TestComponent.ROLE);
            tc.test();
            serviceManagerService.release(tc);
        }
        catch(Exception e)
        {
            e.printStackTrace();
            fail();
View Full Code Here


    /**
     * Access the ServiceManagerService
     */
    public void testServiceManagerService() throws Exception
    {
        ServiceManagerService serviceManagerService = ServiceManagerServiceImpl.getInstance();
        assertNotNull(serviceManagerService);

        assertNotNull( serviceManagerService.getAvalonLogger() );
        assertNotNull( serviceManagerService.getContext().get("urn:avalon:home") );
        assertNotNull( serviceManagerService.getContext().get("urn:avalon:temp") );

        // get the parameters
        serviceManagerService.getParameters();

        // lookup the service
        serviceManagerService = (ServiceManagerService) serviceManagerService.lookup( ServiceManagerService.class.getName() );
        assertTrue( serviceManagerService.hasService( ServiceManagerService.class.getName() ) );
        assertTrue( serviceManagerService.getServiceManager() instanceof ServiceManager );
        serviceManagerService.release(serviceManagerService);
    }
View Full Code Here

TOP

Related Classes of org.apache.fulcrum.yaafi.service.servicemanager.ServiceManagerService

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.