Package com.globant.google.mendoza.malbec.schema._2

Examples of com.globant.google.mendoza.malbec.schema._2.ObjectFactory


            }

            try {
                Class clazz = ClassLoaderUtil.loadClass(className,
                        Jsr168Dispatcher.class);
                ObjectFactory objectFactory = (ObjectFactory) clazz
                        .newInstance();
                if (objectFactory instanceof ObjectFactoryInitializable) {
                    ((ObjectFactoryInitializable) objectFactory)
                            .init(ServletContextHolderListener
                                    .getServletContext());
View Full Code Here


    /**
     * Cleans up thread local variables
     */
    public void cleanup() {
        ObjectFactory objectFactory = ObjectFactory.getObjectFactory();
        if (objectFactory == null) {
            LOG.warn("Object Factory is null, something is seriously wrong, no clean up will be performed");
        }
        if (objectFactory instanceof ObjectFactoryDestroyable) {
            try {
View Full Code Here

                        +"use the full class name: "+className);
            }

            try {
                Class clazz = ClassLoaderUtil.loadClass(className, Dispatcher.class);
                ObjectFactory objectFactory = (ObjectFactory) clazz.newInstance();
                if (servletContext != null) {
                    if (objectFactory instanceof ObjectFactoryInitializable) {
                        ((ObjectFactoryInitializable) objectFactory).init(servletContext);
                    }
                }
View Full Code Here

       
        Map<String, PackageConfig> packageConfigs = new HashMap<String, PackageConfig>();
        packageConfigs.put("test", packageConfig);
       
        Mock mockContainer = new Mock(Container.class);
        mockContainer.matchAndReturn("getInstance", C.args(C.eq(ObjectFactory.class)), new ObjectFactory());
        DefaultFileManagerFactory factory = new DefaultFileManagerFactory();
        container.inject(factory);
        mockContainer.matchAndReturn("getInstance", C.args(C.eq(FileManagerFactory.class)), factory);

        Mock mockConfiguration = new Mock(Configuration.class);
View Full Code Here

    DefaultActionInvocation inv = new DefaultActionInvocation(extraContext,
        true);
    container.inject(inv);
    // 将Bundle的ClassLoader注入到inv的objectFactory中
    try {
      ObjectFactory objectFactory = (ObjectFactory) FieldUtils.readField(
          inv, "objectFactory", true);
      @SuppressWarnings("rawtypes")
      Map requestMap = (Map) extraContext.get("request");
      String pluginName = (String) requestMap
          .get(WebContext.CONST_PLUGIN_NAME);
      Bundle bundle = OsgiContext.getBundleByName(pluginName);
      ClassLoader bundleClassLoader = BundleUtils
          .getBundleClassLoader(bundle);
      objectFactory.setClassLoader(bundleClassLoader);
    } catch (Exception ex) {
      throw new RuntimeException(ex);
    }
    return createActionProxy(inv, namespace, actionName, methodName,
        executeResult, cleanupContext);
View Full Code Here

    setDtdMappings(dtdMappings);
  }

  private void refreshObjectFactory() {
    ClassLoader bundleClassLoader = BundleUtils.getBundleClassLoader(bundle);
    ObjectFactory objectFactory = new ObjectFactory();
    objectFactory.setClassLoader(bundleClassLoader);
    this.setObjectFactory(objectFactory);
  }
View Full Code Here

            this.name = name;
            this.type = type;
        }

        public Object create(Context context) throws Exception {
            ObjectFactory objFactory = context.getContainer().getInstance(ObjectFactory.class);
            try {
                return objFactory.buildBean(name, null, true);
            } catch (ClassNotFoundException ex) {
                throw new ConfigurationException("Unable to load bean "+type.getName()+" ("+name+")");
            }
        }
View Full Code Here

    @Override
    public void setUp() throws Exception
    {
        super.setUp();
        ObjectFactory.setObjectFactory(new ObjectFactory());
        actionValidatorManager = ActionValidatorManagerFactory.getInstance();
    }
View Full Code Here

   
    @Override
    public void setUp()
    {
        configureNetworkProxyAction = new ConfigureNetworkProxyAction();
        ObjectFactory.setObjectFactory(new ObjectFactory());
        actionValidatorManager = ActionValidatorManagerFactory.getInstance();
    }
View Full Code Here

    @Override
    public void setUp() throws Exception
    {
        deleteArtifactAction = new DeleteArtifactAction();
        ObjectFactory.setObjectFactory(new ObjectFactory());
        actionValidatorManager = ActionValidatorManagerFactory.getInstance();
    }
View Full Code Here

TOP

Related Classes of com.globant.google.mendoza.malbec.schema._2.ObjectFactory

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.