[jboss-cvs] JBossAS SVN: r79336 - in projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss: mcf and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Oct 10 03:24:56 EDT 2008


Author: jeff.zhang
Date: 2008-10-10 03:24:55 -0400 (Fri, 10 Oct 2008)
New Revision: 79336

Added:
   projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/
   projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ApplicationManagedSecurityMetaData.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ConnectionPoolMetaData.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/DBMSMetaData.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/DataSourceConnectionPropertyMetaData.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/DataSourceDeploymentMetaData.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/JDBCProviderSupport.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/LocalDataSourceDeploymentMetaData.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionEmptyContentAdapter.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionFactoryDeploymentGroup.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionFactoryDeploymentMetaData.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionFactoryPropertyMetaData.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionFactoryTransactionSupportMetaData.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/NoTxConnectionFactoryDeploymentMetaData.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/NoTxDataSourceDeploymentMetaData.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/NonXADataSourceDeploymentMetaData.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/SecurityDeploymentType.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/SecurityDomainApplicationManagedMetaData.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/SecurityDomainMetaData.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/SecurityMetaData.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/SecurityMetaDataSupport.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/TxConnectionFactoryDeploymentMetaData.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/XAConnectionPropertyMetaData.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/XADataSourceDeploymentMetaData.java
