Examples of addLoader()


Examples of org.apache.geronimo.kernel.classloader.DelegatingClassLoader.addLoader()

                return null;
            }
           
            DelegatingClassLoader proxyClassLoader = new DelegatingClassLoader();
            proxyClassLoader.addLoader(classLoader);
            proxyClassLoader.addLoader(getClass()); // to be able to load GeronimoManagedBean
           
            return createProxyFactory((Class[]) types.toArray(new Class[types.size()]), proxyClassLoader).createProxy(target);
        } catch (GBeanNotFoundException e) {
            throw new IllegalArgumentException("Could not get GBeanInfo for target object: " + target, e);
        }
View Full Code Here

Examples of org.apache.geronimo.kernel.classloader.DelegatingClassLoader.addLoader()

                types = new ArrayList<Class>();
            }
            types.add(type);

            DelegatingClassLoader proxyClassLoader = new DelegatingClassLoader();
            proxyClassLoader.addLoader(classLoader);
            proxyClassLoader.addLoader(getClass()); // to be able to load GeronimoManagedBean
           
            return (T) createProxyFactory((Class[]) types.toArray(new Class[types.size()]), proxyClassLoader).createProxy(target);
        } catch (GBeanNotFoundException e) {
            throw new IllegalArgumentException("Could not get GBeanInfo for target object: " + target, e);
View Full Code Here

Examples of org.apache.geronimo.kernel.classloader.DelegatingClassLoader.addLoader()

            }
            types.add(type);

            DelegatingClassLoader proxyClassLoader = new DelegatingClassLoader();
            proxyClassLoader.addLoader(classLoader);
            proxyClassLoader.addLoader(getClass()); // to be able to load GeronimoManagedBean
           
            return (T) createProxyFactory((Class[]) types.toArray(new Class[types.size()]), proxyClassLoader).createProxy(target);
        } catch (GBeanNotFoundException e) {
            throw new IllegalArgumentException("Could not get GBeanInfo for target object: " + target, e);
        }
View Full Code Here

Examples of org.apache.geronimo.kernel.classloader.DelegatingClassLoader.addLoader()

            if (types == null) {
                return null;
            }
           
            DelegatingClassLoader proxyClassLoader = new DelegatingClassLoader();
            proxyClassLoader.addLoader(classLoader);
            proxyClassLoader.addLoader(getClass()); // to be able to load GeronimoManagedBean
           
            return createProxyFactory((Class[]) types.toArray(new Class[types.size()]), proxyClassLoader).createProxy(target);
        } catch (GBeanNotFoundException e) {
            throw new IllegalArgumentException("Could not get GBeanInfo for target object: " + target, e);
View Full Code Here

Examples of org.apache.geronimo.kernel.classloader.DelegatingClassLoader.addLoader()

                return null;
            }
           
            DelegatingClassLoader proxyClassLoader = new DelegatingClassLoader();
            proxyClassLoader.addLoader(classLoader);
            proxyClassLoader.addLoader(getClass()); // to be able to load GeronimoManagedBean
           
            return createProxyFactory((Class[]) types.toArray(new Class[types.size()]), proxyClassLoader).createProxy(target);
        } catch (GBeanNotFoundException e) {
            throw new IllegalArgumentException("Could not get GBeanInfo for target object: " + target, e);
        }
View Full Code Here

Examples of org.apache.ibatis.executor.loader.ResultLoaderMap.addLoader()

    argValues.add("!@#@!#!@#");
    argValues.add("someone@somewhere.com");
    argValues.add("blah");
    argValues.add(Section.NEWS);
    ResultLoaderMap loader = new ResultLoaderMap();
    loader.addLoader("id", null, null);
    Object proxy = ResultObjectProxy.createProxy(author, loader, true, new DefaultObjectFactory(), argTypes, argValues);
    Object proxy2 = deserialize(serialize((Serializable) proxy));
    assertEquals(author, proxy2);
  }
View Full Code Here

Examples of org.apache.ibatis.executor.loader.ResultLoaderMap.addLoader()

  }

  @Test
  public void shouldCreateAProxyForAPartiallyLoadedBean() throws Exception {
    ResultLoaderMap loader = new ResultLoaderMap();
    loader.addLoader("id", null, null);
    Object proxy = ResultObjectProxy.createProxy(author, loader, true, new DefaultObjectFactory(), new ArrayList<Class>(), new ArrayList<Object>());
    Author author2 = (Author) deserialize(serialize((Serializable) proxy));
    assertTrue(author2.getClass().getName().contains("CGLIB"));
  }
View Full Code Here

Examples of org.apache.ibatis.executor.loader.ResultLoaderMap.addLoader()

  }

  @Test(expected=ExecutorException.class)
  public void shouldNotLetReadUnloadedPropertyAfterSerialization() throws Exception {
    ResultLoaderMap loader = new ResultLoaderMap();
    loader.addLoader("id", null, null);
    Object proxy = ResultObjectProxy.createProxy(author, loader, true, new DefaultObjectFactory(), new ArrayList<Class>(), new ArrayList<Object>());
    Author author2 = (Author) deserialize(serialize((Serializable) proxy));
    author2.getId();
  }
View Full Code Here

Examples of org.apache.ibatis.executor.loader.ResultLoaderMap.addLoader()

  }

  @Test(expected=ExecutorException.class)
  public void shouldNotLetReadUnloadedPropertyAfterTwoSerializations() throws Exception {
    ResultLoaderMap loader = new ResultLoaderMap();
    loader.addLoader("id", null, null);
    Object proxy = ResultObjectProxy.createProxy(author, loader, true, new DefaultObjectFactory(), new ArrayList<Class>(), new ArrayList<Object>());
    Author author2 = (Author) deserialize(serialize(deserialize(serialize((Serializable) proxy))));
    author2.getId();
  }
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.