Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merged b35553d commit from zenbones.

Slf4J logging related changes.
  • Loading branch information...
commit fa2c1bc1a495dd86d08c0f9c148af072751c9e1b 1 parent dc174f9
Vivs authored
View
15 kundera-cassandra/pom.xml
@@ -51,7 +51,20 @@
<artifactId>cassandra-clientutil</artifactId>
<version>1.0.6</version>
<scope>test</scope>
- </dependency>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.6.3</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.16</version>
+ <scope>test</scope>
+ </dependency>
+
<dependency>
<groupId>org.scale7</groupId>
<artifactId>scale7-pelops</artifactId>
View
7 kundera-cassandra/src/main/java/com/impetus/client/cassandra/pelops/PelopsClientFactory.java
@@ -16,12 +16,15 @@
import com.impetus.kundera.index.LuceneIndexer;
import com.impetus.kundera.loader.GenericClientFactory;
import com.impetus.kundera.metadata.model.KunderaMetadata;
-import com.impetus.kundera.metadata.model.PersistenceUnitMetadata;
+import com.impetus.kundera.metadata.model.PersistenceUnitMetadata;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import com.impetus.kundera.persistence.EntityReader;
public class PelopsClientFactory extends GenericClientFactory
{
- private static Logger logger = Logger.getLogger(KunderaPersistence.class);
+ private static Logger logger = LoggerFactory.getLogger(KunderaPersistence.class);
IndexManager indexManager;
View
11 kundera-core/pom.xml
@@ -37,11 +37,7 @@
<artifactId>lucene-core</artifactId>
<version>3.4.0</version>
</dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.16</version>
- </dependency>
+
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
@@ -58,11 +54,6 @@
<version>2.2.0</version>
</dependency>
<dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.6.3</version>
- </dependency>
- <dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.9.0.GA</version>
View
8 kundera-core/src/main/java/com/impetus/kundera/KunderaPersistence.java
@@ -23,16 +23,18 @@
import javax.persistence.spi.ProviderUtil;
import org.apache.commons.lang.NotImplementedException;
-import org.apache.log4j.Logger;
+
import com.impetus.kundera.client.ClientResolver;
import com.impetus.kundera.loader.ApplicationLoader;
import com.impetus.kundera.loader.CoreLoader;
import com.impetus.kundera.persistence.EntityManagerFactoryImpl;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* The Class KunderaPersistence.
- *
+ *
* @author animesh.kumar
*/
@SuppressWarnings("unchecked")
@@ -40,7 +42,7 @@
{
/** The logger. */
- private static Logger logger = Logger.getLogger(KunderaPersistence.class);
+ private static Logger logger = LoggerFactory.getLogger(KunderaPersistence.class);
private static Boolean loaded = false;
View
8 kundera-core/src/main/java/com/impetus/kundera/loader/ApplicationLoader.java
@@ -17,16 +17,16 @@
import java.util.ArrayList;
import java.util.List;
-
-import org.apache.log4j.Logger;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author amresh.singh
- *
+ *
*/
public class ApplicationLoader implements Loader
{
- private static Logger log = Logger.getLogger(ApplicationLoader.class);
+ private static Logger log = LoggerFactory.getLogger(ApplicationLoader.class);
List<ApplicationLoader> applicationLoaders = new ArrayList<ApplicationLoader>();
View
8 kundera-core/src/main/java/com/impetus/kundera/loader/CoreLoader.java
@@ -15,20 +15,20 @@
******************************************************************************/
package com.impetus.kundera.loader;
-import org.apache.log4j.Logger;
-
import com.impetus.kundera.metadata.model.CoreMetadata;
import com.impetus.kundera.metadata.model.KunderaMetadata;
import com.impetus.kundera.proxy.cglib.CglibEntityEnhancerFactory;
import com.impetus.kundera.proxy.cglib.CglibLazyInitializerFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author amresh.singh
- *
+ *
*/
public class CoreLoader
{
- private static Logger log = Logger.getLogger(CoreLoader.class);
+ private static Logger log = LoggerFactory.getLogger(CoreLoader.class);
public void load()
{
View
8 kundera-core/src/main/java/com/impetus/kundera/loader/GenericClientFactory.java
@@ -2,17 +2,17 @@
import javax.persistence.PersistenceException;
-import org.apache.log4j.Logger;
-
import com.impetus.kundera.client.Client;
import com.impetus.kundera.metadata.model.ClientMetadata;
import com.impetus.kundera.metadata.model.KunderaMetadata;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
-// Client Loaders are more of
+// Client Loaders are more of
public abstract class GenericClientFactory implements Loader
{
/** The logger. */
- private static Logger logger = Logger.getLogger(GenericClientFactory.class);
+ private static Logger logger = LoggerFactory.getLogger(GenericClientFactory.class);
private Client client;
View
8 kundera-core/src/main/java/com/impetus/kundera/loader/MetamodelLoader.java
@@ -31,8 +31,6 @@
import javax.persistence.PersistenceException;
import javax.persistence.metamodel.Metamodel;
-import org.apache.log4j.Logger;
-
import com.impetus.kundera.Constants;
import com.impetus.kundera.classreading.ClasspathReader;
import com.impetus.kundera.classreading.Reader;
@@ -43,14 +41,16 @@
import com.impetus.kundera.metadata.model.KunderaMetadata;
import com.impetus.kundera.metadata.model.MetamodelImpl;
import com.impetus.kundera.metadata.model.PersistenceUnitMetadata;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author amresh.singh
- *
+ *
*/
public class MetamodelLoader extends ApplicationLoader
{
- private static Logger log = Logger.getLogger(MetamodelLoader.class);
+ private static Logger log = LoggerFactory.getLogger(MetamodelLoader.class);
@Override
public void load(String... persistenceUnits)
View
8 kundera-core/src/main/java/com/impetus/kundera/loader/PersistenceUnitLoader.java
@@ -25,20 +25,20 @@
import javax.persistence.PersistenceException;
import javax.persistence.spi.PersistenceUnitTransactionType;
-import org.apache.log4j.Logger;
-
import com.impetus.kundera.KunderaPersistence;
import com.impetus.kundera.metadata.model.ApplicationMetadata;
import com.impetus.kundera.metadata.model.KunderaMetadata;
import com.impetus.kundera.metadata.model.PersistenceUnitMetadata;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author amresh.singh
- *
+ *
*/
public class PersistenceUnitLoader extends ApplicationLoader
{
- private static Logger log = Logger.getLogger(PersistenceUnitLoader.class);
+ private static Logger log = LoggerFactory.getLogger(PersistenceUnitLoader.class);
/** The Constant PROVIDER_IMPLEMENTATION_NAME. */
private static final String PROVIDER_IMPLEMENTATION_NAME = KunderaPersistence.class.getName();
View
8 kundera-core/src/main/java/com/impetus/kundera/metadata/KunderaMetadataManager.java
@@ -15,8 +15,6 @@
******************************************************************************/
package com.impetus.kundera.metadata;
-import org.apache.log4j.Logger;
-
import com.impetus.kundera.Constants;
import com.impetus.kundera.metadata.model.EntityMetadata;
import com.impetus.kundera.metadata.model.KunderaMetadata;
@@ -24,14 +22,16 @@
import com.impetus.kundera.metadata.model.PersistenceUnitMetadata;
import com.impetus.kundera.proxy.EntityEnhancerFactory;
import com.impetus.kundera.proxy.LazyInitializerFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* @author amresh.singh
- *
+ *
*/
public class KunderaMetadataManager
{
- private static Logger log = Logger.getLogger(KunderaMetadataManager.class);
+ private static Logger log = LoggerFactory.getLogger(KunderaMetadataManager.class);
public static PersistenceUnitMetadata getPersistenceUnitMetadata(String persistenceUnit)
{
View
6 kundera-mongo/src/main/java/com/impetus/client/mongodb/MongoDBClient.java
@@ -348,12 +348,6 @@ private void onPersist(EntityMetadata entityMetadata, Object entity, String id,
*/
public <E> List<E> loadData(EntityMetadata entityMetadata, KunderaQuery query, List<String> relationNames) throws Exception
{
-// MongoDBQuery mongoDBQuery = (MongoDBQuery) query;
-
- // TODO Resolve the workaround
-// EntityMetadata entityMetadata = KunderaMetadataManager.getEntityMetadata(getPersistenceUnit(), mongoDBQuery
-// .getKunderaQuery().getEntityClass());
-
String documentName = entityMetadata.getTableName();
String dbName = entityMetadata.getSchema();
Class clazz = entityMetadata.getEntityClazz();
View
4 kundera-mongo/src/main/java/com/impetus/client/mongodb/MongoDBClientFactory.java
@@ -19,11 +19,13 @@
import com.mongodb.MongoException;
import com.mongodb.MongoOptions;
import com.mongodb.ServerAddress;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class MongoDBClientFactory extends GenericClientFactory
{
/** The logger. */
- private static Logger logger = Logger.getLogger(MongoDBClientFactory.class);
+ private static Logger logger = LoggerFactory.getLogger(MongoDBClientFactory.class);
IndexManager indexManager;
View
11 kundera-mongo/src/main/java/com/impetus/client/mongodb/query/MongoDBQuery.java
@@ -51,16 +51,7 @@ public MongoDBQuery(String jpaQuery, KunderaQuery kunderaQuery, PersistenceDeleg
this.kunderaQuery = kunderaQuery;
}
- /*
- * @Override public List<?> getResultList() { log.debug("JPA Query is: " +
- * query);
- *
- * EntityMetadata m = getEntityMetadata();
- *
- * try { return getClient().loadData(this); } catch (Exception e) { return
- * null; } }
- */
-
+
@Override
public int executeUpdate()
{
View
7 kundera-rdbms/src/main/java/com/impetus/client/rdbms/RDBMSClientFactory.java
@@ -13,6 +13,9 @@
import com.impetus.kundera.index.LuceneIndexer;
import com.impetus.kundera.loader.GenericClientFactory;
import com.impetus.kundera.persistence.EntityReader;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
/**
* @author impadmin
@@ -21,11 +24,11 @@
public class RDBMSClientFactory extends GenericClientFactory
{
- private static Logger logger = Logger.getLogger(RDBMSClientFactory.class);
+ private static Logger logger = LoggerFactory.getLogger(RDBMSClientFactory.class);
IndexManager indexManager;
- EntityReader reader;
+ private EntityReader reader;
/*
* (non-Javadoc)
*
Please sign in to comment.
Something went wrong with that request. Please try again.