Author: rareddy
Date: 2010-08-03 15:04:59 -0400 (Tue, 03 Aug 2010)
New Revision: 2406
Modified:
trunk/jboss-integration/src/main/java/org/teiid/templates/connector/RaXmlPropertyConverter.java
Log:
TEIID-1183: The connection interface was 'Executionfactory' before the the split
between the Translator & Resource Adapter. The code that gets the property metadata
from RAR file is still looking for the "connection definition" under
"ExecutionFactory", which is wrong. It should be looking for
"javax.resource.cci.ConnectionFactory". How there is still a risk if a customer
uses a different connection factory than this one to develop or use a connection factory
then Teiid will not be able to create the template files correctly.
Modified:
trunk/jboss-integration/src/main/java/org/teiid/templates/connector/RaXmlPropertyConverter.java
===================================================================
---
trunk/jboss-integration/src/main/java/org/teiid/templates/connector/RaXmlPropertyConverter.java 2010-08-03
18:00:54 UTC (rev 2405)
+++
trunk/jboss-integration/src/main/java/org/teiid/templates/connector/RaXmlPropertyConverter.java 2010-08-03
19:04:59 UTC (rev 2406)
@@ -33,6 +33,7 @@
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
import javax.management.ReflectionException;
+import javax.resource.cci.ConnectionFactory;
import org.jboss.managed.api.Fields;
import org.jboss.managed.api.ManagedProperty;
@@ -46,7 +47,6 @@
import org.teiid.adminapi.jboss.ManagedUtil;
import org.teiid.deployers.ExtendedPropertyMetadata;
import org.teiid.deployers.ManagedPropertyUtil;
-import org.teiid.translator.ExecutionFactory;
public class RaXmlPropertyConverter {
@@ -79,7 +79,7 @@
MBeanServer server = MBeanServerFactory.findMBeanServer(null).get(0);
ObjectName on = new
ObjectName("jboss.jca:service=RARDeployment,name='"+rarName+"'");//$NON-NLS-1$ //$NON-NLS-2$
ConnectorMetaData obj = (ConnectorMetaData)server.getAttribute(on,
"MetaData");//$NON-NLS-1$
- ConnectionDefinitionMetaData metadata =
obj.getConnectionDefinition(ExecutionFactory.class.getName());
+ ConnectionDefinitionMetaData metadata =
obj.getConnectionDefinition(ConnectionFactory.class.getName());
return metadata.getProperties();
} catch (MalformedObjectNameException e) {
//ignore