Merge pull request #4148 from rajat-garg/BAEL-1711-move-code-snippets

BAEL-1734 move packages from libraries to libraries-data
This commit is contained in:
MMonik 2018-05-17 15:14:02 +07:00 committed by GitHub
commit fb7343b76a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
31 changed files with 617 additions and 506 deletions

View File

@ -3,5 +3,9 @@
- [Introduction to ORMLite](http://www.baeldung.com/ormlite)
- [Introduction To Kryo](http://www.baeldung.com/kryo)
- [Introduction to KafkaStreams in Java](http://www.baeldung.com/java-kafka-streams)
- [Guide to Java Data Objects](http://www.baeldung.com/jdo)
- [Intro to JDO Queries 2/2](http://www.baeldung.com/jdo-queries)
- [Introduction to HikariCP](http://www.baeldung.com/hikaricp)
- [Introduction to JCache](http://www.baeldung.com/jcache)
- [A Guide to Apache Ignite](http://www.baeldung.com/apache-ignite)
- [Apache Ignite with Spring Data](http://www.baeldung.com/apache-ignite-spring-data)

View File

@ -0,0 +1 @@
log4j.rootLogger=INFO, stdout

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?><root>
</root>

View File

@ -87,6 +87,60 @@
<artifactId>gson</artifactId>
<version>${gson.version}</version>
</dependency>
<!-- Hikari CP -->
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>2.7.2</version>
<scope>compile</scope>
</dependency>
<!-- JDO -->
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>javax.jdo</artifactId>
<version>3.2.0-m7</version>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-core</artifactId>
<version>5.1.1</version>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-api-jdo</artifactId>
<version>5.1.1</version>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-rdbms</artifactId>
<version>5.1.1</version>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-maven-plugin</artifactId>
<version>5.0.2</version>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-xml</artifactId>
<version>5.0.0-release</version>
</dependency>
<dependency>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-jdo-query</artifactId>
<version>5.0.4</version>
</dependency>
<!-- Jcache -->
<dependency>
<groupId>javax.cache</groupId>
<artifactId>cache-api</artifactId>
<version>${cache.version}</version>
</dependency>
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast</artifactId>
<version>${hazelcast.version}</version>
</dependency>
</dependencies>
<build>
@ -176,6 +230,29 @@
</plugin>
<!-- /Reladomo -->
<!-- JDO Plugin -->
<plugin>
<groupId>org.datanucleus</groupId>
<artifactId>datanucleus-maven-plugin</artifactId>
<version>5.0.2</version>
<configuration>
<api>JDO</api>
<props>${basedir}/datanucleus.properties</props>
<log4jConfiguration>${basedir}/log4j.properties</log4jConfiguration>
<verbose>true</verbose>
<fork>false</fork>
<!-- Solve windows line too long error -->
</configuration>
<executions>
<execution>
<phase>process-classes</phase>
<goals>
<goal>enhance</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
@ -196,6 +273,8 @@
<kafka.version>1.0.0</kafka.version>
<ignite.version>2.4.0</ignite.version>
<gson.version>2.8.2</gson.version>
<cache.version>1.1.0</cache.version>
<hazelcast.version>3.8.4</hazelcast.version>
<maven-antrun-plugin.version>1.8</maven-antrun-plugin.version>
<build-helper-maven-plugin.version>3.0.0</build-helper-maven-plugin.version>
</properties>

View File

@ -0,0 +1,4 @@
javax.jdo.PersistenceManagerFactoryClass=org.datanucleus.api.jdo.JDOPersistenceManagerFactory
javax.jdo.option.ConnectionURL= xml:file:myfile-ds.xml
datanucleus.xml.indentSize=6
datanucleus.schema.autoCreateAll=true

View File

@ -21,7 +21,8 @@ public class CacheLoaderTest {
@Before
public void setup() {
CachingProvider cachingProvider = Caching.getCachingProvider();
// Adding fully qualified class name because of multiple Cache Provider (Ignite and Hazelcast)
CachingProvider cachingProvider = Caching.getCachingProvider("com.hazelcast.cache.HazelcastCachingProvider");
CacheManager cacheManager = cachingProvider.getCacheManager();
MutableConfiguration<Integer, String> config = new MutableConfiguration<Integer, String>().setReadThrough(true).setCacheLoaderFactory(new FactoryBuilder.SingletonFactory<>(new SimpleCacheLoader()));
this.cache = cacheManager.createCache("SimpleCache", config);
@ -29,7 +30,7 @@ public class CacheLoaderTest {
@After
public void tearDown() {
Caching.getCachingProvider().getCacheManager().destroyCache(CACHE_NAME);
Caching.getCachingProvider("com.hazelcast.cache.HazelcastCachingProvider").getCacheManager().destroyCache(CACHE_NAME);
}
@Test

View File

@ -17,9 +17,7 @@
- [Introduction to Quartz](http://www.baeldung.com/quartz)
- [How to Warm Up the JVM](http://www.baeldung.com/java-jvm-warmup)
- [Apache Commons Collections SetUtils](http://www.baeldung.com/apache-commons-setutils)
- [Guide to Java Data Objects](http://www.baeldung.com/jdo)
- [Software Transactional Memory in Java Using Multiverse](http://www.baeldung.com/java-multiverse-stm)
- [Introduction to HikariCP](http://www.baeldung.com/hikaricp)
- [Serenity BDD with Spring and JBehave](http://www.baeldung.com/serenity-spring-jbehave)
- [Locality-Sensitive Hashing in Java Using Java-LSH](http://www.baeldung.com/locality-sensitive-hashing)
- [Apache Commons Collections OrderedMap](http://www.baeldung.com/apache-commons-ordered-map)
@ -47,7 +45,6 @@
- [Guide to JDeferred](http://www.baeldung.com/jdeferred)
- [Integrating Retrofit with RxJava](http://www.baeldung.com/retrofit-rxjava)
- [Introduction to MBassador](http://www.baeldung.com/mbassador)
- [Introduction to JCache](http://www.baeldung.com/jcache)
- [Introduction to Retrofit](http://www.baeldung.com/retrofit)
- [Using Pairs in Java](http://www.baeldung.com/java-pairs)
- [Apache Commons Collections Bag](http://www.baeldung.com/apache-commons-bag)
@ -56,7 +53,6 @@
- [Introduction To Docx4J](http://www.baeldung.com/docx4j)
- [Introduction to StreamEx](http://www.baeldung.com/streamex)
- [Introduction to BouncyCastle with Java](http://www.baeldung.com/java-bouncy-castle)
- [Intro to JDO Queries 2/2](http://www.baeldung.com/jdo-queries)
- [Guide to google-http-client](http://www.baeldung.com/google-http-client)
- [Interact with Google Sheets from Java](http://www.baeldung.com/google-sheets-java-client)
- [Programatically Create, Configure, and Run a Tomcat Server](http://www.baeldung.com/tomcat-programmatic-setup)