commit | author | age
|
41d500
|
1 |
package com.redhat.training.ejb; |
RS |
2 |
|
|
3 |
import java.util.logging.Logger; |
|
4 |
|
|
5 |
import javax.enterprise.inject.Produces; |
|
6 |
import javax.enterprise.inject.spi.InjectionPoint; |
|
7 |
import javax.persistence.EntityManager; |
|
8 |
import javax.persistence.PersistenceContext; |
|
9 |
|
|
10 |
public class Resources { |
|
11 |
|
|
12 |
@Produces |
|
13 |
@PersistenceContext |
|
14 |
private EntityManager em; |
|
15 |
|
|
16 |
@Produces |
|
17 |
public Logger produceLog(InjectionPoint injectionPoint) { |
|
18 |
return Logger.getLogger(injectionPoint.getMember().getDeclaringClass().getName()); |
|
19 |
} |
|
20 |
|
|
21 |
} |