Log:
[JBMETA-114] move ds.xml metadata code, remove management annotation and some TypeAdapter to avoiding package depends

Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ApplicationManagedSecurityMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ApplicationManagedSecurityMetaData.java	                        (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ApplicationManagedSecurityMetaData.java	2008-10-10 07:24:55 UTC (rev 79336)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss.mcf;
+
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * A ApplicationManagedSecurityMetaData.
+ * 
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+ at XmlType(name="application-managed-security")
+public class ApplicationManagedSecurityMetaData extends SecurityMetaData
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 7685268791262205126L;
+   
+   public ApplicationManagedSecurityMetaData()
+   {
+      type = SecurityDeploymentType.APPLICATION;
+      
+   }
+}

Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ConnectionPoolMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ConnectionPoolMetaData.java	                        (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ConnectionPoolMetaData.java	2008-10-10 07:24:55 UTC (rev 79336)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss.mcf;
+
+/**
+ * A PoolMetaData.
+ * 
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public interface ConnectionPoolMetaData
+{
+   public int getMinSize();
+   public void setMinSize(int minSize);
+   
+   public int getMaxSize();
+   public void setMaxSize(int maxSize);
+   
+   public long getBlockingTimeoutMilliSeconds();
+   public void setBlockingTimeoutMilliSeconds(long blockTimeout);
+   
+   public int getIdleTimeoutMinutes();
+   public void setIdleTimeoutMinutes(int idleTimeout);
+   
+   public void setPrefill(Boolean prefill);
+   public Boolean getPrefill();
+   
+   public void setBackgroundValidationMillis(long interval);
+   public long getBackgroundValidationMillis();
+   
+   public void setValidateOnMatch(boolean validateOnMatch);
+   public boolean isValidateOnMatch();
+   
+   public void setNoTxSeparatePools(Boolean notxpool);
+   public Boolean getNoTxSeparatePools();      
+}

Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/DBMSMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/DBMSMetaData.java	                        (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/DBMSMetaData.java	2008-10-10 07:24:55 UTC (rev 79336)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss.mcf;
+
+import java.io.Serializable;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * A DBMSMetaData.
+ * 
+ * @author <a href="weston.price at jboss.org">Weston M. Price</a>
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name="metadata")
+public class DBMSMetaData implements Serializable
+{
+   private static final long serialVersionUID = -5511233258559770711L;
+   
+   @XmlElement(name="type-mapping")
+   private String typeMapping;
+
+   public String getTypeMapping()
+   {
+      return typeMapping;
+   }
+
+   public void setTypeMapping(String typeMapping)
+   {
+      this.typeMapping = typeMapping;
+   }
+
+}

Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/DataSourceConnectionPropertyMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/DataSourceConnectionPropertyMetaData.java	                        (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/DataSourceConnectionPropertyMetaData.java	2008-10-10 07:24:55 UTC (rev 79336)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss.mcf;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlValue;
+
+/**
+ * A DataSourceConnectionPropertyMetaData.
+ * 
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @author Jeff Zhang
+ * @version $Revision: 1.1 $
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+public class DataSourceConnectionPropertyMetaData
+   implements java.io.Serializable
+{
+   private static final long serialVersionUID = 1444129514410015366L;
+   
+   @XmlAttribute(name="name")
+   protected String name;
+   
+   @XmlValue
+   protected String value;
+
+   public String getName()
+   {
+      return name;
+   }
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+   
+   public String getValue()
+   {
+      return value;
+   }
+   public void setValue(String value)
+   {
+      this.value = value;
+   }
+   
+   public String toString()
+   {
+      return "[" + name + "=" + value + "]";
+   }
+}

Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/DataSourceDeploymentMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/DataSourceDeploymentMetaData.java	                        (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/DataSourceDeploymentMetaData.java	2008-10-10 07:24:55 UTC (rev 79336)
@@ -0,0 +1,401 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss.mcf;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+
+//import org.jboss.resource.deployers.management.ConnectionFactoryProperty;
+
+/**
+ * A DataSourceDeploymentMetaData.
+ * 
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public class DataSourceDeploymentMetaData extends ManagedConnectionFactoryDeploymentMetaData implements JDBCProviderSupport
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1440129014410015366L;
+   
+   private static final String CONNECTION_DEFINITION = "javax.sql.DataSource";
+   
+   private static final String RAR_NAME = "jboss-local-jdbc.rar";
+
+   @XmlElement(name="transaction-isolation")
+   private String transactionIsolation;
+   
+   @XmlElement(name="user-name")
+   private String userName;
+   
+   @XmlElement(name="password")
+   private String passWord;
+   
+   @XmlElement(name="new-connection-sql")
+   private String newConnectionSQL;
+   
+   @XmlElement(name="check-valid-connection-sql")
+   private String checkValidConnectionSQL;
+   
+   @XmlElement(name="valid-connection-checker-class-name")
+   private String validConnectionCheckerClassName;
+   
+   @XmlElement(name="exception-sorter-class-name")
+   private String exceptionSorterClassName;
+   
+   @XmlElement(name="stale-connection-checker-class-name")
+   private String staleConnectionCheckerClassName;
+   
+   @XmlElement(name="track-statements")
+   private String trackStatements;
+   
+   @XmlElement(name="prepared-statement-cache-size")
+   private int preparedStatementCacheSize = 0;
+   
+   @XmlElement(name="share-prepared-statements")
+   private boolean sharePreparedStatements;
+   
+   @XmlElement(name="set-tx-query-timeout")
+   private boolean useQueryTimeout;
+   
+   @XmlElement(name="query-timeout")
+   private int queryTimeout;
+   
+   @XmlElement(name="use-try-lock")
+   private long useTryLock;
+   
+   @XmlElement(name="url-delimiter")
+   private String urlDelimiter;
+   
+   @XmlElement(name="url-selector-strategy-class-name")
+   private String urlSelectorStrategyClassName;
+   
+   public DataSourceDeploymentMetaData()
+   {
+      setConnectionDefinition(CONNECTION_DEFINITION);
+      setRarName(RAR_NAME);
+      
+   }
+
+   public String getTransactionIsolation()
+   {
+      return transactionIsolation;
+   }
+
+   public void setTransactionIsolation(String transactionIsolation)
+   {
+      this.transactionIsolation = transactionIsolation;
+   }
+
+   public String getPassWord()
+   {
+      return passWord;
+   }
+
+   public void setPassWord(String passWord)
+   {
+      this.passWord = passWord;
+   }
+
+   public String getUserName()
+   {
+      return userName;
+   }
+
+   public void setUserName(String userName)
+   {
+      this.userName = userName;
+   }
+   
+      
+   public String getCheckValidConnectionSQL()
+   {
+      return checkValidConnectionSQL;
+   }
+
+   public void setCheckValidConnectionSQL(String checkValidConnectionSQL)
+   {
+      this.checkValidConnectionSQL = checkValidConnectionSQL;
+   }
+
+   public String getExceptionSorterClassName()
+   {
+      return exceptionSorterClassName;
+   }
+
+   public void setExceptionSorterClassName(String exceptionSorterClassName)
+   {
+      this.exceptionSorterClassName = exceptionSorterClassName;
+   }
+
+   public String getNewConnectionSQL()
+   {
+      return newConnectionSQL;
+   }
+
+   public void setNewConnectionSQL(String newConnectionSQL)
+   {
+      this.newConnectionSQL = newConnectionSQL;
+   }
+
+   public String getValidConnectionCheckerClassName()
+   {
+      return validConnectionCheckerClassName;
+   }
+
+   public void setValidConnectionCheckerClassName(String validConnectionCheckerClassName)
+   {
+      this.validConnectionCheckerClassName = validConnectionCheckerClassName;
+   }
+
+   public String getStaleConnectionCheckerClassName()
+   {
+      return staleConnectionCheckerClassName;
+   }
+
+   public void setStaleConnectionCheckerClassName(String staleConnectionCheckerClassName)
+   {
+      this.staleConnectionCheckerClassName = staleConnectionCheckerClassName;
+   }
+
+   public String getURLDelimiter()
+   {
+      return urlDelimiter;
+   }
+
+   public void setURLDelimiter(String urlDelimiter)
+   {
+      this.urlDelimiter = urlDelimiter;
+   }
+
+   public String getURLSelectorStrategyClassName()
+   {
+      return urlSelectorStrategyClassName;
+   }
+
+   public void setURLSelectorStrategyClassName(String urlSelectorStrategyClassName)
+   {
+      this.urlSelectorStrategyClassName = urlSelectorStrategyClassName;
+   }
+      
+   public int getPreparedStatementCacheSize()
+   {
+      return preparedStatementCacheSize;
+   }
+
+   public void setPreparedStatementCacheSize(int preparedStatementCacheSize)
+   {
+      this.preparedStatementCacheSize = preparedStatementCacheSize;
+   }
+
+   public int getQueryTimeout()
+   {
+      return queryTimeout;
+   }
+
+   public void setQueryTimeout(int queryTimeout)
+   {
+      this.queryTimeout = queryTimeout;
+   }
+
+   public long getUseTryLock()
+   {
+      return useTryLock;
+   }
+
+   public void setUseTryLock(long useTryLock)
+   {
+      this.useTryLock = useTryLock;
+   }
+
+   public boolean isSharePreparedStatements()
+   {
+      return sharePreparedStatements;
+   }
+
+   public void setSharePreparedStatements(boolean sharePreparedStatements)
+   {
+      this.sharePreparedStatements = sharePreparedStatements;
+   }
+
+   public String getTrackStatements()
+   {
+      return trackStatements;
+   }
+
+   public void setTrackStatements(String trackStatements)
+   {
+      this.trackStatements = trackStatements;
+   }
+
+   public boolean isUseQueryTimeout()
+   {
+      return useQueryTimeout;
+   }
+
+   public void setUseQueryTimeout(boolean useQueryTimeout)
+   {
+      this.useQueryTimeout = useQueryTimeout;
+   }
+
+   @Override
+   public List<ManagedConnectionFactoryPropertyMetaData> getManagedConnectionFactoryProperties()
+   {
+      List<ManagedConnectionFactoryPropertyMetaData> properties = new ArrayList<ManagedConnectionFactoryPropertyMetaData>();
+      ManagedConnectionFactoryPropertyMetaData property = null;
+            
+      if(getUserName() != null)
+      {
+         property = new ManagedConnectionFactoryPropertyMetaData();
+         property.setName("UserName");
+         property.setValue(getUserName());
+         properties.add(property);
+      }
+      
+      if(getPassWord() != null)
+      {
+         property = new ManagedConnectionFactoryPropertyMetaData();
+         property.setName("Password");
+         property.setValue(getPassWord());
+         properties.add(property);
+         
+      }
+      
+      if(getTransactionIsolation() != null)
+      {
+         property = new ManagedConnectionFactoryPropertyMetaData();
+         property.setName("TransactionIsolation");
+         property.setValue(getTransactionIsolation());
+         properties.add(property);
+         
+      }
+      
+      if(getNewConnectionSQL() != null)
+      {
+         property = new ManagedConnectionFactoryPropertyMetaData();
+         property.setName("NewConnectionSQL");
+         property.setValue(getNewConnectionSQL());         
+         properties.add(property);
+
+      }
+      
+      if(getCheckValidConnectionSQL() != null)
+      {
+         property = new ManagedConnectionFactoryPropertyMetaData();
+         property.setName("CheckValidConnectionSQL");
+         property.setValue(getCheckValidConnectionSQL());                  
+         properties.add(property);
+
+      }
+      
+      if(getValidConnectionCheckerClassName() != null)
+      {
+         property = new ManagedConnectionFactoryPropertyMetaData();
+         property.setName("ValidConnectionCheckerClassName");
+         property.setValue(getValidConnectionCheckerClassName());                           
+         properties.add(property);
+
+      }
+      
+      if(getExceptionSorterClassName() != null)
+      {
+         property = new ManagedConnectionFactoryPropertyMetaData();
+         property.setName("ExceptionSorterClassName");
+         property.setValue(getExceptionSorterClassName());                           
+         properties.add(property);         
+      }
+      
+      if(getStaleConnectionCheckerClassName() != null)
+      {
+         property = new ManagedConnectionFactoryPropertyMetaData();
+         property.setName("StaleConnectionCheckerClassName");
+         property.setValue(getStaleConnectionCheckerClassName());                           
+         properties.add(property);         
+      }
+      
+      if(getURLSelectorStrategyClassName() != null)
+      {
+         property = new ManagedConnectionFactoryPropertyMetaData();
+         property.setName("URLSelectorStrategyClassName");
+         property.setValue(getURLSelectorStrategyClassName());                           
+         properties.add(property);         
+      }
+      
+      if(getURLDelimiter() != null)
+      {
+         property = new ManagedConnectionFactoryPropertyMetaData();
+         property.setName("URLDelimiter");
+         property.setValue(getURLDelimiter());                           
+         properties.add(property);         
+      }
+      
+      property = new ManagedConnectionFactoryPropertyMetaData();
+      property.setName("PreparedStatementCacheSize");
+      property.setType("int");
+      property.setValue(String.valueOf(getPreparedStatementCacheSize()));
+      properties.add(property);
+      
+      property = new ManagedConnectionFactoryPropertyMetaData();
+      property.setName("SharePreparedStatements");
+      property.setType("boolean");
+      property.setValue(String.valueOf(isSharePreparedStatements()));
+      properties.add(property);
+      
+      property = new ManagedConnectionFactoryPropertyMetaData();
+      property.setName("QueryTimeout");
+      property.setType("int");
+      property.setValue(String.valueOf(getQueryTimeout()));
+      properties.add(property);
+      
+      property = new ManagedConnectionFactoryPropertyMetaData();
+      property.setName("UseTryLock");
+      property.setType("long");
+      property.setValue(String.valueOf(getUseTryLock()));
+      properties.add(property);
+      
+      property = new ManagedConnectionFactoryPropertyMetaData();
+      property.setName("TransactionQueryTimeout");
+      property.setType("boolean");
+      property.setValue(String.valueOf(isUseQueryTimeout()));
+      properties.add(property);
+      
+      property = new ManagedConnectionFactoryPropertyMetaData();
+      property.setName("ValidateOnMatch");
+      property.setType("boolean");
+      property.setValue(String.valueOf(isValidateOnMatch()));
+      properties.add(property);
+      
+      if (getTrackStatements() != null)
+      {
+         property = new ManagedConnectionFactoryPropertyMetaData();
+         property.setName("TrackStatements");
+         property.setType("java.lang.String");
+         property.setValue(String.valueOf(getTrackStatements()));
+         properties.add(property);
+      }
+      
+      return properties;
+   }
+}

Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/JDBCProviderSupport.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/JDBCProviderSupport.java	                        (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/JDBCProviderSupport.java	2008-10-10 07:24:55 UTC (rev 79336)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss.mcf;
+
+/**
+ * A JDBCProviderSupport.
+ * 
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public interface JDBCProviderSupport
+{
+   public String getNewConnectionSQL();
+   public void setNewConnectionSQL(String newConnectionSQL);
+   
+   public String getCheckValidConnectionSQL();
+   public void setCheckValidConnectionSQL(String checkValidConnectionSQL);
+   
+   public String getValidConnectionCheckerClassName();   
+   public void setValidConnectionCheckerClassName(String validConnectionCheckerClassName);
+   
+   public String getExceptionSorterClassName();
+   public void setExceptionSorterClassName(String exceptionSorterClassName);
+   
+   public void setTrackStatements(String trackStatements);
+   public String getTrackStatements();
+   
+   public void setPreparedStatementCacheSize(int cacheSize);
+   public int getPreparedStatementCacheSize();
+   
+   public void setSharePreparedStatements(boolean sharePreparedStatements);
+   public boolean isSharePreparedStatements();
+   
+   public void setUseQueryTimeout(boolean useQueryTimeout);
+   public boolean isUseQueryTimeout();
+   
+   
+}

Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/LocalDataSourceDeploymentMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/LocalDataSourceDeploymentMetaData.java	                        (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/LocalDataSourceDeploymentMetaData.java	2008-10-10 07:24:55 UTC (rev 79336)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss.mcf;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * A LocalDataSourceDeploymentMetaData.
+ * 
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @author Jeff Zhang
+ * @version $Revision: 1.1 $
+ */
+ at XmlType(name="local-tx-datasource")
+ at XmlAccessorType(XmlAccessType.FIELD)
+public class LocalDataSourceDeploymentMetaData extends NonXADataSourceDeploymentMetaData
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -1513179292986405426L;
+
+   public LocalDataSourceDeploymentMetaData()
+   {
+      setLocalTransactions(true);
+      setTransactionSupportMetaData(ManagedConnectionFactoryTransactionSupportMetaData.LOCAL);
+   }
+
+   @Override
+   public Boolean getLocalTransactions()
+   {
+      return Boolean.TRUE;
+   }
+}

Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionEmptyContentAdapter.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionEmptyContentAdapter.java	                        (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionEmptyContentAdapter.java	2008-10-10 07:24:55 UTC (rev 79336)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss.mcf;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+
+/**
+ * A ManagedConnectionEmptyContentAdapter.
+ * 
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @author <a href="alex at jboss.com">Alexey Loubyansky</a>
+ * @version $Revision: 1.1 $
+ */
+public class ManagedConnectionEmptyContentAdapter extends XmlAdapter<ManagedConnectionEmptyContentAdapter.EmptyElement, Boolean>
+{
+   @XmlType(factoryMethod="instance")
+   public static class EmptyElement
+   {
+      public static EmptyElement INSTANCE = new EmptyElement();
+      
+      public static EmptyElement instance()
+      {
+         return INSTANCE;
+      }
+
+      private EmptyElement(){}      
+   }
+
+   @Override
+   public EmptyElement marshal(Boolean v) throws Exception
+   {
+      return Boolean.TRUE.equals(v) ? EmptyElement.INSTANCE : null;
+   }
+
+   @Override
+   public Boolean unmarshal(EmptyElement v) throws Exception
+   {
+      return v == null ? Boolean.FALSE : Boolean.TRUE;
+   }
+}

Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionFactoryDeploymentGroup.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionFactoryDeploymentGroup.java	                        (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionFactoryDeploymentGroup.java	2008-10-10 07:24:55 UTC (rev 79336)
@@ -0,0 +1,112 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss.mcf;
+
+import java.io.Serializable;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElements;
+
+/**
+ * A ManagedConnectionFactoryDeploymentGroup.
+ * 
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @author Scott.Stark at jboss.org
+ * @author Jeff Zhang
+ * @version $Revision: 1.1 $
+ */
+ at XmlAccessorType(XmlAccessType.NONE)
+public class ManagedConnectionFactoryDeploymentGroup implements Serializable
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -7650097438654698297L;
+
+   /** The fileUrl */
+   private URL fileUrl;
+      
+   /** The deployments   */
+
+   @XmlElements({@XmlElement(name="local-tx-datasource", type=LocalDataSourceDeploymentMetaData.class),
+                 @XmlElement(name="no-tx-datasource", type=NoTxDataSourceDeploymentMetaData.class),
+                 @XmlElement(name="xa-datasource", type=XADataSourceDeploymentMetaData.class),
+                 @XmlElement(name="no-tx-connection-factory", type=NoTxConnectionFactoryDeploymentMetaData.class),
+                 @XmlElement(name="tx-connection-factory",type=TxConnectionFactoryDeploymentMetaData.class)})
+   private List<ManagedConnectionFactoryDeploymentMetaData> deployments = new ArrayList<ManagedConnectionFactoryDeploymentMetaData>();
+   
+   //TODO ingore loaderRepositoryAdapter and ServiceMetaDataAdapter for avoiding package depends. 
+   /** The services 
+   @XmlElement(name="mbean")
+   @XmlJavaTypeAdapter(ServiceMetaDataAdapter.class)
+   private List<ServiceMetaData> services = new ArrayList<ServiceMetaData>();
+   */
+   /** The loader repository config 
+   @XmlElement(name="loader-repository")
+   @XmlJavaTypeAdapter(LoaderRepositoryAdapter.class)
+   private LoaderRepositoryConfig loaderRepositoryConfig;
+   */
+   public void addManagedConnectionFactoryDeployment(ManagedConnectionFactoryDeploymentMetaData deployment)
+   {
+      this.deployments.add(deployment);
+   }
+   
+   public List<ManagedConnectionFactoryDeploymentMetaData> getDeployments()
+   {
+      return Collections.unmodifiableList(deployments);
+   }
+
+   /**
+    * Get the fileUrl.
+    * 
+    * @return the fileUrl.
+    */
+   public URL getUrl()
+   {
+      return fileUrl;
+   }
+
+   /**
+    * Set the fileUrl.
+    * 
+    * @param fileUrl The fileUrl to set.
+    */
+   public void setUrl(URL fileUrl)
+   {
+      this.fileUrl = fileUrl;
+   }
+
+   /**
+    * Set the deployments.
+    * 
+    * @param deployments The deployments to set.
+    */
+   public void setDeployments(List<ManagedConnectionFactoryDeploymentMetaData> deployments)
+   {
+      this.deployments = deployments;
+   }
+
+}

Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionFactoryDeploymentMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionFactoryDeploymentMetaData.java	                        (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionFactoryDeploymentMetaData.java	2008-10-10 07:24:55 UTC (rev 79336)
@@ -0,0 +1,535 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss.mcf;
+
+import java.io.Serializable;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+//import org.jboss.resource.deployers.management.ConnectionFactoryProperty;
+
+
+/**
+ * A ManagedConnectionFactoryDeployment.
+ * 
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @author Jeff Zhang
+ * @version $Revision:$
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+public class ManagedConnectionFactoryDeploymentMetaData
+   implements Serializable, ConnectionPoolMetaData
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -4591557831734316580L;
+
+   /** The jndiName */   
+   @XmlElement(name="jndi-name")
+   private String jndiName;   
+   
+   /** The rarName */
+   @XmlElement(name="rar-name")
+   private String rarName;
+   
+   /** The useJavaContext */
+   @XmlElement(name="use-java-context")
+   private boolean useJavaContext = true;   
+   
+   /** The connectionDefinition */
+   @XmlElement(name="connection-definition")
+   protected String connectionDefinition;
+
+   /** The jmxInvokerName */
+   @XmlElement(name="jmx-invoker-name")
+   private String jmxInvokerName = "jboss:service=invoker,type=jrmp";
+   
+   @XmlElement(name="min-pool-size")
+   private int minSize = 0;
+   
+   @XmlElement(name="max-pool-size")
+   private int maxPoolSize = 10;
+   
+   @XmlElement(name="blocking-timeout-millis")
+   private long blockingTimeout = 30000;
+   
+   @XmlElement(name="idle-timeout-minutes")
+   private int idleTimeout = 30;
+   
+   @XmlElement(name="prefill")
+   private Boolean prefill = Boolean.FALSE;
+   
+   @XmlElement(name="background-validation")
+   private boolean backgroundValidation;
+   
+   @XmlElement(name="background-validation-millis")
+   private long backgroundValidationMillis;
+
+   @XmlElement(name="validate-on-match")
+   private boolean validateOnMatch = true;
+   
+   @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
+   @XmlElement(name="use-strict-min")
+   private Boolean useStrictMin = Boolean.FALSE;
+
+   @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
+   @XmlElement(name="no-tx-separate-pools")
+   private Boolean noTxSeparatePools = Boolean.FALSE;
+   
+   @XmlElement(name="statistics-formatter")
+   private String statisticsFormatter = "org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter";
+   
+   @XmlElement(name="isSameRM-override-value")
+   private Boolean isSameRMOverrideValue = Boolean.FALSE;
+
+   // is always true now and left here for the xml binding
+   @Deprecated
+   @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
+   @XmlElement(name="track-connection-by-tx")
+   private Boolean trackConnectionByTransaction;
+
+   @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
+   @XmlElement(name="interleaving")
+   private Boolean interleaving;
+
+   /** The transactionSupportMetaData */
+   @XmlTransient
+   private ManagedConnectionFactoryTransactionSupportMetaData transactionSupportMetaData = ManagedConnectionFactoryTransactionSupportMetaData.NONE;
+
+   /** The managedConnectionFactoryProperties */
+   @XmlElement(name="config-property")
+   private List<ManagedConnectionFactoryPropertyMetaData> managedConnectionFactoryProperties;// = new ArrayList<ManagedConnectionFactoryPropertyMetaData>();
+   
+   /** The securityMetaData */
+   @XmlElements({
+      @XmlElement(name="security-domain", type=SecurityDomainMetaData.class), 
+      @XmlElement(name="security-domain-and-application",type=SecurityDomainApplicationManagedMetaData.class), 
+      @XmlElement(name="application-managed-security",type=ApplicationManagedSecurityMetaData.class)})
+   private SecurityMetaData securityMetaData;
+      
+   @XmlElement(name="depends")
+   private List<String> dependsNames;// = new ArrayList<String>();
+   
+   //@XmlTransient
+   //private List<ServiceMetaData> dependsServices = new ArrayList<ServiceMetaData>();
+
+   @XmlElement(name="metadata")
+   private DBMSMetaData dbmsMetaData;
+
+   // todo: this should be wrapped into <metadata> element
+   @XmlElement(name="type-mapping")
+   String typeMapping;
+   
+   /** The localTransactions */
+   @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
+   @XmlElement(name="local-transaction")
+   private Boolean localTransactions = Boolean.FALSE;
+
+   public ManagedConnectionFactoryDeploymentMetaData()
+   {
+      this.interleaving = Boolean.FALSE;
+   }
+   
+   /**
+    * Get the connectionDefinition.
+    * 
+    * @return the connectionDefinition.
+    */
+   public String getConnectionDefinition()
+   {
+      return connectionDefinition;
+   }
+
+   /**
+    * Set the connectionDefinition.
+    * 
+    * @param connectionDefinition The connectionDefinition to set.
+    */
+   public void setConnectionDefinition(String connectionDefinition)
+   {
+      this.connectionDefinition = connectionDefinition;
+   }
+
+   /**
+    * Get the jndiName. This is the id for the DataSource ManagedObject.
+    * 
+    * @return the jndiName.
+    */
+   public String getJndiName()
+   {
+      return jndiName;
+   }
+
+   /**
+    * Set the jndiName.
+    * 
+    * @param jndiName The jndiName to set.
+    */
+   public void setJndiName(String jndiName)
+   {
+      this.jndiName = jndiName;
+   }
+
+   /**
+    * Get the transactionSupportMetaData.
+    * 
+    * @return the transactionSupportMetaData.
+    */
+   public ManagedConnectionFactoryTransactionSupportMetaData getTransactionSupportMetaData()
+   {
+      return transactionSupportMetaData;
+   }
+
+   /**
+    * Set the transactionSupportMetaData.
+    * 
+    * @param transactionSupportMetaData The transactionSupportMetaData to set.
+    */
+   public void setTransactionSupportMetaData(ManagedConnectionFactoryTransactionSupportMetaData transactionSupportMetaData)
+   {
+      this.transactionSupportMetaData = transactionSupportMetaData;
+   }
+
+   /**
+    * Get the useJavaContext.
+    * 
+    * @return the useJavaContext.
+    */
+   public boolean isUseJavaContext()
+   {
+      return useJavaContext;
+   }
+
+   /**
+    * Set the useJavaContext.
+    * 
+    * @param useJavaContext The useJavaContext to set.
+    */
+   public void setUseJavaContext(boolean useJavaContext)
+   {
+      this.useJavaContext = useJavaContext;
+   }
+
+   /**
+    * Get the managedConnectionFactoryProperties.
+    * 
+    * @return the managedConnectionFactoryProperties.
+    */
+   public List<ManagedConnectionFactoryPropertyMetaData> getManagedConnectionFactoryProperties()
+   {
+      return managedConnectionFactoryProperties;
+   }
+
+   /**
+    * Set the managedConnectionFactoryProperties.
+    * 
+    * @param managedConnectionFactoryProperties The managedConnectionFactoryProperties to set.
+    */
+   public void setManagedConnectionFactoryProperties(
+         List<ManagedConnectionFactoryPropertyMetaData> managedConnectionFactoryProperties)
+   {
+      this.managedConnectionFactoryProperties = managedConnectionFactoryProperties;
+   }
+
+   /**
+    * Get the rarName.
+    * 
+    * @return the rarName.
+    */
+   public String getRarName()
+   {
+      return rarName;
+   }
+
+   /**
+    * Set the rarName.
+    * 
+    * @param rarName The rarName to set.
+    */
+   public void setRarName(String rarName)
+   {
+      this.rarName = rarName;
+   }
+
+   /**
+    * Get the securityMetaData.
+    * 
+    * @return the securityMetaData.
+    */
+   public SecurityMetaData getSecurityMetaData()
+   {
+      return securityMetaData;
+   }
+
+   /**
+    * Set the securityMetaData.
+    * 
+    * @param securityMetaData The securityMetaData to set.
+    */
+   public void setSecurityMetaData(SecurityMetaData securityMetaData)
+   {
+      this.securityMetaData = securityMetaData;
+   }
+
+   
+   /**
+    * Get the typeMapping.
+    * 
+    * @return the typeMapping.
+    */
+   public String getTypeMapping()
+   {
+      return typeMapping;
+   }
+
+   /**
+    * Set the typeMapping.
+    * 
+    * @param typeMapping The typeMapping to set.
+    */
+   public void setTypeMapping(String typeMapping)
+   {
+      this.typeMapping = typeMapping;
+   }
+
+   /**
+    * Get the jmxInvokerName.
+    * 
+    * @return the jmxInvokerName.
+    */
+   public String getJmxInvokerName()
+   {
+      return jmxInvokerName;
+   }
+
+   /**
+    * Set the jmxInvokerName.
+    * 
+    * @param jmxInvokerName The jmxInvokerName to set.
+    */
+   public void setJmxInvokerName(String jmxInvokerName)
+   {
+      this.jmxInvokerName = jmxInvokerName;
+   }
+
+   /**
+    * Get the dependsNames.
+    * 
+    * @return the dependsNames.
+    */
+   public List<String> getDependsNames()
+   {
+      return dependsNames;
+   }
+
+   /**
+    * Set the dependsNames.
+    * 
+    * @param dependsNames The dependsNames to set.
+    */
+   public void setDependsNames(List<String> dependsNames)
+   {
+      this.dependsNames = dependsNames;
+   }
+  
+   public void setMinSize(int minSize)
+   {
+      this.minSize = minSize;
+   } 
+   
+   public int getMinSize()
+   {
+      return this.minSize;
+      
+   }
+   
+   public void setMaxSize(int maxSize)
+   {
+      this.maxPoolSize = maxSize;
+   }
+   
+   public int getMaxSize()
+   {
+      if (this.maxPoolSize >= this.minSize)
+      {
+         return this.maxPoolSize;
+      } else {
+         return this.minSize;
+      }
+      
+   }
+   
+   public void setBlockingTimeoutMilliSeconds(long blockTimeout)
+   {
+     this.blockingTimeout = blockTimeout;
+      
+   }
+   
+   public long getBlockingTimeoutMilliSeconds()
+   {
+      return this.blockingTimeout;
+      
+   }
+   
+   public void setIdleTimeoutMinutes(int idleTimeout)
+   {
+      this.idleTimeout = idleTimeout;
+   }
+   
+   public int getIdleTimeoutMinutes()
+   {
+      return this.idleTimeout;
+      
+   }
+
+   public void setPrefill(Boolean prefill)
+   {
+      this.prefill = prefill;
+   }
+
+   public Boolean getPrefill()
+   {
+      return this.prefill;      
+   }
+
+   public boolean isBackgroundValidation()
+   {
+      return backgroundValidation;
+   }
+
+   public void setBackgroundValidation(boolean backgroundValidation)
+   {
+      this.backgroundValidation = backgroundValidation;
+   }
+
+   public void setBackgroundValidationMillis(long interval)
+   {
+      this.backgroundValidationMillis = interval;
+   }
+
+   public long getBackgroundValidationMillis()
+   {
+      return this.backgroundValidationMillis;
+   }
+
+   public void setValidateOnMatch(boolean validateOnMatch)
+   {
+      this.validateOnMatch = validateOnMatch;
+   }
+
+   public boolean isValidateOnMatch()
+   {
+      return this.validateOnMatch;
+      
+   }
+
+   public Boolean getIsSameRMOverrideValue()
+   {
+      return isSameRMOverrideValue;
+   }
+
+   public void setIsSameRMOverrideValue(Boolean isSameRMOverrideValue)
+   {
+      this.isSameRMOverrideValue = isSameRMOverrideValue;
+   }
+
+   @Deprecated
+   public Boolean getTrackConnectionByTransaction()
+   {
+      return !isInterleaving();
+   }
+
+   @Deprecated
+   public void setTrackConnectionByTransaction(Boolean trackConnectionByTransaction)
+   {
+      if(Boolean.TRUE == getLocalTransactions() && !Boolean.TRUE.equals(trackConnectionByTransaction))
+         throw new IllegalStateException("In case of local transactions track-connection-by-tx must always be true");      
+      setInterleaving(!Boolean.TRUE.equals(trackConnectionByTransaction));
+   }
+
+   public Boolean isInterleaving()
+   {
+      return interleaving == Boolean.TRUE && !Boolean.TRUE.equals(getLocalTransactions());
+   }
+
+   public void setInterleaving(Boolean interleaving)
+   {
+      this.interleaving = interleaving;
+   }
+
+   public Boolean getLocalTransactions()
+   {
+      return localTransactions;
+   }
+
+   public void setLocalTransactions(Boolean localTransactions)
+   {
+      this.localTransactions = localTransactions;
+   }
+
+   public Boolean getUseStrictMin()
+   {
+      return useStrictMin;
+   }
+
+   public void setUseStrictMin(Boolean useStrictMin)
+   {
+      this.useStrictMin = useStrictMin;
+   }
+
+   public String getStatisticsFormatter()
+   {
+      return statisticsFormatter;
+   }
+
+   public void setStatisticsFormatter(String statisticsFormatter)
+   {
+      this.statisticsFormatter = statisticsFormatter;
+   }
+   
+   public Boolean getNoTxSeparatePools()
+   {
+      return this.noTxSeparatePools;
+   }
+
+   public void setNoTxSeparatePools(Boolean notxpool)
+   {
+      this.noTxSeparatePools = notxpool;
+   }
+
+   public DBMSMetaData getDBMSMetaData()
+   {
+      return dbmsMetaData;
+   }
+
+   public void setDBMSMetaData(DBMSMetaData dbmsMetaData)
+   {
+      this.dbmsMetaData = dbmsMetaData;
+   }
+   
+
+}

Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionFactoryPropertyMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionFactoryPropertyMetaData.java	                        (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionFactoryPropertyMetaData.java	2008-10-10 07:24:55 UTC (rev 79336)
@@ -0,0 +1,142 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss.mcf;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlValue;
+
+/**
+ * A ManagedConnectionFactoryProperty.
+ * 
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @author Jeff Zhang
+ * @version $Revision:  $
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+public class ManagedConnectionFactoryPropertyMetaData implements Serializable
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 4978655092571661074L;
+   
+   /** The name */
+   @XmlAttribute(name="name")
+   private String name;
+   
+   /** The type */
+   @XmlAttribute(name="type")   
+   private String type = "java.lang.String";
+   
+   @XmlValue
+   private String value;
+   
+   /**
+    * Get the name.
+    * 
+    * @return the name.
+    */
+   public String getName()
+   {
+      return name;
+   }
+   /**
+    * Set the name.
+    * 
+    * @param name The name to set.
+    */
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+   /**
+    * Get the type.
+    * 
+    * @return the type.
+    */
+   public String getType()
+   {
+      return type;
+   }
+   /**
+    * Set the type.
+    * 
+    * @param type The type to set.
+    */
+   public void setType(String type)
+   {
+      this.type = type;
+   }
+   /**
+    * Get the value.
+    * 
+    * @return the value.
+    */
+   public String getValue()
+   {
+      return value;
+   }
+   /**
+    * Set the value.
+    * 
+    * @param value The value to set.
+    */
+   public void setValue(String value)
+   {
+      this.value = value;
+   }
+   
+   @Override
+   public boolean equals(Object obj)
+   {
+      if(this == obj)
+         return true;
+      
+      if(!(obj instanceof ManagedConnectionFactoryPropertyMetaData))
+      {
+         return false;         
+      }
+      
+      ManagedConnectionFactoryPropertyMetaData other = (ManagedConnectionFactoryPropertyMetaData)obj;
+      
+      if(getName() == null)
+         return false;
+      
+      else
+      {
+         return getName().equals(other.getName());
+      }
+   }
+   
+   @Override
+   public int hashCode()
+   {
+      if (getName() == null)
+      {
+         return 42;
+      }
+
+      return getName().hashCode();
+   }
+}

Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionFactoryTransactionSupportMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionFactoryTransactionSupportMetaData.java	                        (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/ManagedConnectionFactoryTransactionSupportMetaData.java	2008-10-10 07:24:55 UTC (rev 79336)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss.mcf;
+
+/**
+ * A ManagedConnectionFactoryTransactionSupportMetaData.
+ * 
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public enum ManagedConnectionFactoryTransactionSupportMetaData 
+{
+   NONE, LOCAL, XA;
+}

Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/NoTxConnectionFactoryDeploymentMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/NoTxConnectionFactoryDeploymentMetaData.java	                        (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/NoTxConnectionFactoryDeploymentMetaData.java	2008-10-10 07:24:55 UTC (rev 79336)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss.mcf;
+
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * A NoTxConnectionFactoryDeploymentMetaData.
+ * 
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+ at XmlType(name="no-tx-connection-factory")
+public class NoTxConnectionFactoryDeploymentMetaData extends ManagedConnectionFactoryDeploymentMetaData
+{
+
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -8637168894246737692L;
+   
+   @Override
+   public ManagedConnectionFactoryTransactionSupportMetaData getTransactionSupportMetaData()
+   {
+      return ManagedConnectionFactoryTransactionSupportMetaData.NONE;
+      
+   }
+      
+}

Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/NoTxDataSourceDeploymentMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/NoTxDataSourceDeploymentMetaData.java	                        (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/NoTxDataSourceDeploymentMetaData.java	2008-10-10 07:24:55 UTC (rev 79336)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss.mcf;
+
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * A NoTxDataSourceDeploymentMetaData.
+ * 
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+ at XmlType(name="no-tx-datasource")
+public class NoTxDataSourceDeploymentMetaData extends NonXADataSourceDeploymentMetaData
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -5354506847562754007L;
+   
+   @Override
+   public ManagedConnectionFactoryTransactionSupportMetaData getTransactionSupportMetaData()
+   {
+      return ManagedConnectionFactoryTransactionSupportMetaData.NONE;
+      
+   }
+   
+
+}

Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/NonXADataSourceDeploymentMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/NonXADataSourceDeploymentMetaData.java	                        (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/NonXADataSourceDeploymentMetaData.java	2008-10-10 07:24:55 UTC (rev 79336)
@@ -0,0 +1,131 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss.mcf;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+
+//import org.jboss.resource.deployers.management.ConnectionFactoryProperty;
+
+/**
+ * Provide a common base for non xa data source deployment meta data.
+ * 
+ * TODO: update to AS 5
+ * See also http://docs.jboss.org/jbossas/jboss4guide/r2/html/ch7.chapt.html#ch7.jdbc.sect
+ *
+ * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @author Scott.Stark at jboss.org
+ * @author Jeff Zhang
+ * @version $Revision:  $
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+public abstract class NonXADataSourceDeploymentMetaData extends DataSourceDeploymentMetaData
+{
+   private static final long serialVersionUID = 1444129014410015366L;
+   
+   @XmlElement(name="driver-class", required=true)
+   private String driverClass;
+   
+   @XmlElement(name="connection-url", required=true)
+   private String connectionUrl;
+   
+   @XmlElement(name="connection-property")
+   private List<DataSourceConnectionPropertyMetaData> connectionProperties;// = new ArrayList<DataSourceConnectionPropertyMetaData>();
+
+   public String getConnectionUrl()
+   {
+      return connectionUrl;
+   }
+
+   public void setConnectionUrl(String connectionUrl)
+   {
+      this.connectionUrl = connectionUrl;
+   }
+
+   public String getDriverClass()
+   {
+      return driverClass;
+   }
+
+   public void setDriverClass(String driverClass)
+   {
+      this.driverClass = driverClass;
+   }
+   
+   public List<DataSourceConnectionPropertyMetaData> getDataSourceConnectionProperties()
+   {
+      return this.connectionProperties;      
+   }
+
+   public void setDataSourceConnectionProperties(List<DataSourceConnectionPropertyMetaData> connectionProperties)
+   {
+      this.connectionProperties = connectionProperties;
+   }
+   
+   @Override
+   public List<ManagedConnectionFactoryPropertyMetaData> getManagedConnectionFactoryProperties()
+   {
+      
+      List<ManagedConnectionFactoryPropertyMetaData> properties = super.getManagedConnectionFactoryProperties();
+      ManagedConnectionFactoryPropertyMetaData property = null;
+      
+      if(getConnectionUrl() != null)
+      {
+         property = new ManagedConnectionFactoryPropertyMetaData();
+         property.setName("ConnectionURL");
+         property.setValue(getConnectionUrl());
+         properties.add(property);
+         
+      }
+      
+      if(getDriverClass() != null)
+      {
+         property = new ManagedConnectionFactoryPropertyMetaData();
+         property.setName("DriverClass");
+         property.setValue(getDriverClass());
+         properties.add(property);         
+      }
+      
+      StringBuffer propBuff = new StringBuffer();
+      List<DataSourceConnectionPropertyMetaData> dsProps = getDataSourceConnectionProperties();
+
+      if (dsProps != null)
+      {
+         for (DataSourceConnectionPropertyMetaData prop : dsProps)
+         {
+            propBuff.append(prop.getName() + "=" + prop.getValue() + "\n");      
+         }
+      }
+      
+      property = new ManagedConnectionFactoryPropertyMetaData();
+      property.setName("ConnectionProperties");
+      property.setValue(propBuff.toString());
+      properties.add(property);
+
+      return properties;
+      
+   }
+}

Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/SecurityDeploymentType.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/SecurityDeploymentType.java	                        (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/SecurityDeploymentType.java	2008-10-10 07:24:55 UTC (rev 79336)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss.mcf;
+
+/**
+ * A SecurityDeploymentType.
+ * 
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public enum SecurityDeploymentType 
+{
+   NONE, APPLICATION, DOMAIN, DOMAIN_AND_APPLICATION;
+   
+}

Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/SecurityDomainApplicationManagedMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/SecurityDomainApplicationManagedMetaData.java	                        (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/SecurityDomainApplicationManagedMetaData.java	2008-10-10 07:24:55 UTC (rev 79336)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss.mcf;
+
+import javax.xml.bind.annotation.XmlType;
+
+ at XmlType(name="security-domain-and-application")
+public class SecurityDomainApplicationManagedMetaData extends SecurityMetaData
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -6069372122256391426L;
+   
+   public SecurityDomainApplicationManagedMetaData()
+   {
+      type = SecurityDeploymentType.DOMAIN_AND_APPLICATION;
+      
+   }
+}

Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/SecurityDomainMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/SecurityDomainMetaData.java	                        (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/SecurityDomainMetaData.java	2008-10-10 07:24:55 UTC (rev 79336)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss.mcf;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * A SecurityDomainMetaData.
+ * 
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name="security-domain")
+public class SecurityDomainMetaData extends SecurityMetaData
+{   
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 7651471441356573122L;
+   
+   public SecurityDomainMetaData()
+   {
+      type = SecurityDeploymentType.DOMAIN;
+      
+   }
+}

Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/SecurityMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/SecurityMetaData.java	                        (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/SecurityMetaData.java	2008-10-10 07:24:55 UTC (rev 79336)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss.mcf;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlValue;
+
+/**
+ * A SecurityMetaData.
+ * 
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+ at XmlAccessorType(XmlAccessType.NONE)
+public class SecurityMetaData implements Serializable, SecurityMetaDataSupport
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 8939054836116025885L;
+   
+   @XmlValue
+   private String domain;
+   
+   protected SecurityDeploymentType type;
+   
+   
+   public SecurityMetaData()
+   {
+      type = SecurityDeploymentType.NONE;
+      
+   }
+   
+   public boolean requiresDomain()
+   {
+      return (getSecurityDeploymentType().equals(SecurityDeploymentType.DOMAIN) 
+            || getSecurityDeploymentType().equals(SecurityDeploymentType.DOMAIN_AND_APPLICATION));
+   }   
+
+   public String getDomain()
+   {
+      return domain;
+   }
+   public void setDomain(String domain)
+   {
+      this.domain = domain;
+   }
+
+   public SecurityDeploymentType getSecurityDeploymentType()
+   {
+      return type;
+   }
+}

Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/SecurityMetaDataSupport.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/SecurityMetaDataSupport.java	                        (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/SecurityMetaDataSupport.java	2008-10-10 07:24:55 UTC (rev 79336)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss.mcf;
+
+/**
+ * A SecurityMetaDataSupport.
+ * 
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public interface SecurityMetaDataSupport
+{
+   public boolean requiresDomain();
+   public String getDomain();
+   public SecurityDeploymentType getSecurityDeploymentType();
+   
+}

Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/TxConnectionFactoryDeploymentMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/TxConnectionFactoryDeploymentMetaData.java	                        (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/TxConnectionFactoryDeploymentMetaData.java	2008-10-10 07:24:55 UTC (rev 79336)
@@ -0,0 +1,88 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss.mcf;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+/**
+ * A TxConnectionFactoryDeploymentMetaData.
+ * 
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+ at XmlType(name="tx-connection-factory")
+ at XmlAccessorType(XmlAccessType.FIELD)
+public class TxConnectionFactoryDeploymentMetaData extends ManagedConnectionFactoryDeploymentMetaData
+{
+
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -8491548124974331799L;
+
+   public TxConnectionFactoryDeploymentMetaData()
+   {
+   }
+   
+   @XmlElement(name="xa-resource-timeout")
+   private int xaResourceTimeout;
+   
+   @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
+   @XmlElement(name="xa-transaction")
+   private Boolean xaTransaction = Boolean.FALSE;
+   
+   public int getXaResourceTimeout()
+   {
+      return xaResourceTimeout;
+   }
+   
+   public Boolean getXATransaction()
+   {
+      return xaTransaction;
+   }
+
+   public void setXATransaction(Boolean xaTransaction)
+   {
+      this.xaTransaction = xaTransaction;
+      
+   }
+   public void setXaResourceTimeout(int xaResourceTimeout)
+   {
+      this.xaResourceTimeout = xaResourceTimeout;
+   }
+   
+   @Override
+   public Boolean getLocalTransactions()
+   {
+      return !getXATransaction();
+   }
+
+   @Override
+   public ManagedConnectionFactoryTransactionSupportMetaData getTransactionSupportMetaData()
+   {
+      return getLocalTransactions() ? ManagedConnectionFactoryTransactionSupportMetaData.LOCAL : ManagedConnectionFactoryTransactionSupportMetaData.XA;
+   }
+
+}

Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/XAConnectionPropertyMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/XAConnectionPropertyMetaData.java	                        (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/XAConnectionPropertyMetaData.java	2008-10-10 07:24:55 UTC (rev 79336)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss.mcf;
+
+/**
+ * A XAConnectionPropertyMetaData.
+ * 
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public class XAConnectionPropertyMetaData extends DataSourceConnectionPropertyMetaData
+{
+   private static final long serialVersionUID = 1444129514410715366L;
+
+}

Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/XADataSourceDeploymentMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/XADataSourceDeploymentMetaData.java	                        (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/mcf/XADataSourceDeploymentMetaData.java	2008-10-10 07:24:55 UTC (rev 79336)
@@ -0,0 +1,143 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss.mcf;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * A XADataSourceDeploymentMetaData.
+ * 
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+ at XmlType(name="xa-datasource")
+ at XmlAccessorType(XmlAccessType.FIELD)
+public class XADataSourceDeploymentMetaData extends DataSourceDeploymentMetaData
+{
+
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -6919645811610960978L;
+   
+   private static final String RAR_NAME = "jboss-xa-jdbc.rar";
+   
+   @XmlElement(name="xa-datasource-class")
+   private String xaDataSourceClass;
+   
+   @XmlElement(name="xa-datasource-property")
+   private List<XAConnectionPropertyMetaData> xaDataSourceProperties = new ArrayList<XAConnectionPropertyMetaData>();
+   
+   @XmlElement(name="url-property")
+   private String urlProperty;
+
+   @XmlElement(name="xa-resource-timeout")
+   private int xaResourceTimeout;
+
+   public XADataSourceDeploymentMetaData()
+   {
+      setRarName(RAR_NAME);
+      setTransactionSupportMetaData(ManagedConnectionFactoryTransactionSupportMetaData.XA);
+   }
+   public String getXaDataSourceClass()
+   {
+      return xaDataSourceClass;
+   }
+
+   public void setXaDataSourceClass(String xaDataSourceClass)
+   {
+      this.xaDataSourceClass = xaDataSourceClass;
+   }
+  public String getURLProperty()
+   {
+      return urlProperty;
+   }
+
+   public void setURLProperty(String urlProperty)
+   {
+      this.urlProperty = urlProperty;
+   }
+   public int getXaResourceTimeout()
+   {
+      return xaResourceTimeout;
+   }
+
+   public void setXaResourceTimeout(int xaResourceTimeout)
+   {
+      this.xaResourceTimeout = xaResourceTimeout;
+   }
+   public List<XAConnectionPropertyMetaData> getXADataSourceProperties()
+   {
+      return this.xaDataSourceProperties;      
+   }
+   
+   public void setXADataSourceProperties(List<XAConnectionPropertyMetaData> xaDataSourceProperties)
+   {
+      this.xaDataSourceProperties = xaDataSourceProperties;
+   }
+   
+   public List<ManagedConnectionFactoryPropertyMetaData> getManagedConnectionFactoryProperties()
+   {
+      List<ManagedConnectionFactoryPropertyMetaData> properties = super.getManagedConnectionFactoryProperties();
+      ManagedConnectionFactoryPropertyMetaData property = null;
+      
+      if(getXaDataSourceClass() != null)
+      {
+         property = new ManagedConnectionFactoryPropertyMetaData();
+         property.setName("XADataSourceClass");
+         property.setValue(getXaDataSourceClass());
+         properties.add(property);
+      }
+      
+      List<XAConnectionPropertyMetaData> dsProps = getXADataSourceProperties();
+      
+      StringBuffer dsBuff = new StringBuffer();
+
+      if (dsProps != null)
+      {
+         for (XAConnectionPropertyMetaData data : dsProps)
+         {
+            dsBuff.append(data.getName() + "=" + data.getValue() + "\n");
+         }
+      }
+      
+      property = new ManagedConnectionFactoryPropertyMetaData();
+      property.setName("XADataSourceProperties");
+      property.setValue(dsBuff.toString());
+      properties.add(property);
+      
+      if(getURLProperty() != null)
+      {
+         property = new ManagedConnectionFactoryPropertyMetaData();
+         property.setName("URLProperty");
+         property.setValue(getURLProperty());
+         properties.add(property);
+      }
+      
+      return properties;
+   }
+}




More information about the jboss-cvs-commits mailing list