Examples of PersistenceDescriptorParserImpl


Examples of org.apache.aries.jpa.container.parsing.impl.PersistenceDescriptorParserImpl

        new MethodCall(BundleContext.class, "getBundles"),
        new Bundle[] {persistenceBundle});
   
    mgr = new PersistenceBundleManager(extenderContext);
    mgr.setConfig(new Properties());
    mgr.setParser(new PersistenceDescriptorParserImpl());
    return extenderContext;
  }
View Full Code Here

Examples of org.apache.aries.jpa.container.parsing.impl.PersistenceDescriptorParserImpl

   
    BundleContext extenderContext = extenderBundle.getBundleContext();
   
    mgr = new PersistenceBundleManager(extenderContext);
    mgr.setConfig(new Properties());
    mgr.setParser(new PersistenceDescriptorParserImpl());
    mgr.open();
   
    Hashtable<String,String> hash1 = new Hashtable<String, String>();
    hash1.put("javax.persistence.provider", "no.such.Provider");
    ServiceRegistration reg = persistenceBundle.getBundleContext().registerService(new String[] {PersistenceProvider.class.getName(), "no.such.Provider"} ,
View Full Code Here

Examples of org.apache.aries.jpa.container.parsing.impl.PersistenceDescriptorParserImpl

 
    BundleContext extenderContext = extenderBundle.getBundleContext();
   
    mgr = new PersistenceBundleManager(extenderContext);
    mgr.setConfig(new Properties());
    mgr.setParser(new PersistenceDescriptorParserImpl());
   
    Hashtable<String,String> hash1 = new Hashtable<String, String>();
    hash1.put("javax.persistence.provider", "no.such.Provider");
    ServiceRegistration reg = persistenceBundle.getBundleContext().registerService(new String[] {PersistenceProvider.class.getName()} ,
        pp, hash1 );
View Full Code Here

Examples of org.apache.aries.jpa.container.parsing.impl.PersistenceDescriptorParserImpl

      is = getClass().getClassLoader().getResourceAsStream(location);
      PersistenceDescriptor descriptor = new PersistenceDescriptorImpl(location, is);
     
      Bundle b = Skeleton.newMock(Bundle.class);
     
      Collection<ParsedPersistenceUnit> parsedUnits = new PersistenceDescriptorParserImpl().parse(b, descriptor);
      assertEquals("An incorrect number of persistence units has been returned.", 4, parsedUnits.size());
     
      List<ParsedPersistenceUnit> units = getList(parsedUnits);
     
      ParsedPersistenceUnit unit = units.get(0);
View Full Code Here

Examples of org.apache.aries.jpa.container.parsing.impl.PersistenceDescriptorParserImpl

      is = getClass().getClassLoader().getResourceAsStream(location);
      PersistenceDescriptor descriptor = new PersistenceDescriptorImpl(location, is);

      Bundle b = Skeleton.newMock(Bundle.class);
     
      Collection<ParsedPersistenceUnit> parsedUnits = new PersistenceDescriptorParserImpl().parse(b, descriptor);
      assertEquals("An incorrect number of persistence units has been returned.", 0, parsedUnits.size());
    } finally {
      if(is != null)
        is.close();
    }
View Full Code Here

Examples of org.apache.aries.jpa.container.parsing.impl.PersistenceDescriptorParserImpl

      is = getClass().getClassLoader().getResourceAsStream(location);
      PersistenceDescriptor descriptor = new PersistenceDescriptorImpl(location, is);
     
      Bundle b = Skeleton.newMock(Bundle.class);
     
      Collection<ParsedPersistenceUnit> parsedUnits = new PersistenceDescriptorParserImpl().parse(b, descriptor);

      fail("Parsing should not succeed");
    } finally {
      if(is != null)
        is.close();
View Full Code Here

Examples of org.apache.aries.jpa.container.parsing.impl.PersistenceDescriptorParserImpl

      String location = "file22/META-INF/persistence.xml";
      is = getClass().getClassLoader().getResourceAsStream(location);
      PersistenceDescriptor descriptor = new PersistenceDescriptorImpl(location, is);
     
      Bundle b = Skeleton.newMock(Bundle.class);
      List<ParsedPersistenceUnit> parsedUnits = getList(new PersistenceDescriptorParserImpl().parse(b, descriptor));
     
      assertEquals(2, parsedUnits.size());
     
      ParsedPersistenceUnit customUnit = parsedUnits.get(0);
      assertEquals("ENABLE_SELECTIVE", customUnit.getPersistenceXmlMetadata().get(ParsedPersistenceUnit.SHARED_CACHE_MODE));
View Full Code Here

Examples of org.apache.aries.jpa.container.parsing.impl.PersistenceDescriptorParserImpl

      is = getClass().getClassLoader().getResourceAsStream(location);
      PersistenceDescriptor descriptor = new PersistenceDescriptorImpl(location, is);
     
      Bundle b = Skeleton.newMock(Bundle.class);
     
      Collection<ParsedPersistenceUnit> parsedUnits = new PersistenceDescriptorParserImpl().parse(b, descriptor);
      assertEquals("An incorrect number of persistence units has been returned.", 33, parsedUnits.size());
     
      List<ParsedPersistenceUnit> units = getList(parsedUnits);
     
      Collections.sort(units, new Comparator<ParsedPersistenceUnit>() {
View Full Code Here

Examples of org.apache.aries.jpa.container.parsing.impl.PersistenceDescriptorParserImpl

      _logger.info("No quiesce support is available, so managed persistence units will not participate in quiesce operations");
    }
  }

  private void initParser() {
    parser = new PersistenceDescriptorParserImpl();
    parserReg = ctx.registerService(PersistenceDescriptorParser.class.getName(), parser, null);
  }
View Full Code Here

Examples of org.apache.aries.jpa.container.parsing.impl.PersistenceDescriptorParserImpl

      is = getClass().getClassLoader().getResourceAsStream(location);
      PersistenceDescriptor descriptor = new PersistenceDescriptorImpl(location, is);
     
      Bundle b = Skeleton.newMock(Bundle.class);
     
      Collection<ParsedPersistenceUnit> parsedUnits = new PersistenceDescriptorParserImpl().parse(b, descriptor);
      assertEquals("An incorrect number of persistence units has been returned.", 4, parsedUnits.size());
     
      List<ParsedPersistenceUnit> units = getList(parsedUnits);
     
      ParsedPersistenceUnit unit = units.get(0);
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.