djencks 2004/02/20 00:14:12
Modified:
modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean
AdminObjectInstance.java
ConfigPropertiesHelper.java
ConfigPropertySettingDConfigBean.java
ConnectionDefinitionInstance.java
ResourceAdapterDConfigBean.java
ResourceAdapterDConfigRoot.java
modules/connector/src/java/org/apache/geronimo/connector/deployment
RARConfiguration.java RARConfigurer.java
modules/connector/src/test/org/apache/geronimo/connector/deployment
Connector_1_5Test.java
modules/connector/src/test-data/connector_1_0 ra.xml
Added:
modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean
ResourceAdapter_1_0DConfigRoot.java
Log:
support for namespaces in j2ee dd and connector 1.0 dconfigbeans
Revision Changes Path
1.2 +2 -2
incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/AdminObjectInstance.java
Index: AdminObjectInstance.java
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/AdminObjectInstance.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AdminObjectInstance.java 18 Feb 2004 20:57:07 -0000 1.1
+++ AdminObjectInstance.java 20 Feb 2004 08:14:11 -0000 1.2
@@ -106,7 +106,7 @@
setConfigProperty(configs);
}
- });
+ }, "config-property", "config-property-name");
}
boolean hasParent() {
1.3 +9 -9
incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ConfigPropertiesHelper.java
Index: ConfigPropertiesHelper.java
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ConfigPropertiesHelper.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ConfigPropertiesHelper.java 18 Feb 2004 20:57:07 -0000 1.2
+++ ConfigPropertiesHelper.java 20 Feb 2004 08:14:11 -0000 1.3
@@ -20,8 +20,8 @@
* */
public class ConfigPropertiesHelper {
- public static void initializeConfigSettings(DDBean ddBean,
ConfigPropertiesSource configPropertiesSource, Map configPropertiesMap) {
- DDBean[] configProperties = ddBean.getChildBean("config-property");
+ public static void initializeConfigSettings(DDBean ddBean,
ConfigPropertiesSource configPropertiesSource, Map configPropertiesMap, String
configPropertyXPath, String configPropertyNameXPath) {
+ DDBean[] configProperties = ddBean.getChildBean(configPropertyXPath);
GerConfigPropertySettingType[] configPropertySettings =
configPropertiesSource.getConfigPropertySettingArray();
if (configPropertySettings.length == 0) {
@@ -29,7 +29,7 @@
for (int i = 0; i < configProperties.length; i++) {
DDBean configProperty = configProperties[i];
GerConfigPropertySettingType configPropertySetting =
configPropertiesSource.addNewConfigPropertySetting();
- String name =
configProperty.getText("config-property-name")[0];
+ String name =
configProperty.getText(configPropertyNameXPath)[0];
ConfigPropertySettingDConfigBean
configPropertySettingDConfigBean = new
ConfigPropertySettingDConfigBean(configProperty, configPropertySetting);
configPropertiesMap.put(name,
configPropertySettingDConfigBean);
}
@@ -39,7 +39,7 @@
for (int i = 0; i < configProperties.length; i++) {
DDBean configProperty = configProperties[i];
GerConfigPropertySettingType configPropertySetting =
configPropertySettings[i];
- String name =
configProperty.getText("config-property-name")[0];
+ String name =
configProperty.getText(configPropertyNameXPath)[0];
assert name.equals(configPropertySetting.getName());
ConfigPropertySettingDConfigBean
configPropertySettingDConfigBean = new
ConfigPropertySettingDConfigBean(configProperty, configPropertySetting);
configPropertiesMap.put(name,
configPropertySettingDConfigBean);
@@ -47,13 +47,13 @@
}
}
- public static XpathListener initialize(DDBean parentDDBean, final
ConfigPropertiesHelper.ConfigPropertiesSource configPropertiesSource) {
- DDBean[] beans = parentDDBean.getChildBean("config-property");
+ public static XpathListener initialize(DDBean parentDDBean, final
ConfigPropertiesHelper.ConfigPropertiesSource configPropertiesSource, String
configPropertyXPath, String configPropertyNameXPath) {
+ DDBean[] beans = parentDDBean.getChildBean(configPropertyXPath);
ConfigPropertySettings[] configs = new
ConfigPropertySettings[beans.length];
Set xmlBeans = new
HashSet(Arrays.asList(configPropertiesSource.getConfigPropertySettingArray()));
for (int i = 0; i < beans.length; i++) {
DDBean bean = beans[i];
- String[] names = bean.getText("config-property-name");
+ String[] names = bean.getText(configPropertyNameXPath);
String name = names.length == 1 ? names[0] : "";
GerConfigPropertySettingType target = null;
for (Iterator it = xmlBeans.iterator(); it.hasNext();) {
@@ -120,7 +120,7 @@
// ignore change event (no contents, no attributes)
}
};
- parentDDBean.addXpathListener("config-property", configListener);
+ parentDDBean.addXpathListener(configPropertyXPath, configListener);
return configListener;
}
1.3 +3 -5
incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ConfigPropertySettingDConfigBean.java
Index: ConfigPropertySettingDConfigBean.java
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ConfigPropertySettingDConfigBean.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ConfigPropertySettingDConfigBean.java 10 Feb 2004 17:26:58 -0000
1.2
+++ ConfigPropertySettingDConfigBean.java 20 Feb 2004 08:14:11 -0000
1.3
@@ -71,7 +71,6 @@
* */
public class ConfigPropertySettingDConfigBean extends DConfigBeanSupport {
private final static SchemaTypeLoader SCHEMA_TYPE_LOADER =
XmlBeans.getContextTypeLoader();
- private final static String[] CONFIG_PROPERTY_SETTING_XPATHS =
{"config-property"};
public ConfigPropertySettingDConfigBean(DDBean ddBean,
GerConfigPropertySettingType configPropertySetting) {
super(ddBean, configPropertySetting, SCHEMA_TYPE_LOADER);
@@ -107,7 +106,6 @@
public void setConfigPropertyValue(String configPropertyValue) {
getConfigPropertySetting().setStringValue(configPropertyValue);
}
- public String[] getXpaths() {
- return CONFIG_PROPERTY_SETTING_XPATHS;
- }
+
}
+
1.4 +2 -2
incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ConnectionDefinitionInstance.java
Index: ConnectionDefinitionInstance.java
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ConnectionDefinitionInstance.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ConnectionDefinitionInstance.java 18 Feb 2004 20:57:07 -0000 1.3
+++ ConnectionDefinitionInstance.java 20 Feb 2004 08:14:11 -0000 1.4
@@ -105,7 +105,7 @@
setConfigProperty(configs);
}
- });
+ }, "config-property", "config-property-name");
}
1.6 +13 -12
incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ResourceAdapterDConfigBean.java
Index: ResourceAdapterDConfigBean.java
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ResourceAdapterDConfigBean.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ResourceAdapterDConfigBean.java 19 Feb 2004 23:16:06 -0000 1.5
+++ ResourceAdapterDConfigBean.java 20 Feb 2004 08:14:11 -0000 1.6
@@ -82,10 +82,10 @@
public class ResourceAdapterDConfigBean extends DConfigBeanSupport {
private final static SchemaTypeLoader SCHEMA_TYPE_LOADER =
XmlBeans.getContextTypeLoader();
- private final static String[] RESOURCE_ADAPTER_XPATHS = {
- "config-property",
- "outbound-resourceadapter/connection-definition",
- "adminobject"};
+ private final static String[][] RESOURCE_ADAPTER_XPATHS = {
+ {"config-property"},
+ {"outbound-resourceadapter", "connection-definition"},
+ {"adminobject"}};
private Map configPropertiesMap = new HashMap();
private Map connectionDefinitionsMap = new HashMap();
private Map adminObjectsMap = new HashMap();
@@ -117,13 +117,13 @@
public void setConfigPropertySettings(ConfigPropertySettings[]
configs) {
}
- }, configPropertiesMap);
+ }, configPropertiesMap, "config-property", "config-property-name");
//initialize connection definitions
GerOutboundResourceadapterType outboundResourceadapter =
resourceadapter.getOutboundResourceadapter();
if (outboundResourceadapter == null) {
outboundResourceadapter =
resourceadapter.addNewOutboundResourceadapter();
}
- DDBean[] connectionDefinitionDDBeans =
ddBean.getChildBean(RESOURCE_ADAPTER_XPATHS[1]);
+ DDBean[] connectionDefinitionDDBeans =
ddBean.getChildBean(getXpaths()[1]);
GerConnectionDefinitionType[] connectionDefinitions =
outboundResourceadapter.getConnectionDefinitionArray();
if (connectionDefinitions.length == 0) {
@@ -149,7 +149,7 @@
}
//admin objects
- DDBean[] adminObjecDdBeans =
ddBean.getChildBean(RESOURCE_ADAPTER_XPATHS[2]);
+ DDBean[] adminObjecDdBeans = ddBean.getChildBean(getXpaths()[2]);
GerAdminobjectType[] adminobjectTypes =
getResourceadapter().getAdminobjectArray();
if (adminobjectTypes.length == 0) {
@@ -206,21 +206,22 @@
public DConfigBean getDConfigBean(DDBean bean) throws
ConfigurationException {
String xpath = bean.getXpath();
- if (xpath.equals(RESOURCE_ADAPTER_XPATHS[0])) {
+ String[] xpaths = getXpaths();
+ if (xpath.equals(xpaths[0])) {
//resource adapter config property
String configPropertyName =
bean.getText("config-property-name")[0];
ConfigPropertySettingDConfigBean configPropertySetting =
(ConfigPropertySettingDConfigBean) configPropertiesMap.get(configPropertyName);
assert configPropertySetting != null;
return configPropertySetting;
}
- if (xpath.equals(RESOURCE_ADAPTER_XPATHS[1])) {
+ if (xpath.equals(xpaths[1])) {
//connection definition
String connectionFactoryInterface =
bean.getText("connectionfactory-interface")[0];
ConnectionDefinitionDConfigBean connectionDefinition =
(ConnectionDefinitionDConfigBean)
connectionDefinitionsMap.get(connectionFactoryInterface);
assert connectionDefinition != null;
return connectionDefinition;
}
- if (xpath.equals(RESOURCE_ADAPTER_XPATHS[2])) {
+ if (xpath.equals(xpaths[2])) {
//admin objects
String adminObjectInterface =
bean.getText("adminobject-interface")[0];
String adminObjectClass = bean.getText("adminobject-class")[0];
@@ -233,7 +234,7 @@
public String[] getXpaths() {
- return RESOURCE_ADAPTER_XPATHS;
+ return getXPathsForJ2ee_1_4(RESOURCE_ADAPTER_XPATHS);
}
1.4 +11 -6
incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ResourceAdapterDConfigRoot.java
Index: ResourceAdapterDConfigRoot.java
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ResourceAdapterDConfigRoot.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ResourceAdapterDConfigRoot.java 11 Feb 2004 08:02:20 -0000 1.3
+++ ResourceAdapterDConfigRoot.java 20 Feb 2004 08:14:11 -0000 1.4
@@ -67,6 +67,7 @@
import org.apache.geronimo.deployment.plugin.DConfigBeanRootSupport;
import org.apache.geronimo.xbeans.geronimo.GerConnectorDocument;
import org.apache.geronimo.xbeans.geronimo.GerResourceadapterType;
+import org.apache.geronimo.xbeans.geronimo.GerVersionType;
import org.apache.xmlbeans.SchemaTypeLoader;
import org.apache.xmlbeans.XmlBeans;
import org.apache.xmlbeans.XmlException;
@@ -79,8 +80,8 @@
* */
public class ResourceAdapterDConfigRoot extends DConfigBeanRootSupport {
private final static SchemaTypeLoader SCHEMA_TYPE_LOADER =
XmlBeans.getContextTypeLoader();
- private static String[] XPATHS = {
- "connector/resourceadapter"
+ private static String[][] XPATHS = {
+ {"connector", "resourceadapter"}
};
private ResourceAdapterDConfigBean resourceAdapterDConfigBean;
@@ -88,12 +89,13 @@
public ResourceAdapterDConfigRoot(DDBeanRoot ddBean) {
super(ddBean, GerConnectorDocument.Factory.newInstance(),
SCHEMA_TYPE_LOADER);
GerResourceadapterType resourceAdapter =
getConnectorDocument().addNewConnector().addNewResourceadapter();
+
getConnectorDocument().getConnector().setVersion(GerVersionType.X_1_5);
replaceResourceAdapterDConfigBean(resourceAdapter);
}
private void replaceResourceAdapterDConfigBean(GerResourceadapterType
resourceAdapter) {
DDBean ddBean = getDDBean();
- DDBean childDDBean = ddBean.getChildBean(XPATHS[0])[0];
+ DDBean childDDBean = ddBean.getChildBean(getXpaths()[0])[0];
resourceAdapterDConfigBean = new
ResourceAdapterDConfigBean(childDDBean, resourceAdapter);
}
@@ -102,11 +104,11 @@
}
public String[] getXpaths() {
- return XPATHS;
+ return getXPathsForJ2ee_1_4(XPATHS);
}
public DConfigBean getDConfigBean(DDBean bean) throws
ConfigurationException {
- if (XPATHS[0].equals(bean.getXpath())) {
+ if (getXpaths()[0].equals(bean.getXpath())) {
return resourceAdapterDConfigBean;
}
return null;
@@ -114,6 +116,9 @@
public void fromXML(InputStream inputStream) throws XmlException,
IOException {
super.fromXML(inputStream);
+ if
(!getConnectorDocument().getConnector().getVersion().equals(GerVersionType.X_1_5))
{
+ throw new IllegalStateException("Wrong version, expected 1.5");
+ }
replaceResourceAdapterDConfigBean(getConnectorDocument().getConnector().getResourceadapter());
}
}
1.1
incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/dconfigbean/ResourceAdapter_1_0DConfigRoot.java
Index: ResourceAdapter_1_0DConfigRoot.java
===================================================================
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Apache" and "Apache Software Foundation" and
* "Apache Geronimo" must not be used to endorse or promote products
* derived from this software without prior written permission. For
* written permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache",
* "Apache Geronimo", nor may "Apache" appear in their name, without
* prior written permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*
* ====================================================================
*/
package org.apache.geronimo.connector.deployment.dconfigbean;
import java.io.IOException;
import java.io.InputStream;
import javax.enterprise.deploy.model.DDBean;
import javax.enterprise.deploy.model.DDBeanRoot;
import javax.enterprise.deploy.spi.DConfigBean;
import javax.enterprise.deploy.spi.exceptions.ConfigurationException;
import org.apache.geronimo.deployment.plugin.DConfigBeanRootSupport;
import org.apache.geronimo.xbeans.geronimo.GerConnectionDefinitionType;
import org.apache.geronimo.xbeans.geronimo.GerConnectorDocument;
import org.apache.geronimo.xbeans.geronimo.GerVersionType;
import org.apache.xmlbeans.SchemaTypeLoader;
import org.apache.xmlbeans.XmlBeans;
import org.apache.xmlbeans.XmlException;
/**
*
*
* @version $Revision: 1.1 $ $Date: 2004/02/20 08:14:11 $
*
* */
public class ResourceAdapter_1_0DConfigRoot extends DConfigBeanRootSupport {
private final static SchemaTypeLoader SCHEMA_TYPE_LOADER =
XmlBeans.getContextTypeLoader();
private static String[] XPATHS = {
"connector/resourceadapter"
};
private ConnectionDefinitionDConfigBean connectionDefinitionDConfigBean;
public ResourceAdapter_1_0DConfigRoot(DDBeanRoot ddBean) {
super(ddBean, GerConnectorDocument.Factory.newInstance(),
SCHEMA_TYPE_LOADER);
GerConnectionDefinitionType connectionDefinition =
getConnectorDocument().addNewConnector().addNewResourceadapter().addNewOutboundResourceadapter().addNewConnectionDefinition();
getConnectorDocument().getConnector().setVersion(GerVersionType.X_1_0);
replaceConnectionDefinitionDConfigBean(connectionDefinition);
}
private void
replaceConnectionDefinitionDConfigBean(GerConnectionDefinitionType
connectionDefinition) {
DDBean ddBean = getDDBean();
DDBean childDDBean = ddBean.getChildBean(getXpaths()[0])[0];
connectionDefinitionDConfigBean = new
ConnectionDefinitionDConfigBean(childDDBean, connectionDefinition);
}
GerConnectorDocument getConnectorDocument() {
return (GerConnectorDocument)getXmlObject();
}
public String[] getXpaths() {
return XPATHS;
}
public DConfigBean getDConfigBean(DDBean bean) throws
ConfigurationException {
if (getXpaths()[0].equals(bean.getXpath())) {
return connectionDefinitionDConfigBean;
}
return null;
}
public void fromXML(InputStream inputStream) throws XmlException,
IOException {
super.fromXML(inputStream);
if
(!getConnectorDocument().getConnector().getVersion().equals(GerVersionType.X_1_0))
{
throw new IllegalStateException("Wrong version, expected 1.0");
}
replaceConnectionDefinitionDConfigBean(getConnectorDocument().getConnector().getResourceadapter().getOutboundResourceadapter().getConnectionDefinitionArray(0));
}
}
1.4 +5 -3
incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/RARConfiguration.java
Index: RARConfiguration.java
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/RARConfiguration.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- RARConfiguration.java 10 Feb 2004 08:04:21 -0000 1.3
+++ RARConfiguration.java 20 Feb 2004 08:14:12 -0000 1.4
@@ -57,8 +57,10 @@
package org.apache.geronimo.connector.deployment;
import javax.enterprise.deploy.model.DeployableObject;
+import javax.enterprise.deploy.spi.DConfigBeanRoot;
import org.apache.geronimo.deployment.plugin.DeploymentConfigurationSupport;
+import org.apache.geronimo.deployment.plugin.DConfigBeanRootSupport;
import
org.apache.geronimo.connector.deployment.dconfigbean.ResourceAdapterDConfigRoot;
/**
@@ -69,7 +71,7 @@
* */
public class RARConfiguration extends DeploymentConfigurationSupport {
- public RARConfiguration(DeployableObject deployable) {
- super(deployable, new
ResourceAdapterDConfigRoot(deployable.getDDBeanRoot()));
+ public RARConfiguration(DeployableObject deployable,
DConfigBeanRootSupport dconfigRoot) {
+ super(deployable, dconfigRoot);
}
}
1.2 +11 -2
incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/RARConfigurer.java
Index: RARConfigurer.java
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/connector/src/java/org/apache/geronimo/connector/deployment/RARConfigurer.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- RARConfigurer.java 9 Feb 2004 00:01:19 -0000 1.1
+++ RARConfigurer.java 20 Feb 2004 08:14:12 -0000 1.2
@@ -62,6 +62,8 @@
import org.apache.geronimo.deployment.ModuleConfigurer;
import org.apache.geronimo.gbean.GBeanInfo;
import org.apache.geronimo.gbean.GBeanInfoFactory;
+import
org.apache.geronimo.connector.deployment.dconfigbean.ResourceAdapterDConfigRoot;
+import
org.apache.geronimo.connector.deployment.dconfigbean.ResourceAdapter_1_0DConfigRoot;
/**
*
@@ -69,9 +71,16 @@
* @version $Revision$ $Date$
*/
public class RARConfigurer implements ModuleConfigurer {
+
public DeploymentConfiguration createConfiguration(DeployableObject
deployable) {
if (ModuleType.RAR.equals(deployable.getType())) {
- return new RARConfiguration(deployable);
+ if
(deployable.getDDBeanRoot().getDDBeanRootVersion().equals("1.0")) {
+ return new RARConfiguration(deployable, new
ResourceAdapter_1_0DConfigRoot(deployable.getDDBeanRoot()));
+ }
+ if
(deployable.getDDBeanRoot().getDDBeanRootVersion().equals("1.5")) {
+ return new RARConfiguration(deployable, new
ResourceAdapterDConfigRoot(deployable.getDDBeanRoot()));
+ }
+ throw new IllegalArgumentException("Unknown resource adapter
version: " + deployable.getDDBeanRoot().getDDBeanRootVersion());
} else {
return null;
}
1.10 +2 -1
incubator-geronimo/modules/connector/src/test/org/apache/geronimo/connector/deployment/Connector_1_5Test.java
Index: Connector_1_5Test.java
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/connector/src/test/org/apache/geronimo/connector/deployment/Connector_1_5Test.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Connector_1_5Test.java 19 Feb 2004 23:16:06 -0000 1.9
+++ Connector_1_5Test.java 20 Feb 2004 08:14:12 -0000 1.10
@@ -145,6 +145,7 @@
assertNotNull(root);
//resource adapter
+ String path = root.getXpaths()[0];
DDBean resourceAdapterdd =
ddroot.getChildBean(root.getXpaths()[0])[0];
ResourceAdapterDConfigBean resourceAdapterDConfigBean =
(ResourceAdapterDConfigBean) root.getDConfigBean(resourceAdapterdd);
assertNotNull(resourceAdapterDConfigBean);
1.2 +21 -21
incubator-geronimo/modules/connector/src/test-data/connector_1_0/ra.xml
Index: ra.xml
===================================================================
RCS file:
/home/cvs/incubator-geronimo/modules/connector/src/test-data/connector_1_0/ra.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ra.xml 2 Feb 2004 22:10:35 -0000 1.1
+++ ra.xml 20 Feb 2004 08:14:12 -0000 1.2
@@ -3,34 +3,34 @@
"http://java.sun.com/dtd/connector_1_0.dtd">
<connector>
- <display-name>test 1.0 adapter spec</display-name>
- <description>test ra.xml for jca 1.0</description>
+ <display-name>test 1.0 adapter spec</display-name>
+ <description>test ra.xml for jca 1.0</description>
- <vendor-name>apache-geronimo</vendor-name>
- <spec-version>1.0</spec-version>
- <eis-type>test</eis-type>
- <version>0.0</version>
- <resourceadapter>
+ <vendor-name>apache-geronimo</vendor-name>
+ <spec-version>1.0</spec-version>
+ <eis-type>test</eis-type>
+ <version>0.0</version>
+ <resourceadapter>
<managedconnectionfactory-class>org.apache.geronimo.connector.mock.MockManagedConnectionFactory</managedconnectionfactory-class>
<connectionfactory-interface>javax.resource.cci.ConnectionFactory</connectionfactory-interface>
<connectionfactory-impl-class>org.apache.geronimo.connector.mock.MockConnectionFactory</connectionfactory-impl-class>
<connection-interface>javax.resource.cci.Connection</connection-interface>
<connection-impl-class>org.apache.geronimo.connector.mock.MockConnection</connection-impl-class>
- <transaction-support></transaction-support>
+ <transaction-support></transaction-support>
<config-property>
-
<config-property-name>OutboundStringProperty1</config-property-name>
- <config-property-type>java.lang.String</config-property-type>
+
<config-property-name>OutboundStringProperty1</config-property-name>
+ <config-property-type>java.lang.String</config-property-type>
</config-property>
- <authentication-mechanism>
- <description>description</description>
-
<authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
-
<credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
- </authentication-mechanism>
- <reauthentication-support>false</reauthentication-support>
- <security-permission>
- <description>test security permission</description>
-
<security-permission-spec>org.apache.geronimo.TestSecurityPermission</security-permission-spec>
- </security-permission>
- </resourceadapter>
+ <authentication-mechanism>
+ <description>description</description>
+
<authentication-mechanism-type>BasicPassword</authentication-mechanism-type>
+
<credential-interface>javax.resource.spi.security.PasswordCredential</credential-interface>
+ </authentication-mechanism>
+ <reauthentication-support>false</reauthentication-support>
+ <security-permission>
+ <description>test security permission</description>
+
<security-permission-spec>org.apache.geronimo.TestSecurityPermission</security-permission-spec>
+ </security-permission>
+ </resourceadapter>
</connector>