[jboss-cvs] JBossAS SVN: r61506 - in trunk/connector/src/main/org/jboss/resource/metadata: mcf and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Mar 21 00:12:42 EDT 2007
Author: weston.price at jboss.com
Date: 2007-03-21 00:12:42 -0400 (Wed, 21 Mar 2007)
New Revision: 61506
Added:
trunk/connector/src/main/org/jboss/resource/metadata/mcf/
trunk/connector/src/main/org/jboss/resource/metadata/mcf/ApplicationManagedSecurityMetaData.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/ConnectionPoolMetaData.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/DataSourceConnectionPropertyMetaData.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/DataSourceDeploymentMetaData.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/JDBCProviderSupport.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/LocalDataSourceDeploymentMetaData.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentGroup.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentMetaData.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryPropertyMetaData.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryTransactionSupportMetaData.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/NoTxConnectionFactoryDeploymentMetaData.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/NoTxDataSourceDeploymentMetaData.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityDeploymentType.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityDomainApplicationManagedMetaData.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityDomainMetaData.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityMetaData.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityMetaDataSupport.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/ServiceMetaDataAdapter.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/TxConnectionFactoryDeploymentMetaData.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/XAConnectionPropertyMetaData.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/XADataSourceDeploymentMetaData.java
Log:
[JBAS-1425] New JAXB based metadata for programmatic deployment.
Added: trunk/connector/src/main/org/jboss/resource/metadata/mcf/ApplicationManagedSecurityMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/ApplicationManagedSecurityMetaData.java (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/ApplicationManagedSecurityMetaData.java 2007-03-21 04:12:42 UTC (rev 61506)
@@ -0,0 +1,44 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.resource.metadata.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: trunk/connector/src/main/org/jboss/resource/metadata/mcf/ConnectionPoolMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/ConnectionPoolMetaData.java (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/ConnectionPoolMetaData.java 2007-03-21 04:12:42 UTC (rev 61506)
@@ -0,0 +1,56 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.resource.metadata.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 isPrefill();
+
+ public void setBackgroundValidation(boolean bgv);
+ public boolean isBackgroundValidation();
+
+ public void setBackgroundValidationMinutes(int interval);
+ public int getBackgroundValidationMinutes();
+
+// public void setValidateOnMatch(boolean validateOnMatch);
+// public boolean isValidateOnMatch();
+
+}
Added: trunk/connector/src/main/org/jboss/resource/metadata/mcf/DataSourceConnectionPropertyMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/DataSourceConnectionPropertyMetaData.java (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/DataSourceConnectionPropertyMetaData.java 2007-03-21 04:12:42 UTC (rev 61506)
@@ -0,0 +1,64 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.resource.metadata.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>
+ * @version $Revision: 1.1 $
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+public class DataSourceConnectionPropertyMetaData
+{
+ @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;
+ }
+
+
+}
Added: trunk/connector/src/main/org/jboss/resource/metadata/mcf/DataSourceDeploymentMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/DataSourceDeploymentMetaData.java (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/DataSourceDeploymentMetaData.java 2007-03-21 04:12:42 UTC (rev 61506)
@@ -0,0 +1,302 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.resource.metadata.mcf;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElements;
+
+/**
+ * A DataSourceDeploymentMetaData.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+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;
+
+ @XmlElements({@XmlElement(name="xa-datasource-property"), @XmlElement(name="connection-property")})
+ private List<DataSourceConnectionPropertyMetaData> connectionProperties = new ArrayList<DataSourceConnectionPropertyMetaData>();
+
+ @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="track-statements")
+ private boolean trackStatements = false;
+
+ @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;
+
+ public DataSourceDeploymentMetaData()
+ {
+ setConnectionDefinition(CONNECTION_DEFINITION);
+ setRarName(RAR_NAME);
+
+ }
+
+ public String getTransactionIsolation()
+ {
+ return transactionIsolation;
+ }
+
+ public void setTransactionIsolation(String transactionIsolation)
+ {
+ this.transactionIsolation = transactionIsolation;
+ }
+
+ public List<DataSourceConnectionPropertyMetaData> getDataSourceConnectionProperties()
+ {
+ return this.connectionProperties;
+ }
+
+ 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 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 boolean isSharePreparedStatements()
+ {
+ return sharePreparedStatements;
+ }
+
+ public void setSharePreparedStatements(boolean sharePreparedStatements)
+ {
+ this.sharePreparedStatements = sharePreparedStatements;
+ }
+
+ public boolean isTrackStatements()
+ {
+ return trackStatements;
+ }
+
+ public void setTrackStatements(boolean 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);
+ }
+
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("PreparedStatementCacheSize");
+ property.setType("java.lang.Integer");
+ property.setValue(String.valueOf(getPreparedStatementCacheSize()));
+ properties.add(property);
+
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("SharePreparedStatements");
+ property.setType("java.lang.Boolean");
+ property.setValue(String.valueOf(isSharePreparedStatements()));
+ properties.add(property);
+
+
+
+ return properties;
+ }
+
+
+}
Added: trunk/connector/src/main/org/jboss/resource/metadata/mcf/JDBCProviderSupport.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/JDBCProviderSupport.java (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/JDBCProviderSupport.java 2007-03-21 04:12:42 UTC (rev 61506)
@@ -0,0 +1,57 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.resource.metadata.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(boolean trackStatements);
+ public boolean isTrackStatements();
+
+ 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: trunk/connector/src/main/org/jboss/resource/metadata/mcf/LocalDataSourceDeploymentMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/LocalDataSourceDeploymentMetaData.java (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/LocalDataSourceDeploymentMetaData.java 2007-03-21 04:12:42 UTC (rev 61506)
@@ -0,0 +1,116 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.resource.metadata.mcf;
+
+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 LocalDataSourceDeploymentMetaData.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+ at XmlType(name="local-tx-datasource")
+ at XmlAccessorType(XmlAccessType.FIELD)
+public class LocalDataSourceDeploymentMetaData extends DataSourceDeploymentMetaData
+{
+
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -1513179292986405426L;
+
+ @XmlElement(name="driver-class", required=true)
+ private String driverClass;
+
+ @XmlElement(name="connection-url", required=true)
+ private String connectionUrl;
+
+ public LocalDataSourceDeploymentMetaData()
+ {
+ }
+
+ 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;
+ }
+
+ @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();
+
+ 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: trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentGroup.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentGroup.java (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentGroup.java 2007-03-21 04:12:42 UTC (rev 61506)
@@ -0,0 +1,128 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.resource.metadata.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;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.system.metadata.ServiceMetaData;
+
+/**
+ * A ManagedConnectionFactoryDeploymentGroup.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @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>();
+
+ /** The services */
+ @XmlElement(name="mbean")
+ @XmlJavaTypeAdapter(ServiceMetaDataAdapter.class)
+ private List<ServiceMetaData> services = new ArrayList<ServiceMetaData>();
+
+ 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;
+ }
+
+ /**
+ * Get the services.
+ *
+ * @return the services.
+ */
+ public List<ServiceMetaData> getServices()
+ {
+ return services;
+ }
+
+ /**
+ * Set the services.
+ *
+ * @param services The services to set.
+ */
+ public void setServices(List<ServiceMetaData> services)
+ {
+ this.services = services;
+ }
+
+
+}
Added: trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentMetaData.java (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentMetaData.java 2007-03-21 04:12:42 UTC (rev 61506)
@@ -0,0 +1,446 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.resource.metadata.mcf;
+
+import java.io.Serializable;
+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.XmlElements;
+import javax.xml.bind.annotation.XmlTransient;
+
+import org.jboss.system.metadata.ServiceMetaData;
+
+
+/**
+ * A ManagedConnectionFactoryDeployment.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+ 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 typeMapping */
+ private String typeMapping;
+
+ /** 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;
+
+ @XmlElement(name="background-validation")
+ private boolean backgroundValidation;
+
+ @XmlElement(name="background-validation-minutes")
+ private int backgroundValidationMinutes;
+
+ @XmlElement(name="validate-on-match")
+ private boolean validateOnMatch = true;
+
+ /** The transactionSupportMetaData */
+ 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 = new SecurityMetaData();
+
+
+ @XmlElement(name="depends")
+ private List<String> dependsNames = new ArrayList<String>();
+
+ @XmlTransient
+ private List<ServiceMetaData> dependsServices = new ArrayList<ServiceMetaData>();
+
+
+
+ /**
+ * 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.
+ *
+ * @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 depends.
+ *
+ * @return the depends.
+ */
+ public List<String> getDepends()
+ {
+ return dependsNames;
+ }
+
+ /**
+ * Set the depends.
+ *
+ * @param depends The depends to set.
+ */
+ public void setDepends(List<String> depends)
+ {
+ this.dependsNames = depends;
+ }
+
+ /**
+ * 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;
+ }
+
+ /**
+ * Get the dependsServices.
+ *
+ * @return the dependsServices.
+ */
+ public List<ServiceMetaData> getDependsServices()
+ {
+ return dependsServices;
+ }
+
+ /**
+ * Set the dependsServices.
+ *
+ * @param dependsServices The dependsServices to set.
+ */
+ public void setDependsServices(List<ServiceMetaData> dependsServices)
+ {
+ this.dependsServices = dependsServices;
+ }
+
+ 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()
+ {
+ return this.maxPoolSize;
+
+ }
+
+ 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 isPrefill()
+ {
+ return this.prefill;
+
+ }
+
+ public void setBackgroundValidation(boolean bgv)
+ {
+ this.backgroundValidation = bgv;
+
+ }
+
+ public boolean isBackgroundValidation()
+ {
+ return this.backgroundValidation;
+ }
+
+ public void setBackgroundValidationMinutes(int interval)
+ {
+ this.backgroundValidationMinutes = interval;
+ }
+
+ public int getBackgroundValidationMinutes()
+ {
+ return this.backgroundValidationMinutes;
+ }
+
+ public void setValidateOnMatch(boolean validateOnMatch)
+ {
+ this.validateOnMatch = validateOnMatch;
+ }
+
+ public boolean getValidateOnMatch()
+ {
+ return this.validateOnMatch;
+
+ }
+
+}
Added: trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryPropertyMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryPropertyMetaData.java (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryPropertyMetaData.java 2007-03-21 04:12:42 UTC (rev 61506)
@@ -0,0 +1,133 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.resource.metadata.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>
+ * @version $Revision: 1.1 $
+ */
+ 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());
+
+ }
+
+ }
+
+}
Added: trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryTransactionSupportMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryTransactionSupportMetaData.java (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryTransactionSupportMetaData.java 2007-03-21 04:12:42 UTC (rev 61506)
@@ -0,0 +1,33 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.resource.metadata.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: trunk/connector/src/main/org/jboss/resource/metadata/mcf/NoTxConnectionFactoryDeploymentMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/NoTxConnectionFactoryDeploymentMetaData.java (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/NoTxConnectionFactoryDeploymentMetaData.java 2007-03-21 04:12:42 UTC (rev 61506)
@@ -0,0 +1,47 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.resource.metadata.mcf;
+
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * A NoTxConnectionFactoryDeploymentMetaData.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+ 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: trunk/connector/src/main/org/jboss/resource/metadata/mcf/NoTxDataSourceDeploymentMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/NoTxDataSourceDeploymentMetaData.java (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/NoTxDataSourceDeploymentMetaData.java 2007-03-21 04:12:42 UTC (rev 61506)
@@ -0,0 +1,45 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.resource.metadata.mcf;
+
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * A NoTxDataSourceDeploymentMetaData.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+ at XmlType(name="no-tx-datasource")
+public class NoTxDataSourceDeploymentMetaData extends DataSourceDeploymentMetaData
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -5354506847562754007L;
+
+ @Override
+ public ManagedConnectionFactoryTransactionSupportMetaData getTransactionSupportMetaData()
+ {
+ return ManagedConnectionFactoryTransactionSupportMetaData.NONE;
+
+ }
+}
Added: trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityDeploymentType.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityDeploymentType.java (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityDeploymentType.java 2007-03-21 04:12:42 UTC (rev 61506)
@@ -0,0 +1,34 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.resource.metadata.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: trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityDomainApplicationManagedMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityDomainApplicationManagedMetaData.java (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityDomainApplicationManagedMetaData.java 2007-03-21 04:12:42 UTC (rev 61506)
@@ -0,0 +1,16 @@
+package org.jboss.resource.metadata.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: trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityDomainMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityDomainMetaData.java (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityDomainMetaData.java 2007-03-21 04:12:42 UTC (rev 61506)
@@ -0,0 +1,47 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.resource.metadata.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: trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityMetaData.java (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityMetaData.java 2007-03-21 04:12:42 UTC (rev 61506)
@@ -0,0 +1,70 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.resource.metadata.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>
+ * @version $Revision: 1.1 $
+ */
+ 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 SecurityDeploymentType getSecurityDeploymentType()
+ {
+ return type;
+
+ }
+}
Added: trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityMetaDataSupport.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityMetaDataSupport.java (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityMetaDataSupport.java 2007-03-21 04:12:42 UTC (rev 61506)
@@ -0,0 +1,15 @@
+package org.jboss.resource.metadata.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: trunk/connector/src/main/org/jboss/resource/metadata/mcf/ServiceMetaDataAdapter.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/ServiceMetaDataAdapter.java (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/ServiceMetaDataAdapter.java 2007-03-21 04:12:42 UTC (rev 61506)
@@ -0,0 +1,55 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.resource.metadata.mcf;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+import org.jboss.system.metadata.ServiceMetaData;
+import org.jboss.system.metadata.ServiceMetaDataParser;
+import org.w3c.dom.Element;
+
+/**
+ * A ServiceMetaDataAdapter.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public class ServiceMetaDataAdapter extends XmlAdapter<Object, List<ServiceMetaData>>
+{
+
+ @Override
+ public List<ServiceMetaData> unmarshal(Object e) throws Exception
+ {
+ ServiceMetaDataParser parser = new ServiceMetaDataParser((Element)e);
+ List<ServiceMetaData> services = parser.parse();
+ return services;
+ }
+
+ @Override
+ public Element marshal(List<ServiceMetaData> arg0) throws Exception
+ {
+ // TODO implement marshalling
+ return null;
+ }
+}
Added: trunk/connector/src/main/org/jboss/resource/metadata/mcf/TxConnectionFactoryDeploymentMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/TxConnectionFactoryDeploymentMetaData.java (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/TxConnectionFactoryDeploymentMetaData.java 2007-03-21 04:12:42 UTC (rev 61506)
@@ -0,0 +1,88 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.resource.metadata.mcf;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * A TxConnectionFactoryDeploymentMetaData.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+ at XmlType(name="tx-connection-factory")
+public class TxConnectionFactoryDeploymentMetaData extends ManagedConnectionFactoryDeploymentMetaData
+{
+
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -8491548124974331799L;
+
+ /** The trackConnectionByTransaction */
+ @XmlElement(name="track-connection-by-tx")
+ private boolean trackConnectionByTransaction;
+
+ /** The localTransactions */
+ private boolean localTransactions;
+
+ /**
+ * Get the trackConnectionByTransaction.
+ *
+ * @return the trackConnectionByTransaction.
+ */
+ public boolean isTrackConnectionByTransaction()
+ {
+ return trackConnectionByTransaction;
+ }
+
+ /**
+ * Set the trackConnectionByTransaction.
+ *
+ * @param trackConnectionByTransaction The trackConnectionByTransaction to set.
+ */
+ public void setTrackConnectionByTransaction(boolean trackConnectionByTransaction)
+ {
+ this.trackConnectionByTransaction = trackConnectionByTransaction;
+ }
+
+ /**
+ * Get the localTransactions.
+ *
+ * @return the localTransactions.
+ */
+ public boolean isLocalTransactions()
+ {
+ return localTransactions;
+ }
+
+ /**
+ * Set the localTransactions.
+ *
+ * @param localTransactions The localTransactions to set.
+ */
+ public void setLocalTransactions(boolean localTransactions)
+ {
+ this.localTransactions = localTransactions;
+ }
+
+}
Added: trunk/connector/src/main/org/jboss/resource/metadata/mcf/XAConnectionPropertyMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/XAConnectionPropertyMetaData.java (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/XAConnectionPropertyMetaData.java 2007-03-21 04:12:42 UTC (rev 61506)
@@ -0,0 +1,12 @@
+package org.jboss.resource.metadata.mcf;
+
+
+/**
+ * A XAConnectionPropertyMetaData.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public class XAConnectionPropertyMetaData extends DataSourceConnectionPropertyMetaData
+{
+}
Added: trunk/connector/src/main/org/jboss/resource/metadata/mcf/XADataSourceDeploymentMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/XADataSourceDeploymentMetaData.java (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/XADataSourceDeploymentMetaData.java 2007-03-21 04:12:42 UTC (rev 61506)
@@ -0,0 +1,91 @@
+package org.jboss.resource.metadata.mcf;
+
+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>
+ * @version $Revision: 1.1 $
+ */
+ 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-resource-timeout")
+ private int xaResourceTimeout;
+
+ public XADataSourceDeploymentMetaData()
+ {
+ setRarName(RAR_NAME);
+
+ }
+
+ public String getXaDataSourceClass()
+ {
+ return xaDataSourceClass;
+ }
+
+ public void setXaDataSourceClass(String xaDataSourceClass)
+ {
+ this.xaDataSourceClass = xaDataSourceClass;
+ }
+
+ public int getXaResourceTimeout()
+ {
+ return xaResourceTimeout;
+ }
+
+ public void setXaResourceTimeout(int xaResourceTimeout)
+ {
+ this.xaResourceTimeout = xaResourceTimeout;
+ }
+
+ @Override
+ public List<ManagedConnectionFactoryPropertyMetaData> getManagedConnectionFactoryProperties()
+ {
+ List<ManagedConnectionFactoryPropertyMetaData> properties = super.getManagedConnectionFactoryProperties();
+ ManagedConnectionFactoryPropertyMetaData property = null;
+
+ if(getXaDataSourceClass() != null)
+ {
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("XADataSourceClass");
+ property.setValue(getXaDataSourceClass());
+ }
+
+ List<DataSourceConnectionPropertyMetaData> dsProps = getDataSourceConnectionProperties();
+
+ StringBuffer dsBuff = new StringBuffer();
+
+ for (DataSourceConnectionPropertyMetaData data : dsProps)
+ {
+ dsBuff.append(data.getName() + "=" + data.getValue() + "\n");
+ }
+
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("XADataSourceProperties");
+ property.setValue(dsBuff.toString());
+ properties.add(property);
+
+ return properties;
+
+ }
+
+
+}
More information about the jboss-cvs-commits
mailing list