[teiid-commits] teiid SVN: r4500 - in trunk: jboss-integration/src/main/java/org/teiid/jboss and 1 other directories.
teiid-commits at lists.jboss.org
teiid-commits at lists.jboss.org
Tue Oct 2 08:52:37 EDT 2012
Author: shawkins
Date: 2012-10-02 08:52:37 -0400 (Tue, 02 Oct 2012)
New Revision: 4500
Modified:
trunk/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html
trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java
trunk/runtime/src/main/java/org/teiid/runtime/AbstractVDBDeployer.java
Log:
TEIID-2235 fixing synchronization and adding a release note
Modified: trunk/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html
===================================================================
--- trunk/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html 2012-10-02 12:26:48 UTC (rev 4499)
+++ trunk/build/kits/jboss-as7/docs/teiid/teiid-releasenotes.html 2012-10-02 12:52:37 UTC (rev 4500)
@@ -60,6 +60,7 @@
to the integer suffix of the teiidCode if possible.
<li>TEIID-2226 All statements that return result sets that are executed as command statements in a procedure are validated against the expected resultset columns of the procedure.
If the statement is not intended to be returnable, WITHOUT RETURN can be added to the end of the statement.
+ <li>TEIID-2235 The MetadataRepository.setNext was removed. Also if an instance of a DefaultMetadataRepository is used, it will only affect metadata already loaded in the repository chain.
</ul>
<h4>from 8.0</h4>
Modified: trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java
===================================================================
--- trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java 2012-10-02 12:26:48 UTC (rev 4499)
+++ trunk/jboss-integration/src/main/java/org/teiid/jboss/VDBService.java 2012-10-02 12:52:37 UTC (rev 4500)
@@ -476,31 +476,26 @@
if (repo != null) {
return repo;
}
- synchronized (this) {
- final Module module;
- ClassLoader moduleLoader = this.vdb.getAttachment(ClassLoader.class);
- if (moduleLoader == null) {
- moduleLoader = this.getClass().getClassLoader();
+ final Module module;
+ ClassLoader moduleLoader = this.getClass().getClassLoader();
+ ModuleLoader ml = Module.getCallerModuleLoader();
+ if (repoType != null && ml != null) {
+ try {
+ module = ml.loadModule(ModuleIdentifier.create(repoType));
+ moduleLoader = module.getClassLoader();
+ } catch (ModuleLoadException e) {
+ throw new VirtualDatabaseException(IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50057, repoType));
}
- ModuleLoader ml = Module.getCallerModuleLoader();
- if (repoType != null && ml != null) {
- try {
- module = ml.loadModule(ModuleIdentifier.create(repoType));
- moduleLoader = module.getClassLoader();
- } catch (ModuleLoadException e) {
- throw new VirtualDatabaseException(IntegrationPlugin.Util.gs(IntegrationPlugin.Event.TEIID50057, repoType));
- }
- }
-
- final ServiceLoader<MetadataRepository> serviceLoader = ServiceLoader.load(MetadataRepository.class, moduleLoader);
- if (serviceLoader != null) {
- for (MetadataRepository loader:serviceLoader) {
- this.addMetadataRepository(repoType, loader);
- return loader;
- }
- }
- return null;
- }
+ }
+
+ final ServiceLoader<MetadataRepository> serviceLoader = ServiceLoader.load(MetadataRepository.class, moduleLoader);
+ if (serviceLoader != null) {
+ for (MetadataRepository loader:serviceLoader) {
+ MetadataRepository old = this.repositories.putIfAbsent(repoType, loader);
+ return old!=null?old:loader;
+ }
+ }
+ return null;
}
}
Modified: trunk/runtime/src/main/java/org/teiid/runtime/AbstractVDBDeployer.java
===================================================================
--- trunk/runtime/src/main/java/org/teiid/runtime/AbstractVDBDeployer.java 2012-10-02 12:26:48 UTC (rev 4499)
+++ trunk/runtime/src/main/java/org/teiid/runtime/AbstractVDBDeployer.java 2012-10-02 12:52:37 UTC (rev 4500)
@@ -55,7 +55,7 @@
public abstract class AbstractVDBDeployer {
- private Map<String, MetadataRepository<?, ?>> repositories = new ConcurrentSkipListMap<String, MetadataRepository<?, ?>>(String.CASE_INSENSITIVE_ORDER);
+ protected ConcurrentSkipListMap<String, MetadataRepository<?, ?>> repositories = new ConcurrentSkipListMap<String, MetadataRepository<?, ?>>(String.CASE_INSENSITIVE_ORDER);
public AbstractVDBDeployer() {
repositories.put("ddl", new DDLMetadataRepository()); //$NON-NLS-1$
More information about the teiid-commits
mailing list