Examples of InstanceManager


Examples of com.openbravo.pos.instance.InstanceManager

        if (m_rootapp.initApp(m_props)) {
           
            if ("true".equals(props.getProperty("machine.uniqueinstance"))) {
                // Register the running application
                try {
                    m_instmanager = new InstanceManager(this);
                } catch (Exception e) {
                }
            }
       
            // Show the application
View Full Code Here

Examples of com.openbravo.pos.instance.InstanceManager


            if ("true".equals(props.getProperty("machine.uniqueinstance"))) {
                // Register the running application
                try {
                    m_instmanager = new InstanceManager(this);
                } catch (Exception e) {
                }
            }
       
            // Show the application
View Full Code Here

Examples of eu.stratosphere.nephele.instance.InstanceManager

    } catch (ClassNotFoundException e) {
      LOG.error("Cannot find class " + instanceManagerClassName + ": " + StringUtils.stringifyException(e));
      return null;
    }

    InstanceManager instanceManager;

    try {
      instanceManager = instanceManagerClass.newInstance();
    } catch (InstantiationException e) {
      LOG.error("Cannot create instanceManager: " + StringUtils.stringifyException(e));
View Full Code Here

Examples of org.apache.InstanceManager

    private InstanceManagerFactory() {
    }

    public static InstanceManager getInstanceManager(ServletConfig config) {
        InstanceManager instanceManager =
          (InstanceManager) config.getServletContext().getAttribute(InstanceManager.class.getName());
        if (instanceManager == null) {
            throw new IllegalStateException("No org.apache.InstanceManager set in ServletContext");
        }
        return instanceManager;
View Full Code Here

Examples of org.apache.InstanceManager

                unavailable(null);
                throw new ServletException
                    (sm.getString("standardWrapper.notClass", getName()));
            }

            InstanceManager instanceManager = ((StandardContext)getParent()).getInstanceManager();
            try {
                servlet = (Servlet) instanceManager.newInstance(actualClass);
            } catch (ClassCastException e) {
                unavailable(null);
                // Restore the context ClassLoader
                throw new ServletException
                    (sm.getString("standardWrapper.notServlet", actualClass), e);
View Full Code Here

Examples of org.apache.InstanceManager

    private InstanceManagerFactory() {
    }

    public static InstanceManager getInstanceManager(ServletConfig config) {
        InstanceManager instanceManager =
          (InstanceManager) config.getServletContext().getAttribute(InstanceManager.class.getName());
        if (instanceManager == null) {
            throw new IllegalStateException("No org.apache.InstanceManager set in ServletContext");
        }
        return instanceManager;
View Full Code Here

Examples of org.apache.felix.ipojo.InstanceManager

        Assert.assertTrue(found);

        // Check the POJO interface
        Assert.assertTrue(Arrays.asList(cl.getInterfaces()).contains(Pojo.class));

        InstanceManager im = Mockito.mock(InstanceManager.class);
        cst.setAccessible(true);
        Object pojo = cst.newInstance(new Object[]{im});
        Assert.assertNotNull(pojo);
        Assert.assertTrue(pojo instanceof Pojo);
        Method method = cl.getMethod("doSomething", new Class[0]);
View Full Code Here

Examples of org.apache.felix.ipojo.InstanceManager

        Assert.assertFalse(manipulator.getInnerClasses().isEmpty());
        // We should have found only 2 inner classes.
        assertThat(manipulator.getInnerClasses().size()).isEqualTo(3);

        // Check that all inner classes are manipulated.
        InstanceManager im = Mockito.mock(InstanceManager.class);
        Constructor constructor = clazz.getDeclaredConstructor(InstanceManager.class);
        constructor.setAccessible(true);
        Object pojo = constructor.newInstance(im);
        Assert.assertNotNull(pojo);
        Assert.assertTrue(pojo instanceof Pojo);
View Full Code Here

Examples of org.apache.felix.ipojo.InstanceManager

        Assert.assertFalse(manipulator.getInnerClasses().isEmpty());
        // We should have found only 2 inner classes.
        assertThat(manipulator.getInnerClasses().size()).isEqualTo(3);

        // Check that all inner classes are manipulated.
        InstanceManager im = Mockito.mock(InstanceManager.class);
        Constructor constructor = clazz.getDeclaredConstructor(InstanceManager.class);
        constructor.setAccessible(true);
        Object pojo = constructor.newInstance(im);
        Assert.assertNotNull(pojo);
        Assert.assertTrue(pojo instanceof Pojo);
View Full Code Here

Examples of org.apache.felix.ipojo.InstanceManager

        // Check the POJO interface
        Assert.assertTrue(Arrays.asList(cl.getInterfaces()).contains(Pojo.class));

        cst.setAccessible(true);
        Object pojo = cst.newInstance(new Object[] {new InstanceManager()});
        Assert.assertNotNull(pojo);
        Assert.assertTrue(pojo instanceof Pojo);

        Method method = cl.getMethod("doSomething", new Class[0]);
        Assert.assertTrue(((Boolean) method.invoke(pojo, new Object[0])).booleanValue());
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.