Commit 3a33bfd2007385d17da60d6cf46f03ed4d0dcdcb
Exists in
master
Merge branch 'master' of git@github.com:demoiselle/framework.git
Showing
6 changed files
with
31 additions
and
29 deletions
Show diff stats
impl/core/pom.xml
@@ -73,8 +73,8 @@ | @@ -73,8 +73,8 @@ | ||
73 | <groupId>br.gov.frameworkdemoiselle</groupId> | 73 | <groupId>br.gov.frameworkdemoiselle</groupId> |
74 | <artifactId>demoiselle-framework-bom</artifactId> | 74 | <artifactId>demoiselle-framework-bom</artifactId> |
75 | <version>2.3.0-SNAPSHOT</version> | 75 | <version>2.3.0-SNAPSHOT</version> |
76 | - <type>pom</type> | ||
77 | <scope>import</scope> | 76 | <scope>import</scope> |
77 | + <type>pom</type> | ||
78 | </dependency> | 78 | </dependency> |
79 | </dependencies> | 79 | </dependencies> |
80 | </dependencyManagement> | 80 | </dependencyManagement> |
impl/core/src/main/java/br/gov/frameworkdemoiselle/internal/bootstrap/ConfigurationBootstrap.java
@@ -62,8 +62,9 @@ public class ConfigurationBootstrap implements Extension { | @@ -62,8 +62,9 @@ public class ConfigurationBootstrap implements Extension { | ||
62 | 62 | ||
63 | private final List<Class<Object>> cache = Collections.synchronizedList(new ArrayList<Class<Object>>()); | 63 | private final List<Class<Object>> cache = Collections.synchronizedList(new ArrayList<Class<Object>>()); |
64 | 64 | ||
65 | - private static final Map<ClassLoader, List<String>> cacheClassLoader = Collections.synchronizedMap(new HashMap<ClassLoader, List<String>>()); | ||
66 | - | 65 | + private static final Map<ClassLoader, Map<String, Class<Object>>> cacheClassLoader = Collections |
66 | + .synchronizedMap(new HashMap<ClassLoader, Map<String, Class<Object>>>()); | ||
67 | + | ||
67 | public void processAnnotatedType(@Observes final ProcessAnnotatedType<Object> event) { | 68 | public void processAnnotatedType(@Observes final ProcessAnnotatedType<Object> event) { |
68 | final AnnotatedType<Object> annotatedType = event.getAnnotatedType(); | 69 | final AnnotatedType<Object> annotatedType = event.getAnnotatedType(); |
69 | 70 | ||
@@ -78,9 +79,7 @@ public class ConfigurationBootstrap implements Extension { | @@ -78,9 +79,7 @@ public class ConfigurationBootstrap implements Extension { | ||
78 | 79 | ||
79 | for (Class<Object> config : cache) { | 80 | for (Class<Object> config : cache) { |
80 | proxy = createProxy(config); | 81 | proxy = createProxy(config); |
81 | - if (proxy != null) { | ||
82 | - event.addBean(new CustomBean(proxy, beanManager)); | ||
83 | - } | 82 | + event.addBean(new CustomBean(proxy, beanManager)); |
84 | } | 83 | } |
85 | } | 84 | } |
86 | 85 | ||
@@ -89,24 +88,20 @@ public class ConfigurationBootstrap implements Extension { | @@ -89,24 +88,20 @@ public class ConfigurationBootstrap implements Extension { | ||
89 | String superClassName = type.getCanonicalName(); | 88 | String superClassName = type.getCanonicalName(); |
90 | String chieldClassName = superClassName + "__DemoiselleProxy"; | 89 | String chieldClassName = superClassName + "__DemoiselleProxy"; |
91 | 90 | ||
92 | - Class<Object> clazz = null; | ||
93 | - | ||
94 | - Boolean loaded = true; | 91 | + Map<String, Class<Object>> cacheProxy = Collections.synchronizedMap(new HashMap<String, Class<Object>>());; |
92 | + | ||
93 | + Class<Object> clazzProxy = null; | ||
94 | + | ||
95 | ClassLoader classLoader = type.getClassLoader(); | 95 | ClassLoader classLoader = type.getClassLoader(); |
96 | - if (cacheClassLoader.containsKey(classLoader)) { | ||
97 | - if (!cacheClassLoader.get(classLoader).contains(chieldClassName)) { | ||
98 | - loaded = false; | 96 | + if (cacheClassLoader.containsKey(classLoader)) { |
97 | + cacheProxy = cacheClassLoader.get(classLoader); | ||
98 | + if (cacheProxy.containsKey(chieldClassName)) { | ||
99 | + clazzProxy = cacheProxy.get(chieldClassName); | ||
99 | } | 100 | } |
100 | } | 101 | } |
101 | - else{ | ||
102 | - List<String> strings = Collections.synchronizedList(new ArrayList<String>()); | ||
103 | - cacheClassLoader.put(classLoader, strings); | ||
104 | - loaded = false; | ||
105 | - } | ||
106 | - | ||
107 | - if (!loaded){ | ||
108 | - cacheClassLoader.get(classLoader).add(chieldClassName); | ||
109 | - | 102 | + |
103 | + if (clazzProxy == null) { | ||
104 | + | ||
110 | ClassPool pool = new ClassPool(); | 105 | ClassPool pool = new ClassPool(); |
111 | CtClass ctChieldClass = pool.getOrNull(chieldClassName); | 106 | CtClass ctChieldClass = pool.getOrNull(chieldClassName); |
112 | 107 | ||
@@ -123,9 +118,13 @@ public class ConfigurationBootstrap implements Extension { | @@ -123,9 +118,13 @@ public class ConfigurationBootstrap implements Extension { | ||
123 | 118 | ||
124 | ctChieldClass.addMethod(ctChieldMethod); | 119 | ctChieldClass.addMethod(ctChieldMethod); |
125 | } | 120 | } |
126 | - clazz = ctChieldClass.toClass(classLoader, type.getProtectionDomain()); | 121 | + |
122 | + clazzProxy = ctChieldClass.toClass(classLoader, type.getProtectionDomain()); | ||
123 | + | ||
124 | + cacheProxy.put(chieldClassName, clazzProxy); | ||
125 | + cacheClassLoader.put(classLoader, cacheProxy); | ||
127 | } | 126 | } |
128 | 127 | ||
129 | - return clazz; | ||
130 | - } | 128 | + return clazzProxy; |
129 | + } | ||
131 | } | 130 | } |
parent/extension/pom.xml
@@ -72,8 +72,8 @@ | @@ -72,8 +72,8 @@ | ||
72 | <groupId>br.gov.frameworkdemoiselle</groupId> | 72 | <groupId>br.gov.frameworkdemoiselle</groupId> |
73 | <artifactId>demoiselle-framework-bom</artifactId> | 73 | <artifactId>demoiselle-framework-bom</artifactId> |
74 | <version>2.3.0-SNAPSHOT</version> | 74 | <version>2.3.0-SNAPSHOT</version> |
75 | - <type>pom</type> | ||
76 | <scope>import</scope> | 75 | <scope>import</scope> |
76 | + <type>pom</type> | ||
77 | </dependency> | 77 | </dependency> |
78 | </dependencies> | 78 | </dependencies> |
79 | </dependencyManagement> | 79 | </dependencyManagement> |
parent/minimal/pom.xml
@@ -73,8 +73,8 @@ | @@ -73,8 +73,8 @@ | ||
73 | <groupId>br.gov.frameworkdemoiselle</groupId> | 73 | <groupId>br.gov.frameworkdemoiselle</groupId> |
74 | <artifactId>demoiselle-framework-bom</artifactId> | 74 | <artifactId>demoiselle-framework-bom</artifactId> |
75 | <version>2.3.0-SNAPSHOT</version> | 75 | <version>2.3.0-SNAPSHOT</version> |
76 | - <type>pom</type> | ||
77 | <scope>import</scope> | 76 | <scope>import</scope> |
77 | + <type>pom</type> | ||
78 | </dependency> | 78 | </dependency> |
79 | </dependencies> | 79 | </dependencies> |
80 | </dependencyManagement> | 80 | </dependencyManagement> |
pom.xml
@@ -45,7 +45,7 @@ | @@ -45,7 +45,7 @@ | ||
45 | <parent> | 45 | <parent> |
46 | <groupId>br.gov.frameworkdemoiselle</groupId> | 46 | <groupId>br.gov.frameworkdemoiselle</groupId> |
47 | <artifactId>demoiselle-build-parent</artifactId> | 47 | <artifactId>demoiselle-build-parent</artifactId> |
48 | - <version>3</version> | 48 | + <version>4</version> |
49 | <relativePath>../internal/parent/build/demoiselle</relativePath> | 49 | <relativePath>../internal/parent/build/demoiselle</relativePath> |
50 | </parent> | 50 | </parent> |
51 | 51 | ||
@@ -132,6 +132,5 @@ | @@ -132,6 +132,5 @@ | ||
132 | 132 | ||
133 | <properties> | 133 | <properties> |
134 | <project.alias>framework</project.alias> | 134 | <project.alias>framework</project.alias> |
135 | - <project.nextVersion>2.3.0-SNAPSHOT</project.nextVersion> | ||
136 | </properties> | 135 | </properties> |
137 | </project> | 136 | </project> |
site/apt/release-notes.apt
@@ -38,7 +38,11 @@ | @@ -38,7 +38,11 @@ | ||
38 | 38 | ||
39 | Notas de Versão | 39 | Notas de Versão |
40 | 40 | ||
41 | -* v2.3.0-RC2 | 41 | +* v2.3.0-RC3 |
42 | + | ||
43 | + * {{{http://sourceforge.net/apps/mantisbt/demoiselle/view.php?id=0000869}0000869}} [Task] Atualização para versão 2.3.2 do plugin de release. | ||
44 | + | ||
45 | +* {{{../2.3.0-RC2/}v2.3.0-RC2}} | ||
42 | 46 | ||
43 | * {{{http://sourceforge.net/apps/mantisbt/demoiselle/view.php?id=0000864}0000864}} [Bug] Correção no redirecionamento de URL na extensão JSF. | 47 | * {{{http://sourceforge.net/apps/mantisbt/demoiselle/view.php?id=0000864}0000864}} [Bug] Correção no redirecionamento de URL na extensão JSF. |
44 | 48 |