[jboss-cvs] JBossAS SVN: r60881 - trunk/connector/src/main/org/jboss/resource/deployment/ds.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sun Feb 25 08:59:05 EST 2007
Author: weston.price at jboss.com
Date: 2007-02-25 08:59:04 -0500 (Sun, 25 Feb 2007)
New Revision: 60881
Removed:
trunk/connector/src/main/org/jboss/resource/deployment/ds/DsDeployerException.java
trunk/connector/src/main/org/jboss/resource/deployment/ds/DsMBeanGenerator.java
trunk/connector/src/main/org/jboss/resource/deployment/ds/DsObjectModelFactory.java
trunk/connector/src/main/org/jboss/resource/deployment/ds/DsSubDeployer.java
trunk/connector/src/main/org/jboss/resource/deployment/ds/DsSubDeployerMBean.java
Log:
[JBAS-1425] Removing old implementation for programmatic deployment.
Deleted: trunk/connector/src/main/org/jboss/resource/deployment/ds/DsDeployerException.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/deployment/ds/DsDeployerException.java 2007-02-25 13:50:37 UTC (rev 60880)
+++ trunk/connector/src/main/org/jboss/resource/deployment/ds/DsDeployerException.java 2007-02-25 13:59:04 UTC (rev 60881)
@@ -1,56 +0,0 @@
-/*
- * 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.deployment.ds;
-
-/**
- * A DsDeployerException.
- *
- * @author <a href="weston.price at jboss.com">Weston Price</a>
- * @version $Revision$
- */
-public class DsDeployerException extends Exception
-{
- /** The serialVersionUID */
- private static final long serialVersionUID = 8405956896394470482L;
-
- public DsDeployerException()
- {
- super();
- }
-
- public DsDeployerException(String message)
- {
- super(message);
- }
-
- public DsDeployerException(Throwable cause)
- {
- super(cause);
- }
-
- public DsDeployerException(String message, Throwable cause)
- {
- super(message, cause);
- }
-
-}
Deleted: trunk/connector/src/main/org/jboss/resource/deployment/ds/DsMBeanGenerator.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/deployment/ds/DsMBeanGenerator.java 2007-02-25 13:50:37 UTC (rev 60880)
+++ trunk/connector/src/main/org/jboss/resource/deployment/ds/DsMBeanGenerator.java 2007-02-25 13:59:04 UTC (rev 60881)
@@ -1,39 +0,0 @@
-/*
- * 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.deployment.ds;
-
-import org.jboss.resource.deployment.ds.metadata.DsDefinitionMetaData;
-
-/**
- * A DsMBeanGenerator.
- *
- * @author <a href="weston.price at jboss.com">Weston Price</a>
- * @version $Revision$
- */
-public interface DsMBeanGenerator
-{
-
- public Object generateService(DsDefinitionMetaData metaData);
-
-
-}
Deleted: trunk/connector/src/main/org/jboss/resource/deployment/ds/DsObjectModelFactory.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/deployment/ds/DsObjectModelFactory.java 2007-02-25 13:50:37 UTC (rev 60880)
+++ trunk/connector/src/main/org/jboss/resource/deployment/ds/DsObjectModelFactory.java 2007-02-25 13:59:04 UTC (rev 60881)
@@ -1,606 +0,0 @@
-/*
- * 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.deployment.ds;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.logging.Logger;
-import org.jboss.resource.deployment.ds.metadata.AbstractConnectionFactoryMetaData;
-import org.jboss.resource.deployment.ds.metadata.AvailabilitySupportMetaData;
-import org.jboss.resource.deployment.ds.metadata.ConnectionFactoryMetaData;
-import org.jboss.resource.deployment.ds.metadata.ConnectionFactoryMetaDataFactory;
-import org.jboss.resource.deployment.ds.metadata.ConnectionPoolMetaData;
-import org.jboss.resource.deployment.ds.metadata.DataSourceMetaData;
-import org.jboss.resource.deployment.ds.metadata.DsDefinitionMetaData;
-import org.jboss.resource.deployment.ds.metadata.DsMetaData;
-import org.jboss.resource.deployment.ds.metadata.DsPropertyMetaData;
-import org.jboss.resource.deployment.ds.metadata.PoolCriteriaMetaData;
-import org.jboss.resource.deployment.ds.metadata.SqlSupportMetaData;
-import org.jboss.resource.deployment.ds.metadata.TransactionSupportFactory;
-import org.jboss.resource.deployment.ds.metadata.TransactionSupportMetaData;
-import org.jboss.xb.binding.ObjectModelFactory;
-import org.jboss.xb.binding.UnmarshallingContext;
-import org.xml.sax.Attributes;
-
-/**
- * Object Model Factory for a DataSource and ConnectionFactory deployment.
- *
- * @author <a href="weston.price at jboss.com">Weston Price</a>
- * @version $Revision$
- */
-public class DsObjectModelFactory implements ObjectModelFactory
-{
- /** The logger */
- private static final Logger log = Logger.getLogger(DsObjectModelFactory.class);
-
- /** The connectionPoolElementNames */
- private static final List connectionPoolElementNames = new ArrayList();
-
- /** The sqlSupportElementNames */
- private static final List sqlSupportElementNames = new ArrayList();
-
- /** The criteriaSupportElementNames */
- private static final List criteriaSupportElementNames = new ArrayList();
-
- /** The txnSupportElementnames */
- private static final List txnSupportElementnames = new ArrayList();
-
- private static final List availablitySupportElementNames = new ArrayList();
-
- static
- {
-
- //Element names for ConnectionPool support
- connectionPoolElementNames.add("min-pool-size");
- connectionPoolElementNames.add("max-pool-size");
- connectionPoolElementNames.add("blocking-timeout-millis");
- connectionPoolElementNames.add("idle-timeout-minutes");
- connectionPoolElementNames.add("prefill");
- connectionPoolElementNames.add("background-validation");
- connectionPoolElementNames.add("background-validtion-interval");
- connectionPoolElementNames.add("validate-on-match");
- connectionPoolElementNames.add("no-tx-separate-pools");
-
- //Element names for SqlSupport
- sqlSupportElementNames.add("new-connection-sql");
- sqlSupportElementNames.add("check-valid-connection-sql");
- sqlSupportElementNames.add("valid-connection-checker-class-name");
- sqlSupportElementNames.add("exception-sorter-class-name");
- sqlSupportElementNames.add("prepared-statement-cache-size");
- sqlSupportElementNames.add("share-prepared-statements");
- sqlSupportElementNames.add("track-statements");
- sqlSupportElementNames.add("query-timeout");
- sqlSupportElementNames.add("set-tx-query-timeout");
- sqlSupportElementNames.add("transaction-isolation");
-
- criteriaSupportElementNames.add("application-managed-security");
- criteriaSupportElementNames.add("security-domain");
- criteriaSupportElementNames.add("security-domain-and-application");
-
- txnSupportElementnames.add("no-tx-datasource");
- txnSupportElementnames.add("local-tx-datasource");
- txnSupportElementnames.add("xa-datasource");
- txnSupportElementnames.add("no-tx-connection-factory");
- txnSupportElementnames.add("tx-connection-factory");
- txnSupportElementnames.add("ha-local-tx-datasource");
- txnSupportElementnames.add("ha-xa-datasource");
-
- availablitySupportElementNames.add("ha-local-tx-datasource");
- availablitySupportElementNames.add("ha-xa-datasource");
-
- }
-
- /** Trace enabled */
- private boolean trace = log.isTraceEnabled();
-
- public Object newRoot(Object root, UnmarshallingContext navigator, String namespaceURI, String localName,
- Attributes attrs)
- {
- checkRoot(localName);
- DsMetaData md = new DsMetaData();
- final DsDefinitionMetaData dsdmd = ConnectionFactoryMetaDataFactory.getDefinitionMetaData(localName);
- md.setDsDefinitionMetaData(dsdmd);
- return dsdmd;
- }
-
- public Object newChild(DsDefinitionMetaData md, UnmarshallingContext navigator, String namespaceURI,
- String localName, Attributes attrs)
- {
- AbstractConnectionFactoryMetaData abmd = ConnectionFactoryMetaDataFactory.getFactoryMetaData(localName);
- md.addDsDefinition(abmd);
- return abmd;
-
- }
-
- public Object addChild(DsDefinitionMetaData md, ConnectionFactoryMetaData cfmd, UnmarshallingContext navigator,
- String namespaceURI, String localName)
- {
- if (txnSupportElementnames.contains(localName))
- {
- TransactionSupportMetaData txmd = handleTransactionSupportMetaData(cfmd, localName);
- cfmd.setTxnSupport(txmd);
-
- }
-
- return cfmd;
-
- }
-
- public Object addChild(DsDefinitionMetaData md, DataSourceMetaData dsmd, UnmarshallingContext navigator,
- String namespaceURI, String localName)
- {
-
- if (txnSupportElementnames.contains(localName))
- {
-
- TransactionSupportMetaData txmd = handleTransactionSupportMetaData(dsmd, localName);
- dsmd.setTxnSupport(txmd);
-
- }
-
- if (availablitySupportElementNames.contains(localName))
- {
- AvailabilitySupportMetaData amd = handleAvailabilitySupportMetaData(dsmd, localName);
- dsmd.setAvailabilitySupport(amd);
-
- }
-
- if (localName.equals("no-tx-datasource") || localName.equals("local-tx-datasource"))
- {
- dsmd.setRarName("jboss-local-jdbc.rar");
- dsmd.setConnectionDefintion("javax.sql.DataSource");
-
- }
- else if (localName.equals("xa-tx-datasource"))
- {
- dsmd.setRarName("jboss-xa-jdbc.rar");
- dsmd.setConnectionDefintion("javax.sql.DataSource");
-
- }
- else if (localName.equals("ha-local-tx-datasource"))
- {
- dsmd.setRarName("jboss-ha-local-jdbc.rar");
- dsmd.setConnectionDefintion("javax.sql.DataSource");
-
- }
- else if (localName.equals("ha-xa-datasource"))
- {
- dsmd.setRarName("jboss-ha-xa-jdbc.rar");
- dsmd.setConnectionDefintion("javax.sql.DataSource");
-
- }
-
-
- return dsmd;
-
- }
-
- public Object newChild(ConnectionFactoryMetaData cfmd, UnmarshallingContext navigator, String namespaceURI,
- String localName, Attributes attrs)
- {
-
- if (localName.equals("config-property"))
- {
- DsPropertyMetaData pmd = handlePropertyMetaData(localName, attrs);
- cfmd.addProperty(pmd);
- return pmd;
- }
- else if (connectionPoolElementNames.contains(localName))
- {
- return handlePoolMetaData(cfmd);
-
- }
- else if (criteriaSupportElementNames.contains(localName))
- {
- return handlePoolCriteriaMetaData(cfmd, localName);
-
- }
- else if (localName.equals("local-transaction") || localName.equals("xa-transaction"))
- {
- //Note, this is probably already set, but because the element structure
- //is fundamentally different than datasource, we have to hack this
- cfmd.setTxnSupport(TransactionSupportFactory.getTransactionSupport(localName));
-
- }
-
- return null;
- }
-
- public Object newChild(DataSourceMetaData dsmd, UnmarshallingContext navigator, String namespaceURI,
- String localName, Attributes attrs)
- {
-
- if (localName.equals("connection-property") || localName.equals("xa-datasource-property"))
- {
- DsPropertyMetaData pmd = handlePropertyMetaData(localName, attrs);
- dsmd.addProperty(pmd);
- return pmd;
-
- }
-
- else if (sqlSupportElementNames.contains(localName))
- {
- return handleSqlSupportMetaData(dsmd);
-
- }
- else if (connectionPoolElementNames.contains(localName))
- {
- return handlePoolMetaData(dsmd);
-
- }
- else if (criteriaSupportElementNames.contains(localName))
- {
- return handlePoolCriteriaMetaData(dsmd, localName);
-
- }
-
- return null;
-
- }
-
- public void setValue(final DsPropertyMetaData dsmd, UnmarshallingContext navigator, String namespaceURI,
- String localName, String value)
- {
- dsmd.setValue(value);
-
- }
-
- public void setValue(final ConnectionFactoryMetaData cfmd, UnmarshallingContext navigator, String namespaceURI,
- String localName, String value)
- {
- if (localName.equals("jndi-name"))
- {
- cfmd.setJndiName(value);
-
- }
- else if (localName.equals("use-java-context"))
- {
- cfmd.setUseJavaConext(Boolean.valueOf(localName).booleanValue());
-
- }
- else if (localName.equals("connection-definition"))
- {
- cfmd.setConnectionDefintion(localName);
- }
-
- }
-
- public void setValue(final DataSourceMetaData dsmd, UnmarshallingContext navigator, String namespaceURI,
- String localName, String value)
- {
-
- if (localName.equals("jndi-name"))
- {
- dsmd.setJndiName(value);
-
- }
- else if (localName.equals("use-java-context"))
- {
- dsmd.setUseJavaConext(Boolean.valueOf(localName).booleanValue());
-
- }
- else if (localName.equals("connection-definition"))
- {
- dsmd.setConnectionDefintion(localName);
- }
- else if (localName.equals("xa-datasource-class"))
- {
- dsmd.setDriverClass(value);
-
- }
- else if (localName.equals("isSameRM-override-value"))
- {
- dsmd.setSameRMOverride(Boolean.valueOf(value).booleanValue());
-
- }
- else if (localName.equals("type-mapping"))
- {
- dsmd.setTypeMapping(value);
-
- }
- else if(localName.equals("username"))
- {
- dsmd.setUserName(value);
- }
- else if(localName.equals("password"))
- {
- dsmd.setPassWord(value);
-
- }
- else if(localName.equals("connection-url"))
- {
- dsmd.setConnectionUrl(value);
-
- }else if(localName.equals("driver-class") || localName.equals("xa-datasource-class"))
- {
- dsmd.setDriverClass(value);
-
- }else if(localName.equals("url-delimeter"))
- {
-
- dsmd.getAvailabilitySupport().setUrlDelimeter(value);
-
- }else if(localName.equals("url-property"))
- {
- dsmd.getAvailabilitySupport().setUrlProperty(value);
-
- }
-
- else
- {
- //TODO throw here
- }
-
- }
-
- public void setValue(final ConnectionPoolMetaData cpmd, UnmarshallingContext navigator, String namespaceURI,
- String localName, String value)
- {
-
- if (localName.equals("min-pool-size"))
- {
- cpmd.setMinPoolSize(Integer.valueOf(value).intValue());
- }
- else if (localName.equals("max-pool-size"))
- {
- cpmd.setMaxPoolSize(Integer.valueOf(value).intValue());
- }
- else if (localName.equals("blocking-timeout-millis"))
- {
- cpmd.setBlockingTimeoutMilliseconds(Long.valueOf(value).longValue());
- }
- else if (localName.equals("idle-timeout-minutes"))
- {
- cpmd.setIdleTimeoutMinutes(Integer.valueOf(value).intValue());
-
- }
- else if (localName.equals("security-damain") || localName.equals("application-managed-security")
- || localName.equals("security-domain-and-application"))
- {
- cpmd.setPoolCriteria(PoolCriteriaMetaData.fromDsElement(localName));
-
- }
- else if (localName.equals("background-validation"))
- {
- cpmd.setBackgroundValidation(Boolean.valueOf(value).booleanValue());
-
- }
- else if (localName.equals("background-validation-interval"))
- {
- cpmd.setBackgroundValidationInterval(Integer.valueOf(value).intValue());
-
- }
- else if (localName.equals("no-tx-separate-pools"))
- {
- cpmd.setNoTxSeperatePool(Boolean.valueOf(value).booleanValue());
-
- }
- else if (localName.equals("prefill"))
- {
- cpmd.setPrefill(Boolean.valueOf(value).booleanValue());
-
- }
-
- else
- {
-
- throw new IllegalArgumentException("Unknown connection pool setValue: nuri=" + namespaceURI + " localName="
- + localName + " value=" + value);
-
- }
-
- }
-
- public void setValue(final SqlSupportMetaData sqlmd, UnmarshallingContext navigator, String namespaceURI,
- String localName, String value)
- {
-
- if (localName.equals("prepared-statement-cache-size"))
- {
- sqlmd.setPreparedStatementCacheSize(new Integer(value).intValue());
-
- }
- else if (localName.equals("share-prepared-statements"))
- {
- sqlmd.setShareStatements(Boolean.valueOf(value).booleanValue());
- }
- else if (localName.equals("track-statements"))
- {
- sqlmd.setTrackStatements(Boolean.valueOf(value).booleanValue());
-
- }
- else if (localName.equals("new-connection-sql"))
- {
-
- sqlmd.setNewConnectionSql(value);
-
- }
- else if (localName.equals("check-valid-connection-sql"))
- {
-
- sqlmd.setCheckValidConnectionSql(value);
-
- }
- else if (localName.equals("valid-connection-checker-class-name"))
- {
-
- sqlmd.setValidConnectionCheckerClassName(value);
-
- }
- else if (localName.equals("exception-sorter-class-name"))
- {
-
- sqlmd.setExceptionSorterClassName(value);
-
- }
- else if (localName.equals("query-timeout"))
- {
- sqlmd.setQueryTimeout(Integer.valueOf(value).intValue());
-
- }
- else if (localName.equals("set-tx-query-timeout"))
- {
- sqlmd.setTxQueryTimeout(true);
-
- }else if(localName.equals("track-statements"))
- {
-
- if(value.equals("nowarn"))
- {
- sqlmd.setTrackStatements(Boolean.TRUE.booleanValue());
- sqlmd.setTrackStatementsNoWarn(Boolean.TRUE.booleanValue());
-
- }else if(value.equals("true"))
- {
- sqlmd.setTrackStatements(Boolean.TRUE.booleanValue());
-
- }
-
-
- }
- }
-
- public Object completeRoot(Object root, UnmarshallingContext ctx, String uri, String name)
- {
- return root;
- }
-
- private void checkRoot(String localName)
- {
- if (!localName.equals("datasources") && !localName.equals("connection-factories"))
- {
-
- throw new IllegalStateException(
- "Unexpected root element: was expecting 'datasources' or 'connection-factories' but got '" + localName
- + "'");
- }
-
- }
-
- private DsPropertyMetaData handlePropertyMetaData(String localName, Attributes attrs)
- {
- DsPropertyMetaData pmd = new DsPropertyMetaData();
-
- if (attrs != null && attrs.getLength() > 0)
- {
- for (int i = 0; i < attrs.getLength(); i++)
- {
- if (attrs.getLocalName(i).equals("name"))
- {
- pmd.setName(attrs.getValue(i));
-
- }
- if (attrs.getLocalName(i).equals("type"))
- {
- pmd.setType(attrs.getValue(i));
-
- }
- }
- }
- return pmd;
- }
-
- private ConnectionPoolMetaData handlePoolCriteriaMetaData(ConnectionFactoryMetaData cfmd, String localName)
- {
-
- ConnectionPoolMetaData cpmd = cfmd.getPoolMetaData();
-
- if (cpmd == null)
- {
- cpmd = new ConnectionPoolMetaData();
- }
-
- if (cpmd.getPoolCriteria().equals(PoolCriteriaMetaData.NOTHING))
- {
- PoolCriteriaMetaData pcmd = PoolCriteriaMetaData.fromDsElement(localName);
- cpmd.setPoolCriteria(pcmd);
-
- }
-
- return cpmd;
-
- }
-
- private ConnectionPoolMetaData handlePoolMetaData(ConnectionFactoryMetaData cfmd)
- {
-
- ConnectionPoolMetaData cpmd = cfmd.getPoolMetaData();
-
- if (cpmd == null)
- {
-
- cpmd = new ConnectionPoolMetaData();
- cfmd.setPoolMetaData(cpmd);
-
- }
-
- return cpmd;
-
- }
-
- private SqlSupportMetaData handleSqlSupportMetaData(DataSourceMetaData dsmd)
- {
-
- SqlSupportMetaData sqlmd = dsmd.getSqlSupport();
-
- if (sqlmd == null)
- {
- sqlmd = new SqlSupportMetaData();
- dsmd.setSqlSupportMetaData(sqlmd);
-
- }
-
- return sqlmd;
-
- }
-
- private TransactionSupportMetaData handleTransactionSupportMetaData(ConnectionFactoryMetaData cfmd, String localName)
- {
- TransactionSupportMetaData txmd = cfmd.getTxnSupport();
-
- if (txmd == null)
- {
-
- txmd = TransactionSupportMetaData.fromString(localName);
- cfmd.setTxnSupport(txmd);
-
- }
-
- return txmd;
-
- }
-
- private AvailabilitySupportMetaData handleAvailabilitySupportMetaData(DataSourceMetaData dsmd, String localName)
- {
- AvailabilitySupportMetaData amd = dsmd.getAvailabilitySupport();
-
- if (amd == null || amd.equals(AvailabilitySupportMetaData.NONE))
- {
- amd = AvailabilitySupportMetaData.fromString(localName);
-
- }
-
- return amd;
-
- }
-}
Deleted: trunk/connector/src/main/org/jboss/resource/deployment/ds/DsSubDeployer.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/deployment/ds/DsSubDeployer.java 2007-02-25 13:50:37 UTC (rev 60880)
+++ trunk/connector/src/main/org/jboss/resource/deployment/ds/DsSubDeployer.java 2007-02-25 13:59:04 UTC (rev 60881)
@@ -1,203 +0,0 @@
-/*
- * 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.deployment.ds;
-
-import java.net.URL;
-
-import javax.management.ObjectName;
-
-import org.jboss.deployment.DeploymentException;
-import org.jboss.deployment.DeploymentInfo;
-import org.jboss.deployment.ObjectModelFactorySimpleSubDeployerSupport;
-import org.jboss.deployment.SARDeployerMBean;
-import org.jboss.deployment.SubDeployer;
-import org.jboss.mx.util.MBeanProxyExt;
-import org.jboss.resource.deployment.ds.builder.DsMetaDataBuilder;
-import org.jboss.resource.deployment.ds.builder.DsMetaDataBuilderFactory;
-import org.jboss.xb.binding.ObjectModelFactory;
-
-/**
- * A DsSubDeployer.
- *
- * @author <a href="weston.price at jboss.com">Weston Price</a>
- * @version $Revision$
- */
-public class DsSubDeployer extends ObjectModelFactorySimpleSubDeployerSupport implements DsSubDeployerMBean
-{
-
- /** The delegateName */
- protected ObjectName delegateName = SARDeployerMBean.OBJECT_NAME;
-
- /** The packageSuffix */
- protected String packageSuffix;
-
- /** The ddSuffix */
- protected String ddSuffix;
-
- /** The delegate */
- protected SubDeployer delegate;
-
- /** The validateDtds */
- private boolean validateDtds;
-
- private String builderName;
-
- private DsMetaDataBuilder builder = DsMetaDataBuilderFactory.getBuilder("");
-
- /**
- * Create a new DsSubDeployer.
- *
- */
- public DsSubDeployer()
- {
-
- }
-
- public ObjectModelFactory getObjectModelFactory()
- {
- return new DsObjectModelFactory();
- }
-
- public String getExtension()
- {
- return null;
- }
-
- public String getMetaDataURL()
- {
- return null;
- }
-
- public String getObjectName(DeploymentInfo di) throws DeploymentException
- {
- return null;
- }
-
- public String getDeploymentClass()
- {
- return null;
- }
-
- public String getDdSuffix()
- {
- return ddSuffix;
- }
-
- public ObjectName getDelegateName()
- {
-
- return delegateName;
-
- }
-
- public String getPackageSuffix()
- {
- return packageSuffix;
- }
-
- public boolean getValidateDTDs()
- {
-
- return validateDtds;
- }
-
- public void setDdSuffix(String ddSuffix)
- {
-
- this.ddSuffix = ddSuffix;
- }
-
- public void setDelegateName(ObjectName delegateName)
- {
-
- this.delegateName = delegateName;
- }
-
- public void setPackageSuffix(String packageSuffix)
- {
-
- this.packageSuffix = packageSuffix;
- }
-
- public void setValidateDTDs(boolean validate)
- {
-
- this.validateDtds = validate;
-
- }
-
- protected void parseMetaData(DeploymentInfo di, URL url) throws DeploymentException
- {
- try
- {
- di.metaData = builder.parse(url);
- }
-
- catch (DsDeployerException e)
- {
- throw new DeploymentException(e.getMessage(), e);
-
- }
-
-
- }
-
- protected void startService() throws Exception
- {
-
- builder = DsMetaDataBuilderFactory.getBuilder(builderName);
-
-
- }
-
- protected void createService() throws Exception
- {
-
- super.createService();
-
- delegate = (SubDeployer) MBeanProxyExt.create(SubDeployer.class, delegateName, server);
-
- }
-
- protected void destroyService() throws Exception
- {
- super.destroyService();
- }
-
- public boolean accepts(DeploymentInfo di)
- {
-
- String urlStr = di.url.toString();
- return (packageSuffix != null && (urlStr.endsWith(packageSuffix) || urlStr.endsWith(packageSuffix + "/")))
- || (ddSuffix != null && urlStr.endsWith(ddSuffix));
- }
-
- public String getBuilderName()
- {
- return builderName;
- }
-
- public void setBuilderName(String builderName)
- {
- this.builderName = builderName;
- }
-}
Deleted: trunk/connector/src/main/org/jboss/resource/deployment/ds/DsSubDeployerMBean.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/deployment/ds/DsSubDeployerMBean.java 2007-02-25 13:50:37 UTC (rev 60880)
+++ trunk/connector/src/main/org/jboss/resource/deployment/ds/DsSubDeployerMBean.java 2007-02-25 13:59:04 UTC (rev 60881)
@@ -1,104 +0,0 @@
-/*
- * 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.deployment.ds;
-
-import javax.management.ObjectName;
-
-import org.jboss.deployment.SubDeployerExtMBean;
-import org.jboss.mx.util.ObjectNameFactory;
-
-/**
- *
- * The DsSubDeployer Management interface.
- *
- * @author <a href="weston.price at jboss.com">Weston Price</a>
- * @version $Revision$
- */
-public interface DsSubDeployerMBean extends SubDeployerExtMBean
-{
-
- /** The OBJECT_NAME */
- static final ObjectName OBJECT_NAME = ObjectNameFactory.create("jboss.jca:service=DsDeployer");
-
- /**
- * FIXME Comment this
- *
- * @param packageSuffix
- */
- void setPackageSuffix(String packageSuffix);
-
- /**
- * FIXME Comment this
- *
- * @return
- */
- String getPackageSuffix();
-
- /**
- * FIXME Comment this
- *
- * @param ddSuffix
- */
- void setDdSuffix(String ddSuffix);
-
- /**
- * FIXME Comment this
- *
- * @return
- */
- String getDdSuffix();
-
- /**
- * FIXME Comment this
- *
- * @param delegateName
- */
- void setDelegateName(ObjectName delegateName);
-
- /**
- * FIXME Comment this
- *
- * @return
- */
- ObjectName getDelegateName();
-
- /**
- * FIXME Comment this
- *
- * @param validate
- */
- void setValidateDTDs(boolean validate);
-
- /**
- * FIXME Comment this
- *
- * @return
- */
- boolean getValidateDTDs();
-
- public void setBuilderName(String builderName);
-
- public String getBuilderName();
-
-
-}
More information about the jboss-cvs-commits
mailing list