Mercurial > lada > lada-server
annotate src/main/java/de/intevation/lada/utils/Resources.java @ 41:a0f6d3934bce
Removed unused imports.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Fri, 24 May 2013 09:06:14 +0200 |
parents | 0dd63fcc9581 |
children | 8fdb699405aa |
rev | line source |
---|---|
10
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
1 /* |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
2 * JBoss, Home of Professional Open Source |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
3 * Copyright 2012, Red Hat, Inc. and/or its affiliates, and individual |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
4 * contributors by the @authors tag. See the copyright.txt in the |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
5 * distribution for a full listing of individual contributors. |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
6 * |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
7 * Licensed under the Apache License, Version 2.0 (the "License"); |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
8 * you may not use this file except in compliance with the License. |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
9 * You may obtain a copy of the License at |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
10 * http://www.apache.org/licenses/LICENSE-2.0 |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
11 * Unless required by applicable law or agreed to in writing, software |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
12 * distributed under the License is distributed on an "AS IS" BASIS, |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
14 * See the License for the specific language governing permissions and |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
15 * limitations under the License. |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
16 */ |
32
411f13d7e666
Moved 'Resources' to package 'de.intevation.lada.utils'.
Raimund Renkert <rrenkert@intevation.de>
parents:
11
diff
changeset
|
17 package de.intevation.lada.utils; |
10
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
18 |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
19 import java.util.logging.Logger; |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
20 |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
21 import javax.enterprise.inject.Produces; |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
22 import javax.enterprise.inject.spi.InjectionPoint; |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
23 import javax.persistence.EntityManager; |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
24 import javax.persistence.PersistenceContext; |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
25 |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
26 /** |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
27 * This class uses CDI to alias Java EE resources, such as the persistence context, to CDI beans |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
28 */ |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
29 public class Resources { |
40 | 30 |
10
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
31 @Produces |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
32 @PersistenceContext |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
33 private EntityManager em; |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
34 |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
35 @Produces |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
36 public Logger produceLog(InjectionPoint injectionPoint) { |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
37 return Logger.getLogger(injectionPoint.getMember().getDeclaringClass().getName()); |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
38 } |
eb093385ff7e
Added Resources.java. This file is important as it make the EntitManager
Torsten Irländer <torsten.irlaender@intevation.de>
parents:
diff
changeset
|
39 } |