Permalink
Browse files

Remove dep on Solder

  • Loading branch information...
pmuir committed Oct 19, 2011
1 parent 0a96bb6 commit 7dadbacc4780ab3e5db6f06f576717344dffe830
@@ -1,5 +1,7 @@
package com.mycompany.controller;
+import java.util.logging.Logger;
+
import javax.annotation.PostConstruct;
import javax.ejb.Stateful;
import javax.enterprise.event.Event;
@@ -9,9 +11,6 @@
import javax.inject.Named;
import javax.persistence.EntityManager;
-import org.jboss.logging.Logger;
-import org.jboss.seam.solder.logging.Category;
-
import com.mycompany.model.Member;
// The @Stateful annotation eliminates the need for manual transaction demarcation
@@ -24,7 +23,6 @@
public class MemberRegistration {
@Inject
- @Category("jboss-javaee6-webapp-src")
private Logger log;
@Inject
@@ -1,6 +1,9 @@
package com.mycompany.util;
+import java.util.logging.Logger;
+
import javax.enterprise.inject.Produces;
+import javax.enterprise.inject.spi.InjectionPoint;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
@@ -22,4 +25,9 @@
@Produces
@PersistenceContext
private EntityManager em;
+
+ @Produces
+ public Logger produceLog(InjectionPoint injectionPoint) {
+ return Logger.getLogger(injectionPoint.getMember().getDeclaringClass().getName());
+ }
}
@@ -2,13 +2,12 @@
import static org.junit.Assert.assertNotNull;
-import javax.enterprise.inject.Produces;
-import javax.enterprise.inject.spi.InjectionPoint;
+import java.util.logging.Logger;
+
import javax.inject.Inject;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.logging.Logger;
import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
@@ -46,10 +45,5 @@ public void testRegister() throws Exception {
assertNotNull(newMember.getId());
log.info(newMember.getName() + " was persisted with id " + newMember.getId());
}
-
- @Produces
- public Logger produceLog(InjectionPoint injectionPoint) {
- return Logger.getLogger(injectionPoint.getMember().getDeclaringClass());
- }
}

0 comments on commit 7dadbac

Please sign in to comment.