[jboss-cvs] JBossAS SVN: r107642 - in projects/jboss-jca/trunk/common/src: main/java/org/jboss/jca/common/metadata and 6 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Aug 17 07:10:42 EDT 2010
Author: maeste
Date: 2010-08-17 07:10:42 -0400 (Tue, 17 Aug 2010)
New Revision: 107642
Added:
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/AdminObjectImpl.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/LocalTxConnectionFactoryImpl.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/NoTxConnectionFactoryImpl.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/ResourceAdapterImpl.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/ResourceAdapterParser.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/SecurityImpl.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/TimeOutImpl.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/ValidationImpl.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/XaTxConnectionFactoryImpl.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/package.html
projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/resourceadapter/
projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/resourceadapter/ResourceAdapterParserTestCase.java
projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/resourceadapter/package.html
projects/jboss-jca/trunk/common/src/test/resources/resource-adapter/
projects/jboss-jca/trunk/common/src/test/resources/resource-adapter/asapxcess-jb3.2-ds.xml
Removed:
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/
Modified:
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/LocalTxConnectionFactory.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/NoTxConnectionFactory.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/ResourceAdapter.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/TimeOut.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/XaTxConnectionFactory.java
projects/jboss-jca/trunk/common/src/main/resources/schema/resource-adapter_1_0.xsd
Log:
JBJCA-401 few fixes to resource-adapter_1_0.xsd and metadata api and impl for this xsd. Parser implementation, and test suite with only one example atm waiting for discussion in forum
Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/LocalTxConnectionFactory.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/LocalTxConnectionFactory.java 2010-08-17 10:12:34 UTC (rev 107641)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/LocalTxConnectionFactory.java 2010-08-17 11:10:42 UTC (rev 107642)
@@ -191,8 +191,11 @@
/** use-java-context attribute
*
*/
- USEJAVACONTEXT("use-java-context");
+ USEJAVACONTEXT("use-java-context"),
+ /** pool-name attribute **/
+ POOL_NAME("pool-name");
+
private final String name;
/**
Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/NoTxConnectionFactory.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/NoTxConnectionFactory.java 2010-08-17 10:12:34 UTC (rev 107641)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/NoTxConnectionFactory.java 2010-08-17 11:10:42 UTC (rev 107642)
@@ -84,7 +84,7 @@
*
* @return the configProperty.
*/
- public HashMap<String, String> getConfigProperty();
+ public Map<String, String> getConfigProperties();
/**
* Get the security.
@@ -276,8 +276,11 @@
/** use-java-context attribute
*
*/
- USEJAVACONTEXT("use-java-context");
+ USEJAVACONTEXT("use-java-context"),
+ /** pool-name attribute **/
+ POOL_NAME("pool-name");
+
private final String name;
/**
Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/ResourceAdapter.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/ResourceAdapter.java 2010-08-17 10:12:34 UTC (rev 107641)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/ResourceAdapter.java 2010-08-17 11:10:42 UTC (rev 107642)
@@ -99,8 +99,13 @@
/**
adminobject tag
*/
- ADMINOBJECT("admin-object");
+ ADMINOBJECT("admin-object"),
+ /** archive tag
+ *
+ */
+ ARCHIVE("archive");
+
private final String name;
/**
Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/TimeOut.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/TimeOut.java 2010-08-17 10:12:34 UTC (rev 107641)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/TimeOut.java 2010-08-17 11:10:42 UTC (rev 107642)
@@ -81,7 +81,7 @@
/**
blockingTimeoutMillis tag
*/
- BLOCKINGTIMEOUTMILLIS("blocking-imeout-millis"),
+ BLOCKINGTIMEOUTMILLIS("blocking-timeout-millis"),
/**
idleTimeoutMinutes tag
*/
Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/XaTxConnectionFactory.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/XaTxConnectionFactory.java 2010-08-17 10:12:34 UTC (rev 107641)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/api/metadata/resourceadapter/XaTxConnectionFactory.java 2010-08-17 11:10:42 UTC (rev 107642)
@@ -39,7 +39,7 @@
*
* @return the xaResourceTimeout.
*/
- public String getXaResourceTimeout();
+ public Long getXaResourceTimeout();
/**
*
@@ -189,8 +189,11 @@
/** use-java-context attribute
*
*/
- USEJAVACONTEXT("use-java-context");
+ USEJAVACONTEXT("use-java-context"),
+ /** pool-name attribute **/
+ POOL_NAME("pool-name");
+
private final String name;
/**
Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/AdminObjectImpl.java (from rev 107636, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/AdminObjectImpl.java)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/AdminObjectImpl.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/AdminObjectImpl.java 2010-08-17 11:10:42 UTC (rev 107642)
@@ -0,0 +1,193 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.resourceadapter;
+
+import org.jboss.jca.common.api.metadata.resourceadapter.AdminObject;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * A AdminObjectImpl.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public class AdminObjectImpl implements AdminObject
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = 8137442556861441967L;
+
+ private final HashMap<String, String> configProperties;
+
+ private final String className;
+
+ private final String jndiName;
+
+ private final boolean enabled;
+
+ private final boolean useJavaContext;
+
+ /**
+ * Create a new AdminObjectImpl.
+ *
+ * @param configProperties configProperties
+ * @param className className
+ * @param jndiName jndiName
+ * @param enabled enabled
+ * @param useJavaContext useJavaContext
+ */
+ public AdminObjectImpl(Map<String, String> configProperties, String className, String jndiName, boolean enabled,
+ boolean useJavaContext)
+ {
+ super();
+ if (configProperties != null)
+ {
+ this.configProperties = new HashMap<String, String>(configProperties.size());
+ this.configProperties.putAll(configProperties);
+ }
+ else
+ {
+ this.configProperties = new HashMap<String, String>(0);
+ }
+ this.className = className;
+ this.jndiName = jndiName;
+ this.enabled = enabled;
+ this.useJavaContext = useJavaContext;
+ }
+
+ /**
+ * Get the configProperties.
+ *
+ * @return the configProperties.
+ */
+ @Override
+ public final Map<String, String> getConfigProperties()
+ {
+ return Collections.unmodifiableMap(configProperties);
+ }
+
+ /**
+ * Get the className.
+ *
+ * @return the className.
+ */
+ @Override
+ public final String getClassName()
+ {
+ return className;
+ }
+
+ /**
+ * Get the jndiName.
+ *
+ * @return the jndiName.
+ */
+ @Override
+ public final String getJndiName()
+ {
+ return jndiName;
+ }
+
+ /**
+ * Get the enabled.
+ *
+ * @return the enabled.
+ */
+ @Override
+ public final boolean isEnabled()
+ {
+ return enabled;
+ }
+
+ /**
+ * Get the useJavaContext.
+ *
+ * @return the useJavaContext.
+ */
+ @Override
+ public final boolean isUseJavaContext()
+ {
+ return useJavaContext;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((className == null) ? 0 : className.hashCode());
+ result = prime * result + ((configProperties == null) ? 0 : configProperties.hashCode());
+ result = prime * result + (enabled ? 1231 : 1237);
+ result = prime * result + ((jndiName == null) ? 0 : jndiName.hashCode());
+ result = prime * result + (useJavaContext ? 1231 : 1237);
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof AdminObjectImpl))
+ return false;
+ AdminObjectImpl other = (AdminObjectImpl) obj;
+ if (className == null)
+ {
+ if (other.className != null)
+ return false;
+ }
+ else if (!className.equals(other.className))
+ return false;
+ if (configProperties == null)
+ {
+ if (other.configProperties != null)
+ return false;
+ }
+ else if (!configProperties.equals(other.configProperties))
+ return false;
+ if (enabled != other.enabled)
+ return false;
+ if (jndiName == null)
+ {
+ if (other.jndiName != null)
+ return false;
+ }
+ else if (!jndiName.equals(other.jndiName))
+ return false;
+ if (useJavaContext != other.useJavaContext)
+ return false;
+ return true;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "AdminObjectImpl [configProperties=" + configProperties + ", className=" + className + ", jndiName="
+ + jndiName + ", enabled=" + enabled + ", useJavaContext=" + useJavaContext + "]";
+ }
+}
+
Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/LocalTxConnectionFactoryImpl.java (from rev 107636, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/LocalTxConnectionFactoryImpl.java)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/LocalTxConnectionFactoryImpl.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/LocalTxConnectionFactoryImpl.java 2010-08-17 11:10:42 UTC (rev 107642)
@@ -0,0 +1,140 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.resourceadapter;
+
+import org.jboss.jca.common.api.metadata.resourceadapter.LocalTxConnectionFactory;
+import org.jboss.jca.common.api.metadata.resourceadapter.Security;
+import org.jboss.jca.common.api.metadata.resourceadapter.TimeOut;
+import org.jboss.jca.common.api.metadata.resourceadapter.Validation;
+
+import java.util.Map;
+
+/**
+ *
+ * A LocalTxConnectionFactoryImpl.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public class LocalTxConnectionFactoryImpl extends NoTxConnectionFactoryImpl implements LocalTxConnectionFactory
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -7691787666361594149L;
+
+ private final boolean noTxSeparatePools;
+
+ private final boolean trackConnectionByTx;
+
+ /**
+ * Create a new LocalTxConnectionFactoryImpl.
+ *
+ * @param minPoolSize minPoolSize
+ * @param maxPoolSize maxPoolSize
+ * @param prefill prefill
+ * @param userName userName
+ * @param password password
+ * @param connectionDefinition connectionDefinition
+ * @param configProperties configProperties
+ * @param security security
+ * @param timeOut timeOut
+ * @param validation validation
+ * @param poolName poolName
+ * @param className className
+ * @param jndiName jndiName
+ * @param enabled enabled
+ * @param useJavaContext useJavaContext
+ * @param noTxSeparatePools noTxSeparatePools
+ * @param trackConnectionByTx trackConnectionByTx
+ */
+ public LocalTxConnectionFactoryImpl(Integer minPoolSize, Integer maxPoolSize, boolean prefill, String userName,
+ String password, String connectionDefinition, Map<String, String> configProperties, Security security,
+ TimeOut timeOut, Validation validation, String poolName, String className, String jndiName, boolean enabled,
+ boolean useJavaContext, boolean noTxSeparatePools, boolean trackConnectionByTx)
+ {
+ super(minPoolSize, maxPoolSize, prefill, userName, password, connectionDefinition, configProperties, security,
+ timeOut, validation, poolName, className, jndiName, enabled, useJavaContext);
+ this.noTxSeparatePools = noTxSeparatePools;
+ this.trackConnectionByTx = trackConnectionByTx;
+ }
+
+ /**
+ * Get the noTxSeparatePools.
+ *
+ * @return the noTxSeparatePools.
+ */
+ @Override
+ public final boolean isNoTxSeparatePools()
+ {
+ return noTxSeparatePools;
+ }
+
+ /**
+ * Get the trackConnectionByTx.
+ *
+ * @return the trackConnectionByTx.
+ */
+ @Override
+ public final boolean isTrackConnectionByTx()
+ {
+ return trackConnectionByTx;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + (noTxSeparatePools ? 1231 : 1237);
+ result = prime * result + (trackConnectionByTx ? 1231 : 1237);
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (!super.equals(obj))
+ return false;
+ if (!(obj instanceof LocalTxConnectionFactoryImpl))
+ return false;
+ LocalTxConnectionFactoryImpl other = (LocalTxConnectionFactoryImpl) obj;
+ if (noTxSeparatePools != other.noTxSeparatePools)
+ return false;
+ if (trackConnectionByTx != other.trackConnectionByTx)
+ return false;
+ return true;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "LocalTxConnectionFactoryImpl [noTxSeparatePools=" + noTxSeparatePools + ", trackConnectionByTx="
+ + trackConnectionByTx + ", minPoolSize=" + minPoolSize + ", maxPoolSize=" + maxPoolSize + ", prefill="
+ + prefill + ", userName=" + userName + ", password=" + password + ", connectionDefinition="
+ + connectionDefinition + ", configProperties=" + configProperties + ", security=" + security + ", timeOut="
+ + timeOut + ", validation=" + validation + ", poolName=" + poolName + ", className=" + className
+ + ", jndiName=" + jndiName + ", enabled=" + enabled + ", useJavaContext=" + useJavaContext + "]";
+ }
+
+}
+
Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/NoTxConnectionFactoryImpl.java (from rev 107636, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/NoTxConnectionFactoryImpl.java)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/NoTxConnectionFactoryImpl.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/NoTxConnectionFactoryImpl.java 2010-08-17 11:10:42 UTC (rev 107642)
@@ -0,0 +1,440 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.resourceadapter;
+
+import org.jboss.jca.common.api.metadata.resourceadapter.NoTxConnectionFactory;
+import org.jboss.jca.common.api.metadata.resourceadapter.Security;
+import org.jboss.jca.common.api.metadata.resourceadapter.TimeOut;
+import org.jboss.jca.common.api.metadata.resourceadapter.Validation;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * A NoTxConnectionFactoryImpl.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public class NoTxConnectionFactoryImpl implements NoTxConnectionFactory
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -2475537312421610650L;
+
+ /** minPoolSize field **/
+ protected final Integer minPoolSize;
+
+ /** maxPoolSize field **/
+ protected final Integer maxPoolSize;
+
+ /** prefill field **/
+ protected final boolean prefill;
+
+ /** userName field **/
+ protected final String userName;
+
+ /** password field **/
+ protected final String password;
+
+ /** connectionDefinition field **/
+ protected final String connectionDefinition;
+
+ /** configProperty field **/
+ protected final HashMap<String, String> configProperties;
+
+ /** security field **/
+ protected final Security security;
+
+ /** timeOut field **/
+ protected final TimeOut timeOut;
+
+ /** validation field **/
+ protected final Validation validation;
+
+ /** poolName field **/
+ protected final String poolName;
+
+ /** className field **/
+ protected final String className;
+
+ /** jndiName field **/
+ protected final String jndiName;
+
+ /** enabled field **/
+ protected final boolean enabled;
+
+ /** useJavaContext field **/
+ protected final boolean useJavaContext;
+
+ /**
+ * Create a new NoTxConnectionFactoryImpl.
+ *
+ * @param minPoolSize minPoolSize
+ * @param maxPoolSize maxPoolSize
+ * @param prefill prefill
+ * @param userName userName
+ * @param password password
+ * @param connectionDefinition connectionDefinition
+ * @param configProperties configProperties
+ * @param security security
+ * @param timeOut timeOut
+ * @param validation validation
+ * @param poolName poolName
+ * @param className className
+ * @param jndiName jndiName
+ * @param enabled enabled
+ * @param useJavaContext useJavaContext
+ */
+ public NoTxConnectionFactoryImpl(Integer minPoolSize, Integer maxPoolSize, boolean prefill, String userName,
+ String password, String connectionDefinition, Map<String, String> configProperties, Security security,
+ TimeOut timeOut, Validation validation, String poolName, String className, String jndiName, boolean enabled,
+ boolean useJavaContext)
+ {
+ super();
+ this.minPoolSize = minPoolSize;
+ this.maxPoolSize = maxPoolSize;
+ this.prefill = prefill;
+ this.userName = userName;
+ this.password = password;
+ this.connectionDefinition = connectionDefinition;
+ if (configProperties != null)
+ {
+ this.configProperties = new HashMap<String, String>(configProperties.size());
+ this.configProperties.putAll(configProperties);
+ }
+ else
+ {
+ this.configProperties = new HashMap<String, String>(0);
+ }
+ this.security = security;
+ this.timeOut = timeOut;
+ this.validation = validation;
+ this.poolName = poolName;
+ this.className = className;
+ this.jndiName = jndiName;
+ this.enabled = enabled;
+ this.useJavaContext = useJavaContext;
+ }
+
+ /**
+ * Get the minPoolSize.
+ *
+ * @return the minPoolSize.
+ */
+ @Override
+ public final Integer getMinPoolSize()
+ {
+ return minPoolSize;
+ }
+
+ /**
+ * Get the maxPoolSize.
+ *
+ * @return the maxPoolSize.
+ */
+ @Override
+ public final Integer getMaxPoolSize()
+ {
+ return maxPoolSize;
+ }
+
+ /**
+ * Get the prefill.
+ *
+ * @return the prefill.
+ */
+ @Override
+ public final boolean isPrefill()
+ {
+ return prefill;
+ }
+
+ /**
+ * Get the userName.
+ *
+ * @return the userName.
+ */
+ @Override
+ public final String getUserName()
+ {
+ return userName;
+ }
+
+ /**
+ * Get the password.
+ *
+ * @return the password.
+ */
+ @Override
+ public final String getPassword()
+ {
+ return password;
+ }
+
+ /**
+ * Get the connectionDefinition.
+ *
+ * @return the connectionDefinition.
+ */
+ @Override
+ public final String getConnectionDefinition()
+ {
+ return connectionDefinition;
+ }
+
+ /**
+ * Get the configProperty.
+ *
+ * @return the configProperty.
+ */
+ @Override
+ public final Map<String, String> getConfigProperties()
+ {
+ return Collections.unmodifiableMap(configProperties);
+ }
+
+ /**
+ * Get the security.
+ *
+ * @return the security.
+ */
+ @Override
+ public final Security getSecurity()
+ {
+ return security;
+ }
+
+ /**
+ * Get the timeOut.
+ *
+ * @return the timeOut.
+ */
+ @Override
+ public final TimeOut getTimeOut()
+ {
+ return timeOut;
+ }
+
+ /**
+ * Get the validation.
+ *
+ * @return the validation.
+ */
+ @Override
+ public final Validation getValidation()
+ {
+ return validation;
+ }
+
+ /**
+ * Get the poolName.
+ *
+ * @return the poolName.
+ */
+ @Override
+ public final String getPoolName()
+ {
+ return poolName;
+ }
+
+ /**
+ * Get the className.
+ *
+ * @return the className.
+ */
+ @Override
+ public final String getClassName()
+ {
+ return className;
+ }
+
+ /**
+ * Get the jndiName.
+ *
+ * @return the jndiName.
+ */
+ @Override
+ public final String getJndiName()
+ {
+ return jndiName;
+ }
+
+ /**
+ * Get the enabled.
+ *
+ * @return the enabled.
+ */
+ @Override
+ public final boolean isEnabled()
+ {
+ return enabled;
+ }
+
+ /**
+ * Get the useJavaContext.
+ *
+ * @return the useJavaContext.
+ */
+ @Override
+ public final boolean isUseJavaContext()
+ {
+ return useJavaContext;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((className == null) ? 0 : className.hashCode());
+ result = prime * result + ((configProperties == null) ? 0 : configProperties.hashCode());
+ result = prime * result + ((connectionDefinition == null) ? 0 : connectionDefinition.hashCode());
+ result = prime * result + (enabled ? 1231 : 1237);
+ result = prime * result + ((jndiName == null) ? 0 : jndiName.hashCode());
+ result = prime * result + ((maxPoolSize == null) ? 0 : maxPoolSize.hashCode());
+ result = prime * result + ((minPoolSize == null) ? 0 : minPoolSize.hashCode());
+ result = prime * result + ((password == null) ? 0 : password.hashCode());
+ result = prime * result + ((poolName == null) ? 0 : poolName.hashCode());
+ result = prime * result + (prefill ? 1231 : 1237);
+ result = prime * result + ((security == null) ? 0 : security.hashCode());
+ result = prime * result + ((timeOut == null) ? 0 : timeOut.hashCode());
+ result = prime * result + (useJavaContext ? 1231 : 1237);
+ result = prime * result + ((userName == null) ? 0 : userName.hashCode());
+ result = prime * result + ((validation == null) ? 0 : validation.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof NoTxConnectionFactoryImpl))
+ return false;
+ NoTxConnectionFactoryImpl other = (NoTxConnectionFactoryImpl) obj;
+ if (className == null)
+ {
+ if (other.className != null)
+ return false;
+ }
+ else if (!className.equals(other.className))
+ return false;
+ if (configProperties == null)
+ {
+ if (other.configProperties != null)
+ return false;
+ }
+ else if (!configProperties.equals(other.configProperties))
+ return false;
+ if (connectionDefinition == null)
+ {
+ if (other.connectionDefinition != null)
+ return false;
+ }
+ else if (!connectionDefinition.equals(other.connectionDefinition))
+ return false;
+ if (enabled != other.enabled)
+ return false;
+ if (jndiName == null)
+ {
+ if (other.jndiName != null)
+ return false;
+ }
+ else if (!jndiName.equals(other.jndiName))
+ return false;
+ if (maxPoolSize == null)
+ {
+ if (other.maxPoolSize != null)
+ return false;
+ }
+ else if (!maxPoolSize.equals(other.maxPoolSize))
+ return false;
+ if (minPoolSize == null)
+ {
+ if (other.minPoolSize != null)
+ return false;
+ }
+ else if (!minPoolSize.equals(other.minPoolSize))
+ return false;
+ if (password == null)
+ {
+ if (other.password != null)
+ return false;
+ }
+ else if (!password.equals(other.password))
+ return false;
+ if (poolName == null)
+ {
+ if (other.poolName != null)
+ return false;
+ }
+ else if (!poolName.equals(other.poolName))
+ return false;
+ if (prefill != other.prefill)
+ return false;
+ if (security == null)
+ {
+ if (other.security != null)
+ return false;
+ }
+ else if (!security.equals(other.security))
+ return false;
+ if (timeOut == null)
+ {
+ if (other.timeOut != null)
+ return false;
+ }
+ else if (!timeOut.equals(other.timeOut))
+ return false;
+ if (useJavaContext != other.useJavaContext)
+ return false;
+ if (userName == null)
+ {
+ if (other.userName != null)
+ return false;
+ }
+ else if (!userName.equals(other.userName))
+ return false;
+ if (validation == null)
+ {
+ if (other.validation != null)
+ return false;
+ }
+ else if (!validation.equals(other.validation))
+ return false;
+ return true;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "NoTxConnectionFactoryImpl [minPoolSize=" + minPoolSize + ", maxPoolSize=" + maxPoolSize + ", prefill="
+ + prefill + ", userName=" + userName + ", password=" + password + ", connectionDefinition="
+ + connectionDefinition + ", configProperties=" + configProperties + ", security=" + security + ", timeOut="
+ + timeOut + ", validation=" + validation + ", poolName=" + poolName + ", className=" + className
+ + ", jndiName=" + jndiName + ", enabled=" + enabled + ", useJavaContext=" + useJavaContext + "]";
+ }
+}
Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/ResourceAdapterImpl.java (from rev 107636, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/ResourceAdapterImpl.java)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/ResourceAdapterImpl.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/ResourceAdapterImpl.java 2010-08-17 11:10:42 UTC (rev 107642)
@@ -0,0 +1,186 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.resourceadapter;
+
+import org.jboss.jca.common.api.metadata.common.TransactionSupportEnum;
+import org.jboss.jca.common.api.metadata.resourceadapter.AdminObject;
+import org.jboss.jca.common.api.metadata.resourceadapter.NoTxConnectionFactory;
+import org.jboss.jca.common.api.metadata.resourceadapter.ResourceAdapter;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ *
+ * A ResourceAdapterImpl.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public class ResourceAdapterImpl implements ResourceAdapter
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -7422976850056232511L;
+ private final String archive;
+ private final TransactionSupportEnum transactionSupport;
+
+ private final ArrayList<NoTxConnectionFactory> connectionFactories;
+
+ private final ArrayList<AdminObject> adminObjects;
+
+ /**
+ * Create a new ResourceAdapterImpl.
+ *
+ * @param archive archive
+ * @param transactionSupport transactionSupport
+ * @param connectionFactories connectionFactories
+ * @param adminObjects adminObjects
+ */
+ public ResourceAdapterImpl(String archive, TransactionSupportEnum transactionSupport,
+ List<? extends NoTxConnectionFactory> connectionFactories, List<AdminObject> adminObjects)
+ {
+ super();
+ this.archive = archive;
+ this.transactionSupport = transactionSupport;
+ if (connectionFactories != null)
+ {
+ this.connectionFactories = new ArrayList<NoTxConnectionFactory>(connectionFactories.size());
+ this.connectionFactories.addAll(connectionFactories);
+ }
+ else
+ {
+ this.connectionFactories = new ArrayList<NoTxConnectionFactory>(0);
+ }
+
+ if (adminObjects != null)
+ {
+ this.adminObjects = new ArrayList<AdminObject>(adminObjects.size());
+ this.adminObjects.addAll(adminObjects);
+ }
+ else
+ {
+ this.adminObjects = new ArrayList<AdminObject>(0);
+ }
+
+ }
+
+ /**
+ * Get the archive.
+ *
+ * @return the archive.
+ */
+ @Override
+ public final String getArchive()
+ {
+ return archive;
+ }
+
+ /**
+ * Get the transactionSupport.
+ *
+ * @return the transactionSupport.
+ */
+ @Override
+ public final TransactionSupportEnum getTransactionSupport()
+ {
+ return transactionSupport;
+ }
+
+ /**
+ * Get the connectionFactories.
+ *
+ * @return the connectionFactories.
+ */
+ @Override
+ public final List<? extends NoTxConnectionFactory> getConnectionFactories()
+ {
+ return Collections.unmodifiableList(connectionFactories);
+ }
+
+ /**
+ * Get the adminObjects.
+ *
+ * @return the adminObjects.
+ */
+ @Override
+ public final List<AdminObject> getAdminobjects()
+ {
+ return Collections.unmodifiableList(adminObjects);
+ }
+
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((adminObjects == null) ? 0 : adminObjects.hashCode());
+ result = prime * result + ((archive == null) ? 0 : archive.hashCode());
+ result = prime * result + ((connectionFactories == null) ? 0 : connectionFactories.hashCode());
+ result = prime * result + ((transactionSupport == null) ? 0 : transactionSupport.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof ResourceAdapterImpl))
+ return false;
+ ResourceAdapterImpl other = (ResourceAdapterImpl) obj;
+ if (adminObjects == null)
+ {
+ if (other.adminObjects != null)
+ return false;
+ }
+ else if (!adminObjects.equals(other.adminObjects))
+ return false;
+ if (archive == null)
+ {
+ if (other.archive != null)
+ return false;
+ }
+ else if (!archive.equals(other.archive))
+ return false;
+ if (connectionFactories == null)
+ {
+ if (other.connectionFactories != null)
+ return false;
+ }
+ else if (!connectionFactories.equals(other.connectionFactories))
+ return false;
+ if (transactionSupport != other.transactionSupport)
+ return false;
+ return true;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "ResourceAdapterImpl [archive=" + archive + ", transactionSupport=" + transactionSupport
+ + ", connectionFactories=" + connectionFactories + ", adminObjects=" + adminObjects + "]";
+ }
+}
+
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/ResourceAdapterParser.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/ResourceAdapterParser.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/ResourceAdapterParser.java 2010-08-17 11:10:42 UTC (rev 107642)
@@ -0,0 +1,868 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.resourceadapter;
+
+import org.jboss.jca.common.api.metadata.common.SecurityManager;
+import org.jboss.jca.common.api.metadata.common.TransactionSupportEnum;
+import org.jboss.jca.common.api.metadata.resourceadapter.AdminObject;
+import org.jboss.jca.common.api.metadata.resourceadapter.AdminObject.Attribute;
+import org.jboss.jca.common.api.metadata.resourceadapter.LocalTxConnectionFactory;
+import org.jboss.jca.common.api.metadata.resourceadapter.NoTxConnectionFactory;
+import org.jboss.jca.common.api.metadata.resourceadapter.ResourceAdapter;
+import org.jboss.jca.common.api.metadata.resourceadapter.Security;
+import org.jboss.jca.common.api.metadata.resourceadapter.TimeOut;
+import org.jboss.jca.common.api.metadata.resourceadapter.Validation;
+import org.jboss.jca.common.api.metadata.resourceadapter.XaTxConnectionFactory;
+import org.jboss.jca.common.metadata.AbstractParser;
+import org.jboss.jca.common.metadata.MetadataParser;
+import org.jboss.jca.common.metadata.ParserException;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
+import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
+
+/**
+ *
+ * A ResourceAdapterParserr.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public class ResourceAdapterParser extends AbstractParser implements MetadataParser<ResourceAdapter>
+{
+
+ @Override
+ public ResourceAdapter parse(InputStream xmlInputStream) throws Exception
+ {
+
+ XMLStreamReader reader = null;
+ ResourceAdapter adapter = null;
+
+ try
+ {
+ XMLInputFactory inputFactory = XMLInputFactory.newInstance();
+ reader = inputFactory.createXMLStreamReader(xmlInputStream);
+
+ //iterate over tags
+ int iterate;
+ try
+ {
+ iterate = reader.nextTag();
+ }
+ catch (XMLStreamException e)
+ {
+ //founding a non tag..go on. Normally non-tag found at beginning are comments or DTD declaration
+ iterate = reader.nextTag();
+ }
+ switch (iterate)
+ {
+ case END_ELEMENT : {
+ // should mean we're done, so ignore it.
+ break;
+ }
+ case START_ELEMENT : {
+
+ switch (Tag.forName(reader.getLocalName()))
+ {
+ case RESOURCE_ADPTER : {
+ adapter = parseResourceAdapter(reader);
+ break;
+ }
+ default :
+ throw new ParserException("Unexpected element:" + reader.getLocalName());
+ }
+
+ break;
+ }
+ default :
+ throw new IllegalStateException();
+ }
+ }
+ finally
+ {
+ if (reader != null)
+ reader.close();
+ }
+ return adapter;
+
+ }
+
+ private ResourceAdapter parseResourceAdapter(XMLStreamReader reader) throws XMLStreamException, ParserException
+ {
+ ArrayList<NoTxConnectionFactory> connectionFactories = new ArrayList<NoTxConnectionFactory>();
+ ArrayList<AdminObject> adminObjects = new ArrayList<AdminObject>();
+ String archive = null;
+ TransactionSupportEnum transactionSupport = null;
+ while (reader.hasNext())
+ {
+ switch (reader.nextTag())
+ {
+ case END_ELEMENT : {
+ if (Tag.forName(reader.getLocalName()) == Tag.RESOURCE_ADPTER)
+ {
+ return new ResourceAdapterImpl(archive, transactionSupport, connectionFactories, adminObjects);
+ }
+ else
+ {
+ if (ResourceAdapter.Tag.forName(reader.getLocalName()) == ResourceAdapter.Tag.UNKNOWN)
+ {
+ throw new ParserException("unexpected end tag" + reader.getLocalName());
+ }
+ }
+ break;
+ }
+ case START_ELEMENT : {
+ switch (ResourceAdapter.Tag.forName(reader.getLocalName()))
+ {
+ case ADMINOBJECT : {
+ adminObjects.add(parseAdminObjects(reader));
+ break;
+ }
+ case LOCALTXCONNECTIONFACTORY : {
+ connectionFactories.add(parseLocalTxConnectionFactrory(reader));
+ break;
+ }
+ case NOTXCONNECTIONFACTORY : {
+ connectionFactories.add(parseNoTxConnectionFactrory(reader));
+ break;
+ }
+ case XATXCONNECTIONFACTORY : {
+ connectionFactories.add(parseXaTxConnectionFactrory(reader));
+ break;
+ }
+ case TRANSACTIONSUPPORT : {
+ transactionSupport = TransactionSupportEnum.valueOf(elementAsString(reader));
+ break;
+ }
+ case ARCHIVE : {
+ archive = elementAsString(reader);
+ break;
+ }
+ default :
+ throw new ParserException("Unexpected element:" + reader.getLocalName());
+ }
+ break;
+ }
+ }
+ }
+ throw new ParserException("Reached end of xml document unexpectedly");
+ }
+
+ private XaTxConnectionFactory parseXaTxConnectionFactrory(XMLStreamReader reader) throws XMLStreamException,
+ ParserException
+ {
+ HashMap<String, String> configProperties = new HashMap<String, String>();
+ String connectionDefinition = null;
+ Integer minPoolSize = null;
+ Integer maxPoolSize = null;
+ String userName = null;
+ Security security = null;
+ TimeOut timeOut = null;
+ boolean prefill = false;
+ Validation validation = null;
+ String password = null;
+ boolean trackConnectionByTx = false;
+ boolean noTxSeparatePools = false;
+ Long xaResourceTimeout = null;
+
+ //attributes reading
+ boolean useJavaContext = false;
+ String className = null;
+ boolean enabled = true;
+ String jndiName = null;
+ String poolName = null;
+
+ for (XaTxConnectionFactory.Attribute attribute : XaTxConnectionFactory.Attribute.values())
+ {
+ switch (attribute)
+ {
+ case ENABLED : {
+ enabled = attributeAsBoolean(reader, attribute.getLocalName());
+ break;
+ }
+ case JNDINAME : {
+ jndiName = attributeAsString(reader, attribute.getLocalName());
+ break;
+ }
+ case CLASS_NAME : {
+ className = attributeAsString(reader, attribute.getLocalName());
+ break;
+ }
+ case POOL_NAME : {
+ poolName = attributeAsString(reader, attribute.getLocalName());
+ break;
+ }
+ case USEJAVACONTEXT : {
+ useJavaContext = attributeAsBoolean(reader, attribute.getLocalName());
+ break;
+ }
+ default :
+ break;
+ }
+ }
+
+ while (reader.hasNext())
+ {
+ switch (reader.nextTag())
+ {
+ case END_ELEMENT : {
+ if (ResourceAdapter.Tag.forName(reader.getLocalName()) == ResourceAdapter.Tag.XATXCONNECTIONFACTORY)
+ {
+
+ return new XaTxConnectionFactoryImpl(minPoolSize, maxPoolSize, prefill, userName, password,
+ connectionDefinition, configProperties, security, timeOut, validation, poolName, className,
+ jndiName, enabled, useJavaContext, noTxSeparatePools, trackConnectionByTx, xaResourceTimeout);
+ }
+ else
+ {
+ if (XaTxConnectionFactory.Tag.forName(reader.getLocalName()) == XaTxConnectionFactory.Tag.UNKNOWN)
+ {
+ throw new ParserException("unexpected end tag" + reader.getLocalName());
+ }
+ }
+ break;
+ }
+ case START_ELEMENT : {
+ switch (XaTxConnectionFactory.Tag.forName(reader.getLocalName()))
+ {
+ case CONFIGPROPERTY : {
+ configProperties.put(attributeAsString(reader, "name"), elementAsString(reader));
+ break;
+ }
+ case CONNECTIONDEFINITION : {
+ connectionDefinition = elementAsString(reader);
+ break;
+ }
+ case MAXPOOLSIZE : {
+ maxPoolSize = elementAsInteger(reader);
+ break;
+ }
+ case MINPOOLSIZE : {
+ minPoolSize = elementAsInteger(reader);
+ break;
+ }
+ case USERNAME : {
+ userName = elementAsString(reader);
+ break;
+ }
+ case PASSWORD : {
+ password = elementAsString(reader);
+ break;
+ }
+ case PREFILL : {
+ prefill = elementAsBoolean(reader);
+ break;
+ }
+ case SECURITY : {
+ security = parseSecurity(reader);
+ break;
+ }
+ case TIMEOUT : {
+ timeOut = parseTimeOut(reader);
+ break;
+ }
+ case VALIDATION : {
+ validation = parseValidation(reader);
+ break;
+ }
+ case NOTXSEPARATEPOOLS : {
+ noTxSeparatePools = elementAsBoolean(reader);
+ break;
+ }
+ case TRACKCONNECTIONBYTX : {
+ trackConnectionByTx = elementAsBoolean(reader);
+ break;
+ }
+ case XARESOURCETIMEOUT : {
+ xaResourceTimeout = elementAsLong(reader);
+ break;
+ }
+ default :
+ throw new ParserException("Unexpected element:" + reader.getLocalName());
+ }
+ break;
+ }
+ }
+ }
+ throw new ParserException("Reached end of xml document unexpectedly");
+ }
+
+ private LocalTxConnectionFactory parseLocalTxConnectionFactrory(XMLStreamReader reader) throws XMLStreamException,
+ ParserException
+ {
+ HashMap<String, String> configProperties = new HashMap<String, String>();
+ String connectionDefinition = null;
+ Integer minPoolSize = null;
+ Integer maxPoolSize = null;
+ String userName = null;
+ Security security = null;
+ TimeOut timeOut = null;
+ boolean prefill = false;
+ Validation validation = null;
+ String password = null;
+ boolean trackConnectionByTx = false;
+ boolean noTxSeparatePools = false;
+
+ //attributes reading
+ boolean useJavaContext = false;
+ String className = null;
+ boolean enabled = true;
+ String jndiName = null;
+ String poolName = null;
+
+ for (LocalTxConnectionFactory.Attribute attribute : LocalTxConnectionFactory.Attribute.values())
+ {
+ switch (attribute)
+ {
+ case ENABLED : {
+ enabled = attributeAsBoolean(reader, attribute.getLocalName());
+ break;
+ }
+ case JNDINAME : {
+ jndiName = attributeAsString(reader, attribute.getLocalName());
+ break;
+ }
+ case CLASS_NAME : {
+ className = attributeAsString(reader, attribute.getLocalName());
+ break;
+ }
+ case POOL_NAME : {
+ poolName = attributeAsString(reader, attribute.getLocalName());
+ break;
+ }
+ case USEJAVACONTEXT : {
+ useJavaContext = attributeAsBoolean(reader, attribute.getLocalName());
+ break;
+ }
+ default :
+ break;
+ }
+ }
+
+ while (reader.hasNext())
+ {
+ switch (reader.nextTag())
+ {
+ case END_ELEMENT : {
+ if (ResourceAdapter.Tag.forName(reader.getLocalName()) == ResourceAdapter.Tag.LOCALTXCONNECTIONFACTORY)
+ {
+
+ return new LocalTxConnectionFactoryImpl(minPoolSize, maxPoolSize, prefill, userName, password,
+ connectionDefinition, configProperties, security, timeOut, validation, poolName, className,
+ jndiName, enabled, useJavaContext, noTxSeparatePools, trackConnectionByTx);
+ }
+ else
+ {
+ if (LocalTxConnectionFactory.Tag.
+ forName(reader.getLocalName()) == LocalTxConnectionFactory.Tag.UNKNOWN)
+ {
+ throw new ParserException("unexpected end tag" + reader.getLocalName());
+ }
+ }
+ break;
+ }
+ case START_ELEMENT : {
+ switch (LocalTxConnectionFactory.Tag.forName(reader.getLocalName()))
+ {
+ case CONFIGPROPERTY : {
+ configProperties.put(attributeAsString(reader, "name"), elementAsString(reader));
+ break;
+ }
+ case CONNECTIONDEFINITION : {
+ connectionDefinition = elementAsString(reader);
+ break;
+ }
+ case MAXPOOLSIZE : {
+ maxPoolSize = elementAsInteger(reader);
+ break;
+ }
+ case MINPOOLSIZE : {
+ minPoolSize = elementAsInteger(reader);
+ break;
+ }
+ case USERNAME : {
+ userName = elementAsString(reader);
+ break;
+ }
+ case PASSWORD : {
+ password = elementAsString(reader);
+ break;
+ }
+ case PREFILL : {
+ prefill = elementAsBoolean(reader);
+ break;
+ }
+ case SECURITY : {
+ security = parseSecurity(reader);
+ break;
+ }
+ case TIMEOUT : {
+ timeOut = parseTimeOut(reader);
+ break;
+ }
+ case VALIDATION : {
+ validation = parseValidation(reader);
+ break;
+ }
+ case NOTXSEPARATEPOOLS : {
+ noTxSeparatePools = elementAsBoolean(reader);
+ break;
+ }
+ case TRACKCONNECTIONBYTX : {
+ trackConnectionByTx = elementAsBoolean(reader);
+ break;
+ }
+ default :
+ throw new ParserException("Unexpected element:" + reader.getLocalName());
+ }
+ break;
+ }
+ }
+ }
+ throw new ParserException("Reached end of xml document unexpectedly");
+ }
+
+ private NoTxConnectionFactory parseNoTxConnectionFactrory(XMLStreamReader reader) throws XMLStreamException,
+ ParserException
+ {
+ HashMap<String, String> configProperties = new HashMap<String, String>();
+ String connectionDefinition = null;
+ Integer minPoolSize = null;
+ Integer maxPoolSize = null;
+ String userName = null;
+ Security security = null;
+ TimeOut timeOut = null;
+ boolean prefill = false;
+ Validation validation = null;
+ String password = null;
+
+ //attributes reading
+ boolean useJavaContext = false;
+ String className = null;
+ boolean enabled = true;
+ String jndiName = null;
+ String poolName = null;
+
+ for (NoTxConnectionFactory.Attribute attribute : NoTxConnectionFactory.Attribute.values())
+ {
+ switch (attribute)
+ {
+ case ENABLED : {
+ enabled = attributeAsBoolean(reader, attribute.getLocalName());
+ break;
+ }
+ case JNDINAME : {
+ jndiName = attributeAsString(reader, attribute.getLocalName());
+ break;
+ }
+ case CLASS_NAME : {
+ className = attributeAsString(reader, attribute.getLocalName());
+ break;
+ }
+ case POOL_NAME : {
+ poolName = attributeAsString(reader, attribute.getLocalName());
+ break;
+ }
+ case USEJAVACONTEXT : {
+ useJavaContext = attributeAsBoolean(reader, attribute.getLocalName());
+ break;
+ }
+ default :
+ break;
+ }
+ }
+
+ while (reader.hasNext())
+ {
+ switch (reader.nextTag())
+ {
+ case END_ELEMENT : {
+ if (ResourceAdapter.Tag.forName(reader.getLocalName()) == ResourceAdapter.Tag.NOTXCONNECTIONFACTORY)
+ {
+
+ return new NoTxConnectionFactoryImpl(minPoolSize, maxPoolSize, prefill, userName, password,
+ connectionDefinition, configProperties, security, timeOut, validation, poolName, className,
+ jndiName, enabled, useJavaContext);
+ }
+ else
+ {
+ if (NoTxConnectionFactory.Tag.forName(reader.getLocalName()) == NoTxConnectionFactory.Tag.UNKNOWN)
+ {
+ throw new ParserException("unexpected end tag" + reader.getLocalName());
+ }
+ }
+ break;
+ }
+ case START_ELEMENT : {
+ switch (NoTxConnectionFactory.Tag.forName(reader.getLocalName()))
+ {
+ case CONFIGPROPERTY : {
+ configProperties.put(attributeAsString(reader, "name"), elementAsString(reader));
+ break;
+ }
+ case CONNECTIONDEFINITION : {
+ connectionDefinition = elementAsString(reader);
+ break;
+ }
+ case MAXPOOLSIZE : {
+ maxPoolSize = elementAsInteger(reader);
+ break;
+ }
+ case MINPOOLSIZE : {
+ minPoolSize = elementAsInteger(reader);
+ break;
+ }
+ case USERNAME : {
+ userName = elementAsString(reader);
+ break;
+ }
+ case PASSWORD : {
+ password = elementAsString(reader);
+ break;
+ }
+ case PREFILL : {
+ prefill = elementAsBoolean(reader);
+ break;
+ }
+ case SECURITY : {
+ security = parseSecurity(reader);
+ break;
+ }
+ case TIMEOUT : {
+ timeOut = parseTimeOut(reader);
+ break;
+ }
+ case VALIDATION : {
+ validation = parseValidation(reader);
+ break;
+ }
+ default :
+ throw new ParserException("Unexpected element:" + reader.getLocalName());
+ }
+ break;
+ }
+ }
+ }
+ throw new ParserException("Reached end of xml document unexpectedly");
+ }
+
+ private Validation parseValidation(XMLStreamReader reader) throws XMLStreamException, ParserException
+ {
+ Integer allocationRetry = null;
+ boolean useFastFail = false;
+ boolean backgroundValidation = false;
+
+ while (reader.hasNext())
+ {
+ switch (reader.nextTag())
+ {
+ case END_ELEMENT : {
+ if (NoTxConnectionFactory.Tag.forName(reader.getLocalName()) == NoTxConnectionFactory.Tag.VALIDATION)
+ {
+
+ return new ValidationImpl(allocationRetry, backgroundValidation, useFastFail);
+ }
+ else
+ {
+ if (Validation.Tag.forName(reader.getLocalName()) == Validation.Tag.UNKNOWN)
+ {
+ throw new ParserException("unexpected end tag" + reader.getLocalName());
+ }
+ }
+ break;
+ }
+ case START_ELEMENT : {
+ switch (Validation.Tag.forName(reader.getLocalName()))
+ {
+ case ALLOCATIONRETRY : {
+ allocationRetry = elementAsInteger(reader);
+ break;
+ }
+ case BACKGROUNDVALIDATION : {
+ backgroundValidation = elementAsBoolean(reader);
+ break;
+ }
+ case USEFASTFAIL : {
+ useFastFail = elementAsBoolean(reader);
+ break;
+ }
+ default :
+ throw new ParserException("Unexpected element:" + reader.getLocalName());
+ }
+ break;
+ }
+ }
+ }
+ throw new ParserException("Reached end of xml document unexpectedly");
+ }
+
+ private TimeOut parseTimeOut(XMLStreamReader reader) throws XMLStreamException, ParserException
+ {
+ Long blockingTimeoutMillis = null;
+ Long backgroundValidationMinutes = null;
+ Long allocationRetryWaitMillis = null;
+ Long idleTimeoutMinutes = null;
+
+ while (reader.hasNext())
+ {
+ switch (reader.nextTag())
+ {
+ case END_ELEMENT : {
+ if (NoTxConnectionFactory.Tag.forName(reader.getLocalName()) == NoTxConnectionFactory.Tag.TIMEOUT)
+ {
+
+ return new TimeOutImpl(blockingTimeoutMillis, idleTimeoutMinutes, allocationRetryWaitMillis,
+ backgroundValidationMinutes);
+ }
+ else
+ {
+ if (TimeOut.Tag.forName(reader.getLocalName()) == TimeOut.Tag.UNKNOWN)
+ {
+ throw new ParserException("unexpected end tag" + reader.getLocalName());
+ }
+ }
+ break;
+ }
+ case START_ELEMENT : {
+ switch (TimeOut.Tag.forName(reader.getLocalName()))
+ {
+ case ALLOCATIONRETRYWAITMILLIS : {
+ allocationRetryWaitMillis = elementAsLong(reader);
+ break;
+ }
+ case BACKGROUNDVALIDATIONMINUTES : {
+ backgroundValidationMinutes = elementAsLong(reader);
+ break;
+ }
+ case BLOCKINGTIMEOUTMILLIS : {
+ blockingTimeoutMillis = elementAsLong(reader);
+ break;
+ }
+ case IDLETIMEOUTMINUTES : {
+ idleTimeoutMinutes = elementAsLong(reader);
+ break;
+ }
+ default :
+ throw new ParserException("Unexpected element:" + reader.getLocalName());
+ }
+ break;
+ }
+ }
+ }
+ throw new ParserException("Reached end of xml document unexpectedly");
+ }
+
+ private Security parseSecurity(XMLStreamReader reader) throws XMLStreamException, ParserException
+ {
+ SecurityManager securityManager = null;
+ String securityDomain = null;
+ while (reader.hasNext())
+ {
+ switch (reader.nextTag())
+ {
+ case END_ELEMENT : {
+ if (NoTxConnectionFactory.Tag.forName(reader.getLocalName()) == NoTxConnectionFactory.Tag.SECURITY)
+ {
+
+ return new SecurityImpl(securityManager, securityDomain);
+ }
+ else
+ {
+ if (Security.Tag.forName(reader.getLocalName()) == Security.Tag.UNKNOWN)
+ {
+ throw new ParserException("unexpected end tag" + reader.getLocalName());
+ }
+ }
+ break;
+ }
+ case START_ELEMENT : {
+ switch (Security.Tag.forName(reader.getLocalName()))
+ {
+ case SECURITYDOMAIN : {
+ securityDomain = elementAsString(reader);
+ break;
+ }
+ case SECURITYMANAGER : {
+ securityManager = SecurityManager.valueOf(elementAsString(reader));
+ break;
+ }
+ default :
+ throw new ParserException("Unexpected element:" + reader.getLocalName());
+ }
+ break;
+ }
+ }
+ }
+ throw new ParserException("Reached end of xml document unexpectedly");
+ }
+
+ private AdminObject parseAdminObjects(XMLStreamReader reader) throws XMLStreamException, ParserException
+ {
+ HashMap<String, String> configProperties = new HashMap<String, String>();
+
+ //attributes reading
+ boolean useJavaContext = false;
+ String className = null;
+ boolean enabled = true;
+ String jndiName = null;
+
+ for (Attribute attribute : AdminObject.Attribute.values())
+ {
+ switch (attribute)
+ {
+ case ENABLED : {
+ enabled = attributeAsBoolean(reader, attribute.getLocalName());
+ break;
+ }
+ case JNDINAME : {
+ jndiName = attributeAsString(reader, attribute.getLocalName());
+ break;
+ }
+ case CLASS_NAME : {
+ className = attributeAsString(reader, attribute.getLocalName());
+ break;
+ }
+ case USEJAVACONTEXT : {
+ useJavaContext = attributeAsBoolean(reader, attribute.getLocalName());
+ break;
+ }
+ default :
+ break;
+ }
+ }
+
+ while (reader.hasNext())
+ {
+ switch (reader.nextTag())
+ {
+ case END_ELEMENT : {
+ if (ResourceAdapter.Tag.forName(reader.getLocalName()) == ResourceAdapter.Tag.ADMINOBJECT)
+ {
+
+ return new AdminObjectImpl(configProperties, className, jndiName, enabled, useJavaContext);
+ }
+ else
+ {
+ if (AdminObject.Tag.forName(reader.getLocalName()) == AdminObject.Tag.UNKNOWN)
+ {
+ throw new ParserException("unexpected end tag" + reader.getLocalName());
+ }
+ }
+ break;
+ }
+ case START_ELEMENT : {
+ switch (AdminObject.Tag.forName(reader.getLocalName()))
+ {
+ case CONFIG_PROPERTY : {
+ configProperties.put(attributeAsString(reader, "name"), elementAsString(reader));
+ break;
+ }
+ default :
+ throw new ParserException("Unexpected element:" + reader.getLocalName());
+ }
+ break;
+ }
+ }
+ }
+ throw new ParserException("Reached end of xml document unexpectedly");
+ }
+
+ /**
+ *
+ * A Tag.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+ public enum Tag
+ {
+ /** always first
+ *
+ */
+ UNKNOWN(null),
+
+ /** jboss-ra tag name
+ *
+ */
+ RESOURCE_ADPTER("resource-adapter");
+
+ private final String name;
+
+ /**
+ *
+ * Create a new Tag.
+ *
+ * @param name a name
+ */
+ Tag(final String name)
+ {
+ this.name = name;
+ }
+
+ /**
+ * Get the local name of this element.
+ *
+ * @return the local name
+ */
+ public String getLocalName()
+ {
+ return name;
+ }
+
+ private static final Map<String, Tag> MAP;
+
+ static
+ {
+ final Map<String, Tag> map = new HashMap<String, Tag>();
+ for (Tag element : values())
+ {
+ final String name = element.getLocalName();
+ if (name != null)
+ map.put(name, element);
+ }
+ MAP = map;
+ }
+
+ /**
+ *
+ * Static method to get enum instance given localName string
+ *
+ * @param localName a string used as localname (typically tag name as defined in xsd)
+ * @return the enum instance
+ */
+ public static Tag forName(String localName)
+ {
+ final Tag element = MAP.get(localName);
+ return element == null ? UNKNOWN : element;
+ }
+
+ }
+
+}
Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/SecurityImpl.java (from rev 107636, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/SecurityImpl.java)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/SecurityImpl.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/SecurityImpl.java 2010-08-17 11:10:42 UTC (rev 107642)
@@ -0,0 +1,117 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.resourceadapter;
+
+import org.jboss.jca.common.api.metadata.common.SecurityManager;
+import org.jboss.jca.common.api.metadata.resourceadapter.Security;
+
+/**
+ *
+ * A SecurityImpl.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public class SecurityImpl implements Security
+{
+
+ /** The serialVersionUID */
+ private static final long serialVersionUID = 1792878989502127046L;
+
+ private final SecurityManager securityManager;
+
+ private final String securityDomain;
+
+ /**
+ * Create a new SecurityImpl.
+ *
+ * @param securityManager securityManager
+ * @param securityDomain securityDomain
+ */
+ public SecurityImpl(SecurityManager securityManager, String securityDomain)
+ {
+ super();
+ this.securityManager = securityManager;
+ this.securityDomain = securityDomain;
+ }
+
+ /**
+ * Get the securityManager.
+ *
+ * @return the securityManager.
+ */
+ @Override
+ public final SecurityManager getSecurityManager()
+ {
+ return securityManager;
+ }
+
+ /**
+ * Get the securityDomain.
+ *
+ * @return the securityDomain.
+ */
+ @Override
+ public final String getSecurityDomain()
+ {
+ return securityDomain;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((securityDomain == null) ? 0 : securityDomain.hashCode());
+ result = prime * result + ((securityManager == null) ? 0 : securityManager.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof SecurityImpl))
+ return false;
+ SecurityImpl other = (SecurityImpl) obj;
+ if (securityDomain == null)
+ {
+ if (other.securityDomain != null)
+ return false;
+ }
+ else if (!securityDomain.equals(other.securityDomain))
+ return false;
+ if (securityManager != other.securityManager)
+ return false;
+ return true;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "SecurityImpl [securityManager=" + securityManager + ", securityDomain=" + securityDomain + "]";
+ }
+}
+
Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/TimeOutImpl.java (from rev 107636, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/TimeOutImpl.java)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/TimeOutImpl.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/TimeOutImpl.java 2010-08-17 11:10:42 UTC (rev 107642)
@@ -0,0 +1,170 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.resourceadapter;
+
+import org.jboss.jca.common.api.metadata.resourceadapter.TimeOut;
+
+/**
+ *
+ * A TimeOutImpl.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public class TimeOutImpl implements TimeOut
+{
+
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -4482517387845540925L;
+
+ private final Long blockingTimeoutMillis;
+
+ private final Long idleTimeoutMinutes;
+
+ private final Long allocationRetryWaitMillis;
+
+ private final Long backgroundValidationMinutes;
+
+ /**
+ * Create a new TimeOutImpl.
+ *
+ * @param blockingTimeoutMillis blockingTimeoutMillis
+ * @param idleTimeoutMinutes idleTimeoutMinutes
+ * @param allocationRetryWaitMillis allocationRetryWaitMillis
+ * @param backgroundValidationMinutes backgroundValidationMinutes
+ */
+ public TimeOutImpl(Long blockingTimeoutMillis, Long idleTimeoutMinutes, Long allocationRetryWaitMillis,
+ Long backgroundValidationMinutes)
+ {
+ super();
+ this.blockingTimeoutMillis = blockingTimeoutMillis;
+ this.idleTimeoutMinutes = idleTimeoutMinutes;
+ this.allocationRetryWaitMillis = allocationRetryWaitMillis;
+ this.backgroundValidationMinutes = backgroundValidationMinutes;
+ }
+
+ /**
+ * Get the blockingTimeoutMillis.
+ *
+ * @return the blockingTimeoutMillis.
+ */
+ @Override
+ public final Long getBlockingTimeoutMillis()
+ {
+ return blockingTimeoutMillis;
+ }
+
+ /**
+ * Get the idleTimeoutMinutes.
+ *
+ * @return the idleTimeoutMinutes.
+ */
+ @Override
+ public final Long getIdleTimeoutMinutes()
+ {
+ return idleTimeoutMinutes;
+ }
+
+ /**
+ * Get the allocationRetryWaitMillis.
+ *
+ * @return the allocationRetryWaitMillis.
+ */
+ @Override
+ public final Long getAllocationRetryWaitMillis()
+ {
+ return allocationRetryWaitMillis;
+ }
+
+ /**
+ * Get the backgroundValidationMinutes.
+ *
+ * @return the backgroundValidationMinutes.
+ */
+ @Override
+ public final Long getBackgroundValidationMinutes()
+ {
+ return backgroundValidationMinutes;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((allocationRetryWaitMillis == null) ? 0 : allocationRetryWaitMillis.hashCode());
+ result = prime * result + ((backgroundValidationMinutes == null) ? 0 : backgroundValidationMinutes.hashCode());
+ result = prime * result + ((blockingTimeoutMillis == null) ? 0 : blockingTimeoutMillis.hashCode());
+ result = prime * result + ((idleTimeoutMinutes == null) ? 0 : idleTimeoutMinutes.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof TimeOutImpl))
+ return false;
+ TimeOutImpl other = (TimeOutImpl) obj;
+ if (allocationRetryWaitMillis == null)
+ {
+ if (other.allocationRetryWaitMillis != null)
+ return false;
+ }
+ else if (!allocationRetryWaitMillis.equals(other.allocationRetryWaitMillis))
+ return false;
+ if (backgroundValidationMinutes == null)
+ {
+ if (other.backgroundValidationMinutes != null)
+ return false;
+ }
+ else if (!backgroundValidationMinutes.equals(other.backgroundValidationMinutes))
+ return false;
+ if (blockingTimeoutMillis == null)
+ {
+ if (other.blockingTimeoutMillis != null)
+ return false;
+ }
+ else if (!blockingTimeoutMillis.equals(other.blockingTimeoutMillis))
+ return false;
+ if (idleTimeoutMinutes == null)
+ {
+ if (other.idleTimeoutMinutes != null)
+ return false;
+ }
+ else if (!idleTimeoutMinutes.equals(other.idleTimeoutMinutes))
+ return false;
+ return true;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "TimeOutImpl [blockingTimeoutMillis=" + blockingTimeoutMillis + ", idleTimeoutMinutes="
+ + idleTimeoutMinutes + ", allocationRetryWaitMillis=" + allocationRetryWaitMillis
+ + ", backgroundValidationMinutes=" + backgroundValidationMinutes + "]";
+ }
+}
+
Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/ValidationImpl.java (from rev 107636, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/ValidationImpl.java)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/ValidationImpl.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/ValidationImpl.java 2010-08-17 11:10:42 UTC (rev 107642)
@@ -0,0 +1,135 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.resourceadapter;
+
+import org.jboss.jca.common.api.metadata.resourceadapter.Validation;
+
+/**
+ *
+ * A ValidationImpl.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public class ValidationImpl implements Validation
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = 2178081632626071094L;
+
+ private final Integer allocationRetry;
+
+ private final boolean backgroundValidation;
+
+ private final boolean useFastFail;
+
+ /**
+ * Create a new ValidationImpl.
+ *
+ * @param allocationRetry allocationRetry
+ * @param backgroundValidation backgroundValidation
+ * @param useFastFail useFastFail
+ */
+ public ValidationImpl(Integer allocationRetry, boolean backgroundValidation, boolean useFastFail)
+ {
+ super();
+ this.allocationRetry = allocationRetry;
+ this.backgroundValidation = backgroundValidation;
+ this.useFastFail = useFastFail;
+ }
+
+ /**
+ * Get the allocationRetry.
+ *
+ * @return the allocationRetry.
+ */
+ @Override
+ public final Integer getAllocationRetry()
+ {
+ return allocationRetry;
+ }
+
+ /**
+ * Get the backgroundValidation.
+ *
+ * @return the backgroundValidation.
+ */
+ @Override
+ public final boolean isBackgroundValidation()
+ {
+ return backgroundValidation;
+ }
+
+ /**
+ * Get the useFastFail.
+ *
+ * @return the useFastFail.
+ */
+ @Override
+ public final boolean isUseFastFail()
+ {
+ return useFastFail;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((allocationRetry == null) ? 0 : allocationRetry.hashCode());
+ result = prime * result + (backgroundValidation ? 1231 : 1237);
+ result = prime * result + (useFastFail ? 1231 : 1237);
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof ValidationImpl))
+ return false;
+ ValidationImpl other = (ValidationImpl) obj;
+ if (allocationRetry == null)
+ {
+ if (other.allocationRetry != null)
+ return false;
+ }
+ else if (!allocationRetry.equals(other.allocationRetry))
+ return false;
+ if (backgroundValidation != other.backgroundValidation)
+ return false;
+ if (useFastFail != other.useFastFail)
+ return false;
+ return true;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "ValidationImpl [allocationRetry=" + allocationRetry + ", backgroundValidation=" + backgroundValidation
+ + ", useFastFail=" + useFastFail + "]";
+ }
+
+}
+
Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/XaTxConnectionFactoryImpl.java (from rev 107636, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/XaTxConnectionFactoryImpl.java)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/XaTxConnectionFactoryImpl.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/XaTxConnectionFactoryImpl.java 2010-08-17 11:10:42 UTC (rev 107642)
@@ -0,0 +1,129 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.resourceadapter;
+
+import org.jboss.jca.common.api.metadata.resourceadapter.Security;
+import org.jboss.jca.common.api.metadata.resourceadapter.TimeOut;
+import org.jboss.jca.common.api.metadata.resourceadapter.Validation;
+import org.jboss.jca.common.api.metadata.resourceadapter.XaTxConnectionFactory;
+
+import java.util.Map;
+
+/**
+ *
+ * A XaTxConnectionFactoryImpl.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public class XaTxConnectionFactoryImpl extends LocalTxConnectionFactoryImpl implements XaTxConnectionFactory
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = 8211429129210108351L;
+
+ private final Long xaResourceTimeout;
+
+ /**
+ * Create a new XaTxConnectionFactoryImpl.
+ *
+ * @param minPoolSize minPoolSize
+ * @param maxPoolSize maxPoolSize
+ * @param prefill prefill
+ * @param userName userName
+ * @param password password
+ * @param connectionDefinition connectionDefinition
+ * @param configProperties configProperty
+ * @param security security
+ * @param timeOut timeOut
+ * @param validation validation
+ * @param poolName poolName
+ * @param className className
+ * @param jndiName jndiName
+ * @param enabled enabled
+ * @param useJavaContext useJavaContext
+ * @param noTxSeparatePools noTxSeparatePools
+ * @param trackConnectionByTx trackConnectionByTx
+ * @param xaResourceTimeout xaResourceTimeout
+ */
+ public XaTxConnectionFactoryImpl(Integer minPoolSize, Integer maxPoolSize, boolean prefill, String userName,
+ String password, String connectionDefinition, Map<String, String> configProperties, Security security,
+ TimeOut timeOut, Validation validation, String poolName, String className, String jndiName, boolean enabled,
+ boolean useJavaContext, boolean noTxSeparatePools, boolean trackConnectionByTx, Long xaResourceTimeout)
+ {
+ super(minPoolSize, maxPoolSize, prefill, userName, password, connectionDefinition, configProperties, security,
+ timeOut, validation, poolName, className, jndiName, enabled, useJavaContext, noTxSeparatePools,
+ trackConnectionByTx);
+ this.xaResourceTimeout = xaResourceTimeout;
+ }
+
+ /**
+ * Get the xaResourceTimeout.
+ *
+ * @return the xaResourceTimeout.
+ */
+ @Override
+ public final Long getXaResourceTimeout()
+ {
+ return xaResourceTimeout;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((xaResourceTimeout == null) ? 0 : xaResourceTimeout.hashCode());
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (!super.equals(obj))
+ return false;
+ if (!(obj instanceof XaTxConnectionFactoryImpl))
+ return false;
+ XaTxConnectionFactoryImpl other = (XaTxConnectionFactoryImpl) obj;
+ if (xaResourceTimeout == null)
+ {
+ if (other.xaResourceTimeout != null)
+ return false;
+ }
+ else if (!xaResourceTimeout.equals(other.xaResourceTimeout))
+ return false;
+ return true;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "XaTxConnectionFactoryImpl [xaResourceTimeout=" + xaResourceTimeout + ", minPoolSize=" + minPoolSize
+ + ", maxPoolSize=" + maxPoolSize + ", prefill=" + prefill + ", userName=" + userName + ", password="
+ + password + ", connectionDefinition=" + connectionDefinition + ", configProperties=" + configProperties
+ + ", security=" + security + ", timeOut=" + timeOut + ", validation=" + validation + ", poolName="
+ + poolName + ", className=" + className + ", jndiName=" + jndiName + ", enabled=" + enabled
+ + ", useJavaContext=" + useJavaContext + "]";
+ }
+}
+
Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/package.html (from rev 107636, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadpater/package.html)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/package.html (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/resourceadapter/package.html 2010-08-17 11:10:42 UTC (rev 107642)
@@ -0,0 +1,3 @@
+<body>
+This package contains metadatas implementation for resource_adapter_1.0.xsd
+</body>
Modified: projects/jboss-jca/trunk/common/src/main/resources/schema/resource-adapter_1_0.xsd
===================================================================
--- projects/jboss-jca/trunk/common/src/main/resources/schema/resource-adapter_1_0.xsd 2010-08-17 10:12:34 UTC (rev 107641)
+++ projects/jboss-jca/trunk/common/src/main/resources/schema/resource-adapter_1_0.xsd 2010-08-17 11:10:42 UTC (rev 107642)
@@ -4,7 +4,7 @@
<xs:complexContent>
<xs:extension base="no-tx-connection-factoryType">
<xs:sequence>
- <xs:element name="no-tx-separate-pools" type="boolean-presenceType">
+ <xs:element name="no-tx-separate-pools" type="boolean-presenceType" maxOccurs="1" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[[
@@ -14,7 +14,7 @@
</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="track-connection-by-tx" type="boolean-presenceType"></xs:element>
+ <xs:element name="track-connection-by-tx" type="boolean-presenceType" maxOccurs="1" minOccurs="0"></xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
@@ -102,8 +102,6 @@
<xs:complexType name="config-propertyType" mixed="true">
<xs:attribute use="required" name="name" type="xs:token">
</xs:attribute>
- <xs:attribute use="required" name="value" type="xs:token">
- </xs:attribute>
</xs:complexType>
<xs:complexType name="securityType">
<xs:sequence>
@@ -188,7 +186,17 @@
<xs:complexContent>
<xs:extension base="local-tx-connection-factoryType">
<xs:sequence>
- <xs:element name="xa-resource-timeout" type="xs:token" minOccurs="0" maxOccurs="1"></xs:element>
+ <xs:element name="xa-resource-timeout" type="xs:nonNegativeInteger" minOccurs="0" maxOccurs="1">
+ <xs:annotation>
+ <xs:documentation><![CDATA[[
+ EXPRESSED IN SECONDS
+ Passed to XAResource.setTransactionTimeout()
+ Default is zero which does not invoke the setter
+ e.g. 5 minutes
+ <xa-resource-timeout>300</xa-resource-timeout>]]>
+ </xs:documentation>
+ </xs:annotation>
+ </xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
@@ -204,7 +212,6 @@
<xs:enumeration value="XATransaction" />
</xs:restriction>
</xs:simpleType>
-
<xs:attributeGroup name="common-attribute">
<xs:attribute name="class-name" type="xs:token" use="required"></xs:attribute>
<xs:attribute name="jndi-name" type="xs:token" use="required" />
@@ -221,16 +228,15 @@
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
-
<xs:complexType name="admin-objectType">
<xs:sequence>
<xs:element name="config-property" type="config-propertyType" minOccurs="0" maxOccurs="unbounded"></xs:element>
</xs:sequence>
<xs:attributeGroup ref="common-attribute"></xs:attributeGroup>
</xs:complexType>
-
<xs:complexType name="time-outType">
- <xs:sequence><xs:element name="blocking-timeout-millis" type="xs:nonNegativeInteger" minOccurs="0">
+ <xs:sequence>
+ <xs:element name="blocking-timeout-millis" type="xs:nonNegativeInteger" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[[
@@ -243,7 +249,7 @@
</xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element name="idle-timeout-minutes" type="xs:nonNegativeInteger" minOccurs="0">
+ <xs:element name="idle-timeout-minutes" type="xs:nonNegativeInteger" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[[
@@ -254,7 +260,8 @@
]]>
</xs:documentation>
</xs:annotation>
- </xs:element><xs:element name="allocation-retry-wait-millis" type="xs:nonNegativeInteger" minOccurs="0" maxOccurs="1" >
+ </xs:element>
+ <xs:element name="allocation-retry-wait-millis" type="xs:nonNegativeInteger" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
<![CDATA[[
@@ -264,7 +271,8 @@
]]>
</xs:documentation>
</xs:annotation>
- </xs:element><xs:element name="background-validation-minutes" type="xs:nonNegativeInteger" minOccurs="0">
+ </xs:element>
+ <xs:element name="background-validation-minutes" type="xs:nonNegativeInteger" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[[
@@ -273,11 +281,12 @@
]]>
</xs:documentation>
</xs:annotation>
- </xs:element></xs:sequence>
+ </xs:element>
+ </xs:sequence>
</xs:complexType>
-
<xs:complexType name="validationType">
- <xs:sequence><xs:element name="allocation-retry" type="xs:nonNegativeInteger" minOccurs="0" maxOccurs="1" >
+ <xs:sequence>
+ <xs:element name="allocation-retry" type="xs:nonNegativeInteger" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>
<![CDATA[[
@@ -287,7 +296,8 @@
]]>
</xs:documentation>
</xs:annotation>
- </xs:element><xs:element name="background-validation" type="xs:boolean" minOccurs="0">
+ </xs:element>
+ <xs:element name="background-validation" type="xs:boolean" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[[
@@ -296,7 +306,8 @@
]]>
</xs:documentation>
</xs:annotation>
- </xs:element><xs:element name="use-fast-fail" type="xs:boolean" minOccurs="0">
+ </xs:element>
+ <xs:element name="use-fast-fail" type="xs:boolean" minOccurs="0">
<xs:annotation>
<xs:documentation>
<![CDATA[[
@@ -306,6 +317,7 @@
]]>
</xs:documentation>
</xs:annotation>
- </xs:element></xs:sequence>
+ </xs:element>
+ </xs:sequence>
</xs:complexType>
</xs:schema>
\ No newline at end of file
Added: projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/resourceadapter/ResourceAdapterParserTestCase.java
===================================================================
--- projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/resourceadapter/ResourceAdapterParserTestCase.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/resourceadapter/ResourceAdapterParserTestCase.java 2010-08-17 11:10:42 UTC (rev 107642)
@@ -0,0 +1,77 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.resourceadapter;
+
+import org.jboss.jca.common.api.metadata.resourceadapter.ResourceAdapter;
+
+import java.io.File;
+import java.io.FileInputStream;
+
+import org.jboss.util.file.FileSuffixFilter;
+
+import org.junit.Test;
+
+import static org.hamcrest.core.Is.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ *
+ * A ResourceAdapterParserTestCase.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+public class ResourceAdapterParserTestCase
+{
+ /**
+ * shouldParseAnyExample
+ * @throws Exception in case of error
+ */
+ @Test
+ public void shouldParseAnyExample() throws Exception
+ {
+ FileInputStream is = null;
+
+ //given
+ File directory = new File(Thread.currentThread().getContextClassLoader().getResource("resource-adapter").toURI());
+ for (File xmlFile : directory.listFiles(new FileSuffixFilter("-ds.xml")))
+ {
+ System.out.println(xmlFile.getName());
+ try
+ {
+ is = new FileInputStream(xmlFile);
+ ResourceAdapterParser parser = new ResourceAdapterParser();
+ //when
+ ResourceAdapter ra = parser.parse(is);
+ //then
+ assertThat(ra.getConnectionFactories().size() >= 1, is(true));
+
+ }
+ finally
+ {
+ if (is != null)
+ is.close();
+ }
+ }
+ }
+
+}
Added: projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/resourceadapter/package.html
===================================================================
--- projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/resourceadapter/package.html (rev 0)
+++ projects/jboss-jca/trunk/common/src/test/java/org/jboss/jca/common/metadata/resourceadapter/package.html 2010-08-17 11:10:42 UTC (rev 107642)
@@ -0,0 +1,3 @@
+<body>
+This package contains Ds parser tet cases
+</body>
Added: projects/jboss-jca/trunk/common/src/test/resources/resource-adapter/asapxcess-jb3.2-ds.xml
===================================================================
--- projects/jboss-jca/trunk/common/src/test/resources/resource-adapter/asapxcess-jb3.2-ds.xml (rev 0)
+++ projects/jboss-jca/trunk/common/src/test/resources/resource-adapter/asapxcess-jb3.2-ds.xml 2010-08-17 11:10:42 UTC (rev 107642)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- configuration for aSAPXcess SAP adapter for jboss 3.2 -->
+<!-- ==================================================================== -->
+<!-- aSAPXcess adapter configuration for SAP R3 -->
+<!-- Contact: aif_support at asapsolutions.com -->
+<!-- -->
+<!-- ==================================================================== -->
+<resource-adapter xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../main/resources/schema/resource-adapter_1_0.xsd">
+ <archive>token</archive>
+ <transaction-support>NoTransaction</transaction-support>
+ <local-tx-connection-factory class-name="token" enabled="true" jndi-name="aSAPXcess"
+ pool-name="aSAPXcess">
+ <min-pool-size>0</min-pool-size>
+ <max-pool-size>64</max-pool-size>
+ <config-property name="LogConfigFile" >ASAP_SAP_1_0.xml</config-property>
+ <config-property name="RootLogContext" >ASAP_SAP_1_0</config-property>
+ <config-property name="LogLevel" >WARN</config-property>
+ <config-property name="MessageBundleBase" >ASAP_SAP_1_0</config-property>
+ <config-property name="LanguageCode" >en</config-property>
+ <config-property name="CountryCode" >US</config-property>
+ <config-property name="UserName" ></config-property>
+ <config-property name="Password" ></config-property>
+ <config-property name="ClientNumber" ></config-property>
+ <config-property name="ServerName" ></config-property>
+ <config-property name="SystemNumber" ></config-property>
+ <config-property name="GatewayServerName" ></config-property>
+ <config-property name="GatewayServiceNumber" ></config-property>
+ <config-property name="SystemName" ></config-property>
+ <config-property name="MessageServerName" ></config-property>
+ <config-property name="GroupName" ></config-property>
+ <config-property name="ConnectionURL" ></config-property>
+ <security>
+ <security-manager>APPLICATION</security-manager>
+ <!-- If you supply the usr/pw from a JAAS login module -->
+ <security-domain>MySecurityDomain</security-domain>
+ </security>
+ <time-out>
+ <blocking-timeout-millis>5000</blocking-timeout-millis>
+ <idle-timeout-minutes>15</idle-timeout-minutes>
+ </time-out>
+ </local-tx-connection-factory>
+ <admin-object class-name="token" enabled="true" jndi-name="token" use-java-context="false">
+ <config-property name="token" />
+ </admin-object>
+</resource-adapter>
More information about the jboss-cvs-commits
mailing list