Examples of CherryPickClassLoader


Examples of org.infinispan.test.CherryPickClassLoader

   private void readOldCarWithNewVersion(byte[] oldCarbytes,
         MarshallingMethod method, boolean isNewExternalizer) throws Exception {
      // Set up a different classloader to load a different version of the class
      String[] included = new String[]{CAR, CAR_EXT};
      ClassLoader tccl = Thread.currentThread().getContextClassLoader();
      ClassLoader cherryPickCl = new CherryPickClassLoader(included, null, tccl);
      Thread.currentThread().setContextClassLoader(cherryPickCl);
      ClassPool pool = ClassPool.getDefault();
      // Insert a classpath so that Maven does not complain about not finding the class
      pool.insertClassPath(new ClassClassPath(Car.class));
      CtClass carCt = pool.get(CAR);
View Full Code Here

Examples of org.infinispan.test.CherryPickClassLoader

   private void readOldPersonWithNewVersion(byte[] bytes,
         MarshallingMethod method, boolean isNewExternalizer) throws Exception {
      // Set up a different classloader to load a different version of the class
      String[] included = new String[]{PERSON, PERSON_EXT};
      ClassLoader tccl = Thread.currentThread().getContextClassLoader();
      ClassLoader cherryPickCl = new CherryPickClassLoader(included, null, tccl);
      Thread.currentThread().setContextClassLoader(cherryPickCl);
      ClassPool pool = ClassPool.getDefault();
      CtClass ct = pool.get(PERSON);
      try {
         ct.addField(CtField.make("public String name;", ct));
View Full Code Here

Examples of org.infinispan.test.CherryPickClassLoader

   private void readOldHouseWithNewVersion(byte[] bytes,
         MarshallingMethod method, boolean isNewExternalizer) throws Exception {
      // Set up a different classloader to load a different version of the class
      String[] included = new String[]{HOUSE, HOUSE_EXT};
      ClassLoader tccl = Thread.currentThread().getContextClassLoader();
      ClassLoader cherryPickCl = new CherryPickClassLoader(included, null, tccl);
      Thread.currentThread().setContextClassLoader(cherryPickCl);
      ClassPool pool = ClassPool.getDefault();
      CtClass ct = pool.get(HOUSE);
      try {
         ct.removeField(ct.getField("number"));
View Full Code Here

Examples of org.infinispan.test.CherryPickClassLoader

   private void readOldCarWithNewVersion(byte[] oldCarbytes,
         MarshallingMethod method, boolean isNewExternalizer) throws Exception {
      // Set up a different classloader to load a different version of the class
      String[] included = new String[]{CAR, CAR_EXT};
      ClassLoader tccl = Thread.currentThread().getContextClassLoader();
      ClassLoader cherryPickCl = new CherryPickClassLoader(included, null, tccl);
      Thread.currentThread().setContextClassLoader(cherryPickCl);
      ClassPool pool = ClassPool.getDefault();
      // Insert a classpath so that Maven does not complain about not finding the class
      pool.insertClassPath(new ClassClassPath(Car.class));
      CtClass carCt = pool.get(CAR);
View Full Code Here

Examples of org.infinispan.test.CherryPickClassLoader

   private void readOldPersonWithNewVersion(byte[] bytes,
         MarshallingMethod method, boolean isNewExternalizer) throws Exception {
      // Set up a different classloader to load a different version of the class
      String[] included = new String[]{PERSON, PERSON_EXT};
      ClassLoader tccl = Thread.currentThread().getContextClassLoader();
      ClassLoader cherryPickCl = new CherryPickClassLoader(included, null, tccl);
      Thread.currentThread().setContextClassLoader(cherryPickCl);
      ClassPool pool = ClassPool.getDefault();
      CtClass ct = pool.get(PERSON);
      try {
         ct.addField(CtField.make("public String name;", ct));
View Full Code Here

Examples of org.infinispan.test.CherryPickClassLoader

   private void readOldHouseWithNewVersion(byte[] bytes,
         MarshallingMethod method, boolean isNewExternalizer) throws Exception {
      // Set up a different classloader to load a different version of the class
      String[] included = new String[]{HOUSE, HOUSE_EXT};
      ClassLoader tccl = Thread.currentThread().getContextClassLoader();
      ClassLoader cherryPickCl = new CherryPickClassLoader(included, null, tccl);
      Thread.currentThread().setContextClassLoader(cherryPickCl);
      ClassPool pool = ClassPool.getDefault();
      CtClass ct = pool.get(HOUSE);
      try {
         ct.removeField(ct.getField("number"));
View Full Code Here

Examples of org.infinispan.test.CherryPickClassLoader

   private void readOldCarWithNewVersion(byte[] oldCarbytes,
         MarshallingMethod method, boolean isNewExternalizer) throws Exception {
      // Set up a different classloader to load a different version of the class
      String[] included = new String[]{CAR, CAR_EXT};
      ClassLoader tccl = Thread.currentThread().getContextClassLoader();
      ClassLoader cherryPickCl = new CherryPickClassLoader(included, null, tccl);
      Thread.currentThread().setContextClassLoader(cherryPickCl);
      ClassPool pool = ClassPool.getDefault();
      // Insert a classpath so that Maven does not complain about not finding the class
      pool.insertClassPath(new ClassClassPath(Car.class));
      CtClass carCt = pool.get(CAR);
View Full Code Here

Examples of org.infinispan.test.CherryPickClassLoader

   private void readOldPersonWithNewVersion(byte[] bytes,
         MarshallingMethod method, boolean isNewExternalizer) throws Exception {
      // Set up a different classloader to load a different version of the class
      String[] included = new String[]{PERSON, PERSON_EXT};
      ClassLoader tccl = Thread.currentThread().getContextClassLoader();
      ClassLoader cherryPickCl = new CherryPickClassLoader(included, null, tccl);
      Thread.currentThread().setContextClassLoader(cherryPickCl);
      ClassPool pool = ClassPool.getDefault();
      CtClass ct = pool.get(PERSON);
      try {
         ct.addField(CtField.make("public String name;", ct));
View Full Code Here

Examples of org.infinispan.test.CherryPickClassLoader

   private void readOldHouseWithNewVersion(byte[] bytes,
         MarshallingMethod method, boolean isNewExternalizer) throws Exception {
      // Set up a different classloader to load a different version of the class
      String[] included = new String[]{HOUSE, HOUSE_EXT};
      ClassLoader tccl = Thread.currentThread().getContextClassLoader();
      ClassLoader cherryPickCl = new CherryPickClassLoader(included, null, tccl);
      Thread.currentThread().setContextClassLoader(cherryPickCl);
      ClassPool pool = ClassPool.getDefault();
      CtClass ct = pool.get(HOUSE);
      try {
         ct.removeField(ct.getField("number"));
View Full Code Here

Examples of org.infinispan.test.CherryPickClassLoader

      EmbeddedCacheManager cm0 = createClusteredCacheManager(builder);
      cacheManagers.add(cm0);

      String[] notFound = new String[]{CAR};
      systemCl = Thread.currentThread().getContextClassLoader();
      CherryPickClassLoader cl = new CherryPickClassLoader(null, null, notFound, systemCl);

      GlobalConfigurationBuilder gcBuilder = createSecondGlobalCfgBuilder(cl);
      EmbeddedCacheManager cm1 = createClusteredCacheManager(gcBuilder, builder);
      cacheManagers.add(cm1);
   }
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.