[jboss-cvs] JBossAS SVN: r81005 - in trunk/connector/src/main/org/jboss/resource: adapter/jdbc/jdk5 and 14 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Nov 14 07:18:36 EST 2008
Author: dimitris at jboss.org
Date: 2008-11-14 07:18:35 -0500 (Fri, 14 Nov 2008)
New Revision: 81005
Modified:
trunk/connector/src/main/org/jboss/resource/adapter/jdbc/JBossWrapper.java
trunk/connector/src/main/org/jboss/resource/adapter/jdbc/URLSelectorStrategy.java
trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedConnectionFactory.java
trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/CachedCallableStatementJDK5.java
trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/CachedPreparedStatementJDK5.java
trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedCallableStatementJDK5.java
trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedConnectionFactoryJDK5.java
trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedConnectionJDK5.java
trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedPreparedStatementJDK5.java
trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedResultSetJDK5.java
trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedStatementJDK5.java
trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/CachedCallableStatementJDK6.java
trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/CachedPreparedStatementJDK6.java
trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedCallableStatementJDK6.java
trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedConnectionFactoryJDK6.java
trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedConnectionJDK6.java
trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedPreparedStatementJDK6.java
trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedResultSetJDK6.java
trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedStatementJDK6.java
trunk/connector/src/main/org/jboss/resource/adapter/jdbc/vendor/DB2StaleConnectionChecker.java
trunk/connector/src/main/org/jboss/resource/adapter/jdbc/vendor/MSSQLValidConnectionChecker.java
trunk/connector/src/main/org/jboss/resource/adapter/jdbc/vendor/MySQLReplicationValidConnectionChecker.java
trunk/connector/src/main/org/jboss/resource/adapter/jdbc/vendor/OracleStaleConnectionChecker.java
trunk/connector/src/main/org/jboss/resource/adapter/jdbc/vendor/SybaseValidConnectionChecker.java
trunk/connector/src/main/org/jboss/resource/adapter/jms/JmsMessageProducer.java
trunk/connector/src/main/org/jboss/resource/adapter/jms/JmsQueueSender.java
trunk/connector/src/main/org/jboss/resource/adapter/jms/JmsTopicPublisher.java
trunk/connector/src/main/org/jboss/resource/adapter/jms/JmsXAResource.java
trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/IMAPMailFolder.java
trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/IMAPsMailFolder.java
trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/POP3MailFolder.java
trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/POP3sMailFolder.java
trunk/connector/src/main/org/jboss/resource/adapter/quartz/inflow/JBossQuartzThreadPool.java
trunk/connector/src/main/org/jboss/resource/connectionmanager/IdleConnectionRemovalSupport.java
trunk/connector/src/main/org/jboss/resource/connectionmanager/JTATransactionChecker.java
trunk/connector/src/main/org/jboss/resource/connectionmanager/ManagedConnectionFactoryDeployment.java
trunk/connector/src/main/org/jboss/resource/connectionmanager/SecurityActions.java
trunk/connector/src/main/org/jboss/resource/connectionmanager/xa/XAResourceWrapperImpl.java
trunk/connector/src/main/org/jboss/resource/connectionmanager/xa/XidWrapper.java
trunk/connector/src/main/org/jboss/resource/connectionmanager/xa/XidWrapperImpl.java
trunk/connector/src/main/org/jboss/resource/deployers/ManagedConnectionFactoryClassLoaderDeployer.java
trunk/connector/src/main/org/jboss/resource/deployers/ManagedConnectionFactoryDeployer.java
trunk/connector/src/main/org/jboss/resource/deployers/ManagedConnectionFactoryParserDeployer.java
trunk/connector/src/main/org/jboss/resource/deployers/RARDeployer.java
trunk/connector/src/main/org/jboss/resource/deployers/RARDeployment.java
trunk/connector/src/main/org/jboss/resource/deployers/RARParserDeployer.java
trunk/connector/src/main/org/jboss/resource/deployers/builder/AbstractBuilder.java
trunk/connector/src/main/org/jboss/resource/deployers/builder/ConnectionFactoryBindingBuilder.java
trunk/connector/src/main/org/jboss/resource/deployers/builder/ConnectionManagerBuilder.java
trunk/connector/src/main/org/jboss/resource/deployers/builder/ManagedConnectionFactoryBuilder.java
trunk/connector/src/main/org/jboss/resource/deployers/builder/ManagedConnectionPoolBuilder.java
trunk/connector/src/main/org/jboss/resource/deployers/builder/MetaDataTypeMappingBuilder.java
trunk/connector/src/main/org/jboss/resource/deployers/management/XAConnectionFactoryProperty.java
trunk/connector/src/main/org/jboss/resource/metadata/DependsMetaData.java
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/DBMSMetaData.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/LoaderRepositoryAdapter.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/LocalDataSourceDeploymentMetaData.java
trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionEmptyContentAdapter.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
trunk/connector/src/main/org/jboss/resource/metadata/repository/DefaultJCAEntryFormatter.java
trunk/connector/src/main/org/jboss/resource/metadata/repository/DefaultJCAMetaDataRepository.java
trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAConnectorMetaDataEntry.java
trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAConnectorMetaDataKey.java
trunk/connector/src/main/org/jboss/resource/metadata/repository/JCADeploymentMetaDataEntry.java
trunk/connector/src/main/org/jboss/resource/metadata/repository/JCADeploymentType.java
trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAMetaDataEntryFormatter.java
trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAMetaDataRepository.java
trunk/connector/src/main/org/jboss/resource/statistic/JBossConnectionStatistics.java
Log:
JBAS-3916, use the right copyright header
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/JBossWrapper.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/JBossWrapper.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/JBossWrapper.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,62 +1,62 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jdbc;
-
-import java.io.Serializable;
-import java.sql.SQLException;
-
-/**
- * JBossWrapper.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class JBossWrapper implements Serializable
-{
- /** The serialVersionUID */
- private static final long serialVersionUID = -4018404397552543628L;
-
- public boolean isWrapperFor(Class<?> iface) throws SQLException
- {
- if (iface == null)
- throw new IllegalArgumentException("Null interface");
- Object wrapped = getWrappedObject();
- if (wrapped == null)
- return false;
- return iface.isAssignableFrom(wrapped.getClass());
- }
-
- public <T> T unwrap(Class<T> iface) throws SQLException
- {
- if (iface == null)
- throw new IllegalArgumentException("Null interface");
- Object wrapped = getWrappedObject();
- if (wrapped != null && iface.isAssignableFrom(wrapped.getClass()))
- return iface.cast(wrapped);
- throw new SQLException("Not a wrapper for: " + iface.getName());
- }
-
- protected Object getWrappedObject() throws SQLException
- {
- return null;
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jdbc;
+
+import java.io.Serializable;
+import java.sql.SQLException;
+
+/**
+ * JBossWrapper.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class JBossWrapper implements Serializable
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -4018404397552543628L;
+
+ public boolean isWrapperFor(Class<?> iface) throws SQLException
+ {
+ if (iface == null)
+ throw new IllegalArgumentException("Null interface");
+ Object wrapped = getWrappedObject();
+ if (wrapped == null)
+ return false;
+ return iface.isAssignableFrom(wrapped.getClass());
+ }
+
+ public <T> T unwrap(Class<T> iface) throws SQLException
+ {
+ if (iface == null)
+ throw new IllegalArgumentException("Null interface");
+ Object wrapped = getWrappedObject();
+ if (wrapped != null && iface.isAssignableFrom(wrapped.getClass()))
+ return iface.cast(wrapped);
+ throw new SQLException("Not a wrapper for: " + iface.getName());
+ }
+
+ protected Object getWrappedObject() throws SQLException
+ {
+ return null;
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/URLSelectorStrategy.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/URLSelectorStrategy.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/URLSelectorStrategy.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,44 +1,44 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jdbc;
-
-import java.util.List;
-
-/**
- * URLSelectorStrategy
- *
- * @author <a href="mailto:vkak at redhat.com">Vicky Kak</a>
- *
- */
-
-public interface URLSelectorStrategy
-{
- public List getAllUrlObjects();
-
- public void failedUrlObject(Object urlObject);
-
- // The custom logic should go here.
- public List getCustomSortedUrls();
-
- public Object getUrlObject();
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jdbc;
+
+import java.util.List;
+
+/**
+ * URLSelectorStrategy
+ *
+ * @author <a href="mailto:vkak at redhat.com">Vicky Kak</a>
+ *
+ */
+
+public interface URLSelectorStrategy
+{
+ public List getAllUrlObjects();
+
+ public void failedUrlObject(Object urlObject);
+
+ // The custom logic should go here.
+ public List getCustomSortedUrls();
+
+ public Object getUrlObject();
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedConnectionFactory.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedConnectionFactory.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/WrappedConnectionFactory.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,41 +1,41 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jdbc;
-
-import java.sql.CallableStatement;
-import java.sql.PreparedStatement;
-import java.sql.SQLException;
-
-/**
- * WrappedConnectionFactory.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public interface WrappedConnectionFactory
-{
- WrappedConnection createWrappedConnection(BaseWrapperManagedConnection mc);
-
- CachedPreparedStatement createCachedPreparedStatement(PreparedStatement ps) throws SQLException;
-
- CachedCallableStatement createCachedCallableStatement(CallableStatement cs) throws SQLException;
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jdbc;
+
+import java.sql.CallableStatement;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+/**
+ * WrappedConnectionFactory.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public interface WrappedConnectionFactory
+{
+ WrappedConnection createWrappedConnection(BaseWrapperManagedConnection mc);
+
+ CachedPreparedStatement createCachedPreparedStatement(PreparedStatement ps) throws SQLException;
+
+ CachedCallableStatement createCachedCallableStatement(CallableStatement cs) throws SQLException;
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/CachedCallableStatementJDK5.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/CachedCallableStatementJDK5.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/CachedCallableStatementJDK5.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,42 +1,42 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jdbc.jdk5;
-
-import java.sql.CallableStatement;
-import java.sql.SQLException;
-
-import org.jboss.resource.adapter.jdbc.CachedCallableStatement;
-
-/**
- * CachedCallableStatementJDK5.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
- at SuppressWarnings("deprecation")
-public class CachedCallableStatementJDK5 extends CachedCallableStatement
-{
- public CachedCallableStatementJDK5(CallableStatement cs) throws SQLException
- {
- super(cs);
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jdbc.jdk5;
+
+import java.sql.CallableStatement;
+import java.sql.SQLException;
+
+import org.jboss.resource.adapter.jdbc.CachedCallableStatement;
+
+/**
+ * CachedCallableStatementJDK5.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at SuppressWarnings("deprecation")
+public class CachedCallableStatementJDK5 extends CachedCallableStatement
+{
+ public CachedCallableStatementJDK5(CallableStatement cs) throws SQLException
+ {
+ super(cs);
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/CachedPreparedStatementJDK5.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/CachedPreparedStatementJDK5.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/CachedPreparedStatementJDK5.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,42 +1,42 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jdbc.jdk5;
-
-import java.sql.PreparedStatement;
-import java.sql.SQLException;
-
-import org.jboss.resource.adapter.jdbc.CachedPreparedStatement;
-
-/**
- * CachedPreparedStatementJDK5.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class CachedPreparedStatementJDK5 extends CachedPreparedStatement
-{
- public CachedPreparedStatementJDK5(PreparedStatement ps) throws SQLException
- {
- super(ps);
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jdbc.jdk5;
+
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+import org.jboss.resource.adapter.jdbc.CachedPreparedStatement;
+
+/**
+ * CachedPreparedStatementJDK5.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class CachedPreparedStatementJDK5 extends CachedPreparedStatement
+{
+ public CachedPreparedStatementJDK5(PreparedStatement ps) throws SQLException
+ {
+ super(ps);
+ }
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedCallableStatementJDK5.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedCallableStatementJDK5.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedCallableStatementJDK5.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,49 +1,49 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jdbc.jdk5;
-
-import java.sql.CallableStatement;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-
-import org.jboss.resource.adapter.jdbc.WrappedCallableStatement;
-import org.jboss.resource.adapter.jdbc.WrappedPreparedStatement;
-import org.jboss.resource.adapter.jdbc.WrappedResultSet;
-
-/**
- * WrappedCallableStatementJDK5.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class WrappedCallableStatementJDK5 extends WrappedCallableStatement
-{
- public WrappedCallableStatementJDK5(WrappedConnectionJDK5 lc, CallableStatement s)
- {
- super(lc, s);
- }
-
- protected WrappedResultSet wrapResultSet(ResultSet resultSet)
- {
- return new WrappedResultSetJDK5(this, resultSet);
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jdbc.jdk5;
+
+import java.sql.CallableStatement;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+
+import org.jboss.resource.adapter.jdbc.WrappedCallableStatement;
+import org.jboss.resource.adapter.jdbc.WrappedPreparedStatement;
+import org.jboss.resource.adapter.jdbc.WrappedResultSet;
+
+/**
+ * WrappedCallableStatementJDK5.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class WrappedCallableStatementJDK5 extends WrappedCallableStatement
+{
+ public WrappedCallableStatementJDK5(WrappedConnectionJDK5 lc, CallableStatement s)
+ {
+ super(lc, s);
+ }
+
+ protected WrappedResultSet wrapResultSet(ResultSet resultSet)
+ {
+ return new WrappedResultSetJDK5(this, resultSet);
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedConnectionFactoryJDK5.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedConnectionFactoryJDK5.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedConnectionFactoryJDK5.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,56 +1,56 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jdbc.jdk5;
-
-import java.sql.CallableStatement;
-import java.sql.PreparedStatement;
-import java.sql.SQLException;
-
-import org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection;
-import org.jboss.resource.adapter.jdbc.CachedCallableStatement;
-import org.jboss.resource.adapter.jdbc.CachedPreparedStatement;
-import org.jboss.resource.adapter.jdbc.WrappedConnection;
-import org.jboss.resource.adapter.jdbc.WrappedConnectionFactory;
-
-/**
- * WrappedConnectionFactoryJDK5
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class WrappedConnectionFactoryJDK5 implements WrappedConnectionFactory
-{
- public WrappedConnection createWrappedConnection(BaseWrapperManagedConnection mc)
- {
- return new WrappedConnectionJDK5(mc);
- }
-
- public CachedPreparedStatement createCachedPreparedStatement(PreparedStatement ps) throws SQLException
- {
- return new CachedPreparedStatementJDK5(ps);
- }
-
- public CachedCallableStatement createCachedCallableStatement(CallableStatement cs) throws SQLException
- {
- return new CachedCallableStatementJDK5(cs);
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jdbc.jdk5;
+
+import java.sql.CallableStatement;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+import org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection;
+import org.jboss.resource.adapter.jdbc.CachedCallableStatement;
+import org.jboss.resource.adapter.jdbc.CachedPreparedStatement;
+import org.jboss.resource.adapter.jdbc.WrappedConnection;
+import org.jboss.resource.adapter.jdbc.WrappedConnectionFactory;
+
+/**
+ * WrappedConnectionFactoryJDK5
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class WrappedConnectionFactoryJDK5 implements WrappedConnectionFactory
+{
+ public WrappedConnection createWrappedConnection(BaseWrapperManagedConnection mc)
+ {
+ return new WrappedConnectionJDK5(mc);
+ }
+
+ public CachedPreparedStatement createCachedPreparedStatement(PreparedStatement ps) throws SQLException
+ {
+ return new CachedPreparedStatementJDK5(ps);
+ }
+
+ public CachedCallableStatement createCachedCallableStatement(CallableStatement cs) throws SQLException
+ {
+ return new CachedCallableStatementJDK5(cs);
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedConnectionJDK5.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedConnectionJDK5.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedConnectionJDK5.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,66 +1,66 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jdbc.jdk5;
-
-import java.sql.CallableStatement;
-import java.sql.PreparedStatement;
-import java.sql.Statement;
-
-import org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection;
-import org.jboss.resource.adapter.jdbc.WrappedCallableStatement;
-import org.jboss.resource.adapter.jdbc.WrappedConnection;
-import org.jboss.resource.adapter.jdbc.WrappedPreparedStatement;
-import org.jboss.resource.adapter.jdbc.WrappedStatement;
-
-/**
- * WrappedConnectionJDK6.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class WrappedConnectionJDK5 extends WrappedConnection
-{
- /**
- * Create a new WrappedConnectionJDK5.
- *
- * @param mc the managed connection
- */
- public WrappedConnectionJDK5(BaseWrapperManagedConnection mc)
- {
- super(mc);
- }
-
- protected WrappedStatement wrapStatement(Statement statement)
- {
- return new WrappedStatementJDK5(this, statement);
- }
-
- protected WrappedPreparedStatement wrapPreparedStatement(PreparedStatement statement)
- {
- return new WrappedPreparedStatementJDK5(this, statement);
- }
-
- protected WrappedCallableStatement wrapCallableStatement(CallableStatement statement)
- {
- return new WrappedCallableStatementJDK5(this, statement);
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jdbc.jdk5;
+
+import java.sql.CallableStatement;
+import java.sql.PreparedStatement;
+import java.sql.Statement;
+
+import org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection;
+import org.jboss.resource.adapter.jdbc.WrappedCallableStatement;
+import org.jboss.resource.adapter.jdbc.WrappedConnection;
+import org.jboss.resource.adapter.jdbc.WrappedPreparedStatement;
+import org.jboss.resource.adapter.jdbc.WrappedStatement;
+
+/**
+ * WrappedConnectionJDK6.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class WrappedConnectionJDK5 extends WrappedConnection
+{
+ /**
+ * Create a new WrappedConnectionJDK5.
+ *
+ * @param mc the managed connection
+ */
+ public WrappedConnectionJDK5(BaseWrapperManagedConnection mc)
+ {
+ super(mc);
+ }
+
+ protected WrappedStatement wrapStatement(Statement statement)
+ {
+ return new WrappedStatementJDK5(this, statement);
+ }
+
+ protected WrappedPreparedStatement wrapPreparedStatement(PreparedStatement statement)
+ {
+ return new WrappedPreparedStatementJDK5(this, statement);
+ }
+
+ protected WrappedCallableStatement wrapCallableStatement(CallableStatement statement)
+ {
+ return new WrappedCallableStatementJDK5(this, statement);
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedPreparedStatementJDK5.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedPreparedStatementJDK5.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedPreparedStatementJDK5.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,47 +1,47 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jdbc.jdk5;
-
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-
-import org.jboss.resource.adapter.jdbc.WrappedPreparedStatement;
-import org.jboss.resource.adapter.jdbc.WrappedResultSet;
-
-/**
- * WrappedPreparedStatementJDK5.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class WrappedPreparedStatementJDK5 extends WrappedPreparedStatement
-{
- public WrappedPreparedStatementJDK5(WrappedConnectionJDK5 lc, PreparedStatement s)
- {
- super(lc, s);
- }
-
- protected WrappedResultSet wrapResultSet(ResultSet resultSet)
- {
- return new WrappedResultSetJDK5(this, resultSet);
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jdbc.jdk5;
+
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+
+import org.jboss.resource.adapter.jdbc.WrappedPreparedStatement;
+import org.jboss.resource.adapter.jdbc.WrappedResultSet;
+
+/**
+ * WrappedPreparedStatementJDK5.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class WrappedPreparedStatementJDK5 extends WrappedPreparedStatement
+{
+ public WrappedPreparedStatementJDK5(WrappedConnectionJDK5 lc, PreparedStatement s)
+ {
+ super(lc, s);
+ }
+
+ protected WrappedResultSet wrapResultSet(ResultSet resultSet)
+ {
+ return new WrappedResultSetJDK5(this, resultSet);
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedResultSetJDK5.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedResultSetJDK5.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedResultSetJDK5.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,41 +1,41 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jdbc.jdk5;
-
-import java.sql.ResultSet;
-
-import org.jboss.resource.adapter.jdbc.WrappedResultSet;
-import org.jboss.resource.adapter.jdbc.WrappedStatement;
-
-/**
- * WrappedResultSetJDK5.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class WrappedResultSetJDK5 extends WrappedResultSet
-{
- public WrappedResultSetJDK5(WrappedStatement statement, ResultSet resultSet)
- {
- super(statement, resultSet);
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jdbc.jdk5;
+
+import java.sql.ResultSet;
+
+import org.jboss.resource.adapter.jdbc.WrappedResultSet;
+import org.jboss.resource.adapter.jdbc.WrappedStatement;
+
+/**
+ * WrappedResultSetJDK5.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class WrappedResultSetJDK5 extends WrappedResultSet
+{
+ public WrappedResultSetJDK5(WrappedStatement statement, ResultSet resultSet)
+ {
+ super(statement, resultSet);
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedStatementJDK5.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedStatementJDK5.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk5/WrappedStatementJDK5.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,47 +1,47 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jdbc.jdk5;
-
-import java.sql.ResultSet;
-import java.sql.Statement;
-
-import org.jboss.resource.adapter.jdbc.WrappedResultSet;
-import org.jboss.resource.adapter.jdbc.WrappedStatement;
-
-/**
- * WrappedStatementJDK5.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class WrappedStatementJDK5 extends WrappedStatement
-{
- public WrappedStatementJDK5(WrappedConnectionJDK5 lc, Statement s)
- {
- super(lc, s);
- }
-
- protected WrappedResultSet wrapResultSet(ResultSet resultSet)
- {
- return new WrappedResultSetJDK5(this, resultSet);
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jdbc.jdk5;
+
+import java.sql.ResultSet;
+import java.sql.Statement;
+
+import org.jboss.resource.adapter.jdbc.WrappedResultSet;
+import org.jboss.resource.adapter.jdbc.WrappedStatement;
+
+/**
+ * WrappedStatementJDK5.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class WrappedStatementJDK5 extends WrappedStatement
+{
+ public WrappedStatementJDK5(WrappedConnectionJDK5 lc, Statement s)
+ {
+ super(lc, s);
+ }
+
+ protected WrappedResultSet wrapResultSet(ResultSet resultSet)
+ {
+ return new WrappedResultSetJDK5(this, resultSet);
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/CachedCallableStatementJDK6.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/CachedCallableStatementJDK6.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/CachedCallableStatementJDK6.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,314 +1,314 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jdbc.jdk6;
-
-import java.io.InputStream;
-import java.io.Reader;
-import java.sql.Blob;
-import java.sql.CallableStatement;
-import java.sql.Clob;
-import java.sql.NClob;
-import java.sql.RowId;
-import java.sql.SQLException;
-import java.sql.SQLXML;
-
-import org.jboss.resource.adapter.jdbc.CachedCallableStatement;
-
-/**
- * CachedCallableStatementJDK6.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
- at SuppressWarnings("deprecation")
-public class CachedCallableStatementJDK6 extends CachedCallableStatement
-{
- public CachedCallableStatementJDK6(CallableStatement cs) throws SQLException
- {
- super(cs);
- }
-
- public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException
- {
- getWrappedObject().setAsciiStream(parameterIndex, x, length);
- }
-
- public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException
- {
- getWrappedObject().setAsciiStream(parameterIndex, x);
- }
-
- public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException
- {
- getWrappedObject().setBinaryStream(parameterIndex, x, length);
- }
-
- public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException
- {
- getWrappedObject().setBinaryStream(parameterIndex, x);
- }
-
- public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException
- {
- getWrappedObject().setBlob(parameterIndex, inputStream, length);
- }
-
- public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException
- {
- getWrappedObject().setBlob(parameterIndex, inputStream);
- }
-
- public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException
- {
- getWrappedObject().setCharacterStream(parameterIndex, reader, length);
- }
-
- public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException
- {
- getWrappedObject().setCharacterStream(parameterIndex, reader);
- }
-
- public void setClob(int parameterIndex, Reader reader, long length) throws SQLException
- {
- getWrappedObject().setClob(parameterIndex, reader, length);
- }
-
- public void setClob(int parameterIndex, Reader reader) throws SQLException
- {
- getWrappedObject().setClob(parameterIndex, reader);
- }
-
- public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException
- {
- getWrappedObject().setNCharacterStream(parameterIndex, value, length);
- }
-
- public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException
- {
- getWrappedObject().setNCharacterStream(parameterIndex, value);
- }
-
- public void setNClob(int parameterIndex, NClob value) throws SQLException
- {
- getWrappedObject().setNClob(parameterIndex, value);
- }
-
- public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException
- {
- getWrappedObject().setNClob(parameterIndex, reader, length);
- }
-
- public void setNClob(int parameterIndex, Reader reader) throws SQLException
- {
- getWrappedObject().setNClob(parameterIndex, reader);
- }
-
- public void setNString(int parameterIndex, String value) throws SQLException
- {
- getWrappedObject().setNString(parameterIndex, value);
- }
-
- public void setRowId(int parameterIndex, RowId x) throws SQLException
- {
- getWrappedObject().setRowId(parameterIndex, x);
- }
-
- public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException
- {
- getWrappedObject().setSQLXML(parameterIndex, xmlObject);
- }
-
- public boolean isClosed() throws SQLException
- {
- return getWrappedObject().isClosed();
- }
-
- public boolean isPoolable() throws SQLException
- {
- return getWrappedObject().isPoolable();
- }
-
- public void setPoolable(boolean poolable) throws SQLException
- {
- getWrappedObject().setPoolable(poolable);
- }
-
- public Reader getCharacterStream(int parameterIndex) throws SQLException
- {
- return getWrappedObject().getCharacterStream(parameterIndex);
- }
-
- public Reader getCharacterStream(String parameterName) throws SQLException
- {
- return getWrappedObject().getCharacterStream(parameterName);
- }
-
- public Reader getNCharacterStream(int parameterIndex) throws SQLException
- {
- return getWrappedObject().getNCharacterStream(parameterIndex);
- }
-
- public Reader getNCharacterStream(String parameterName) throws SQLException
- {
- return getWrappedObject().getNCharacterStream(parameterName);
- }
-
- public NClob getNClob(int parameterIndex) throws SQLException
- {
- return getWrappedObject().getNClob(parameterIndex);
- }
-
- public NClob getNClob(String parameterName) throws SQLException
- {
- return getWrappedObject().getNClob(parameterName);
- }
-
- public String getNString(int parameterIndex) throws SQLException
- {
- return getWrappedObject().getNString(parameterIndex);
- }
-
- public String getNString(String parameterName) throws SQLException
- {
- return getWrappedObject().getNString(parameterName);
- }
-
- public RowId getRowId(int parameterIndex) throws SQLException
- {
- return getWrappedObject().getRowId(parameterIndex);
- }
-
- public RowId getRowId(String parameterName) throws SQLException
- {
- return getWrappedObject().getRowId(parameterName);
- }
-
- public SQLXML getSQLXML(int parameterIndex) throws SQLException
- {
- return getWrappedObject().getSQLXML(parameterIndex);
- }
-
- public SQLXML getSQLXML(String parameterName) throws SQLException
- {
- return getWrappedObject().getSQLXML(parameterName);
- }
-
- public void setAsciiStream(String parameterName, InputStream x, long length) throws SQLException
- {
- getWrappedObject().setAsciiStream(parameterName, x, length);
- }
-
- public void setAsciiStream(String parameterName, InputStream x) throws SQLException
- {
- getWrappedObject().setAsciiStream(parameterName, x);
- }
-
- public void setBinaryStream(String parameterName, InputStream x, long length) throws SQLException
- {
- getWrappedObject().setBinaryStream(parameterName, x, length);
- }
-
- public void setBinaryStream(String parameterName, InputStream x) throws SQLException
- {
- getWrappedObject().setBinaryStream(parameterName, x);
- }
-
- public void setBlob(String parameterName, Blob x) throws SQLException
- {
- getWrappedObject().setBlob(parameterName, x);
- }
-
- public void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException
- {
- getWrappedObject().setBlob(parameterName, inputStream, length);
- }
-
- public void setBlob(String parameterName, InputStream inputStream) throws SQLException
- {
- getWrappedObject().setBlob(parameterName, inputStream);
- }
-
- public void setCharacterStream(String parameterName, Reader reader, long length) throws SQLException
- {
- getWrappedObject().setCharacterStream(parameterName, reader, length);
- }
-
- public void setCharacterStream(String parameterName, Reader reader) throws SQLException
- {
- getWrappedObject().setCharacterStream(parameterName, reader);
- }
-
- public void setClob(String parameterName, Clob x) throws SQLException
- {
- getWrappedObject().setClob(parameterName, x);
- }
-
- public void setClob(String parameterName, Reader reader, long length) throws SQLException
- {
- getWrappedObject().setClob(parameterName, reader, length);
- }
-
- public void setClob(String parameterName, Reader reader) throws SQLException
- {
- getWrappedObject().setClob(parameterName, reader);
- }
-
- public void setNCharacterStream(String parameterName, Reader value, long length) throws SQLException
- {
- getWrappedObject().setNCharacterStream(parameterName, value, length);
- }
-
- public void setNCharacterStream(String parameterName, Reader value) throws SQLException
- {
- getWrappedObject().setNCharacterStream(parameterName, value);
- }
-
- public void setNClob(String parameterName, NClob value) throws SQLException
- {
- getWrappedObject().setNClob(parameterName, value);
- }
-
- public void setNClob(String parameterName, Reader reader, long length) throws SQLException
- {
- getWrappedObject().setNClob(parameterName, reader, length);
- }
-
- public void setNClob(String parameterName, Reader reader) throws SQLException
- {
- getWrappedObject().setNClob(parameterName, reader);
- }
-
- public void setNString(String parameterName, String value) throws SQLException
- {
- getWrappedObject().setNString(parameterName, value);
- }
-
- public void setRowId(String parameterName, RowId x) throws SQLException
- {
- getWrappedObject().setRowId(parameterName, x);
- }
-
- public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException
- {
- getWrappedObject().setSQLXML(parameterName, xmlObject);
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jdbc.jdk6;
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.sql.Blob;
+import java.sql.CallableStatement;
+import java.sql.Clob;
+import java.sql.NClob;
+import java.sql.RowId;
+import java.sql.SQLException;
+import java.sql.SQLXML;
+
+import org.jboss.resource.adapter.jdbc.CachedCallableStatement;
+
+/**
+ * CachedCallableStatementJDK6.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at SuppressWarnings("deprecation")
+public class CachedCallableStatementJDK6 extends CachedCallableStatement
+{
+ public CachedCallableStatementJDK6(CallableStatement cs) throws SQLException
+ {
+ super(cs);
+ }
+
+ public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException
+ {
+ getWrappedObject().setAsciiStream(parameterIndex, x, length);
+ }
+
+ public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException
+ {
+ getWrappedObject().setAsciiStream(parameterIndex, x);
+ }
+
+ public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException
+ {
+ getWrappedObject().setBinaryStream(parameterIndex, x, length);
+ }
+
+ public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException
+ {
+ getWrappedObject().setBinaryStream(parameterIndex, x);
+ }
+
+ public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException
+ {
+ getWrappedObject().setBlob(parameterIndex, inputStream, length);
+ }
+
+ public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException
+ {
+ getWrappedObject().setBlob(parameterIndex, inputStream);
+ }
+
+ public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException
+ {
+ getWrappedObject().setCharacterStream(parameterIndex, reader, length);
+ }
+
+ public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException
+ {
+ getWrappedObject().setCharacterStream(parameterIndex, reader);
+ }
+
+ public void setClob(int parameterIndex, Reader reader, long length) throws SQLException
+ {
+ getWrappedObject().setClob(parameterIndex, reader, length);
+ }
+
+ public void setClob(int parameterIndex, Reader reader) throws SQLException
+ {
+ getWrappedObject().setClob(parameterIndex, reader);
+ }
+
+ public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException
+ {
+ getWrappedObject().setNCharacterStream(parameterIndex, value, length);
+ }
+
+ public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException
+ {
+ getWrappedObject().setNCharacterStream(parameterIndex, value);
+ }
+
+ public void setNClob(int parameterIndex, NClob value) throws SQLException
+ {
+ getWrappedObject().setNClob(parameterIndex, value);
+ }
+
+ public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException
+ {
+ getWrappedObject().setNClob(parameterIndex, reader, length);
+ }
+
+ public void setNClob(int parameterIndex, Reader reader) throws SQLException
+ {
+ getWrappedObject().setNClob(parameterIndex, reader);
+ }
+
+ public void setNString(int parameterIndex, String value) throws SQLException
+ {
+ getWrappedObject().setNString(parameterIndex, value);
+ }
+
+ public void setRowId(int parameterIndex, RowId x) throws SQLException
+ {
+ getWrappedObject().setRowId(parameterIndex, x);
+ }
+
+ public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException
+ {
+ getWrappedObject().setSQLXML(parameterIndex, xmlObject);
+ }
+
+ public boolean isClosed() throws SQLException
+ {
+ return getWrappedObject().isClosed();
+ }
+
+ public boolean isPoolable() throws SQLException
+ {
+ return getWrappedObject().isPoolable();
+ }
+
+ public void setPoolable(boolean poolable) throws SQLException
+ {
+ getWrappedObject().setPoolable(poolable);
+ }
+
+ public Reader getCharacterStream(int parameterIndex) throws SQLException
+ {
+ return getWrappedObject().getCharacterStream(parameterIndex);
+ }
+
+ public Reader getCharacterStream(String parameterName) throws SQLException
+ {
+ return getWrappedObject().getCharacterStream(parameterName);
+ }
+
+ public Reader getNCharacterStream(int parameterIndex) throws SQLException
+ {
+ return getWrappedObject().getNCharacterStream(parameterIndex);
+ }
+
+ public Reader getNCharacterStream(String parameterName) throws SQLException
+ {
+ return getWrappedObject().getNCharacterStream(parameterName);
+ }
+
+ public NClob getNClob(int parameterIndex) throws SQLException
+ {
+ return getWrappedObject().getNClob(parameterIndex);
+ }
+
+ public NClob getNClob(String parameterName) throws SQLException
+ {
+ return getWrappedObject().getNClob(parameterName);
+ }
+
+ public String getNString(int parameterIndex) throws SQLException
+ {
+ return getWrappedObject().getNString(parameterIndex);
+ }
+
+ public String getNString(String parameterName) throws SQLException
+ {
+ return getWrappedObject().getNString(parameterName);
+ }
+
+ public RowId getRowId(int parameterIndex) throws SQLException
+ {
+ return getWrappedObject().getRowId(parameterIndex);
+ }
+
+ public RowId getRowId(String parameterName) throws SQLException
+ {
+ return getWrappedObject().getRowId(parameterName);
+ }
+
+ public SQLXML getSQLXML(int parameterIndex) throws SQLException
+ {
+ return getWrappedObject().getSQLXML(parameterIndex);
+ }
+
+ public SQLXML getSQLXML(String parameterName) throws SQLException
+ {
+ return getWrappedObject().getSQLXML(parameterName);
+ }
+
+ public void setAsciiStream(String parameterName, InputStream x, long length) throws SQLException
+ {
+ getWrappedObject().setAsciiStream(parameterName, x, length);
+ }
+
+ public void setAsciiStream(String parameterName, InputStream x) throws SQLException
+ {
+ getWrappedObject().setAsciiStream(parameterName, x);
+ }
+
+ public void setBinaryStream(String parameterName, InputStream x, long length) throws SQLException
+ {
+ getWrappedObject().setBinaryStream(parameterName, x, length);
+ }
+
+ public void setBinaryStream(String parameterName, InputStream x) throws SQLException
+ {
+ getWrappedObject().setBinaryStream(parameterName, x);
+ }
+
+ public void setBlob(String parameterName, Blob x) throws SQLException
+ {
+ getWrappedObject().setBlob(parameterName, x);
+ }
+
+ public void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException
+ {
+ getWrappedObject().setBlob(parameterName, inputStream, length);
+ }
+
+ public void setBlob(String parameterName, InputStream inputStream) throws SQLException
+ {
+ getWrappedObject().setBlob(parameterName, inputStream);
+ }
+
+ public void setCharacterStream(String parameterName, Reader reader, long length) throws SQLException
+ {
+ getWrappedObject().setCharacterStream(parameterName, reader, length);
+ }
+
+ public void setCharacterStream(String parameterName, Reader reader) throws SQLException
+ {
+ getWrappedObject().setCharacterStream(parameterName, reader);
+ }
+
+ public void setClob(String parameterName, Clob x) throws SQLException
+ {
+ getWrappedObject().setClob(parameterName, x);
+ }
+
+ public void setClob(String parameterName, Reader reader, long length) throws SQLException
+ {
+ getWrappedObject().setClob(parameterName, reader, length);
+ }
+
+ public void setClob(String parameterName, Reader reader) throws SQLException
+ {
+ getWrappedObject().setClob(parameterName, reader);
+ }
+
+ public void setNCharacterStream(String parameterName, Reader value, long length) throws SQLException
+ {
+ getWrappedObject().setNCharacterStream(parameterName, value, length);
+ }
+
+ public void setNCharacterStream(String parameterName, Reader value) throws SQLException
+ {
+ getWrappedObject().setNCharacterStream(parameterName, value);
+ }
+
+ public void setNClob(String parameterName, NClob value) throws SQLException
+ {
+ getWrappedObject().setNClob(parameterName, value);
+ }
+
+ public void setNClob(String parameterName, Reader reader, long length) throws SQLException
+ {
+ getWrappedObject().setNClob(parameterName, reader, length);
+ }
+
+ public void setNClob(String parameterName, Reader reader) throws SQLException
+ {
+ getWrappedObject().setNClob(parameterName, reader);
+ }
+
+ public void setNString(String parameterName, String value) throws SQLException
+ {
+ getWrappedObject().setNString(parameterName, value);
+ }
+
+ public void setRowId(String parameterName, RowId x) throws SQLException
+ {
+ getWrappedObject().setRowId(parameterName, x);
+ }
+
+ public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException
+ {
+ getWrappedObject().setSQLXML(parameterName, xmlObject);
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/CachedPreparedStatementJDK6.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/CachedPreparedStatementJDK6.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/CachedPreparedStatementJDK6.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,151 +1,151 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jdbc.jdk6;
-
-import java.io.InputStream;
-import java.io.Reader;
-import java.sql.NClob;
-import java.sql.PreparedStatement;
-import java.sql.RowId;
-import java.sql.SQLException;
-import java.sql.SQLXML;
-
-import org.jboss.resource.adapter.jdbc.CachedPreparedStatement;
-
-/**
- * CachedPreparedStatementJDK5.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class CachedPreparedStatementJDK6 extends CachedPreparedStatement
-{
- public CachedPreparedStatementJDK6(PreparedStatement ps) throws SQLException
- {
- super(ps);
- }
-
- public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException
- {
- getWrappedObject().setAsciiStream(parameterIndex, x, length);
- }
-
- public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException
- {
- getWrappedObject().setAsciiStream(parameterIndex, x);
- }
-
- public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException
- {
- getWrappedObject().setBinaryStream(parameterIndex, x, length);
- }
-
- public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException
- {
- getWrappedObject().setBinaryStream(parameterIndex, x);
- }
-
- public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException
- {
- getWrappedObject().setBlob(parameterIndex, inputStream, length);
- }
-
- public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException
- {
- getWrappedObject().setBlob(parameterIndex, inputStream);
- }
-
- public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException
- {
- getWrappedObject().setCharacterStream(parameterIndex, reader, length);
- }
-
- public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException
- {
- getWrappedObject().setCharacterStream(parameterIndex, reader);
- }
-
- public void setClob(int parameterIndex, Reader reader, long length) throws SQLException
- {
- getWrappedObject().setClob(parameterIndex, reader, length);
- }
-
- public void setClob(int parameterIndex, Reader reader) throws SQLException
- {
- getWrappedObject().setClob(parameterIndex, reader);
- }
-
- public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException
- {
- getWrappedObject().setNCharacterStream(parameterIndex, value, length);
- }
-
- public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException
- {
- getWrappedObject().setNCharacterStream(parameterIndex, value);
- }
-
- public void setNClob(int parameterIndex, NClob value) throws SQLException
- {
- getWrappedObject().setNClob(parameterIndex, value);
- }
-
- public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException
- {
- getWrappedObject().setNClob(parameterIndex, reader, length);
- }
-
- public void setNClob(int parameterIndex, Reader reader) throws SQLException
- {
- getWrappedObject().setNClob(parameterIndex, reader);
- }
-
- public void setNString(int parameterIndex, String value) throws SQLException
- {
- getWrappedObject().setNString(parameterIndex, value);
- }
-
- public void setRowId(int parameterIndex, RowId x) throws SQLException
- {
- getWrappedObject().setRowId(parameterIndex, x);
- }
-
- public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException
- {
- getWrappedObject().setSQLXML(parameterIndex, xmlObject);
- }
-
- public boolean isClosed() throws SQLException
- {
- return getWrappedObject().isClosed();
- }
-
- public boolean isPoolable() throws SQLException
- {
- return getWrappedObject().isPoolable();
- }
-
- public void setPoolable(boolean poolable) throws SQLException
- {
- getWrappedObject().setPoolable(poolable);
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jdbc.jdk6;
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.sql.NClob;
+import java.sql.PreparedStatement;
+import java.sql.RowId;
+import java.sql.SQLException;
+import java.sql.SQLXML;
+
+import org.jboss.resource.adapter.jdbc.CachedPreparedStatement;
+
+/**
+ * CachedPreparedStatementJDK5.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class CachedPreparedStatementJDK6 extends CachedPreparedStatement
+{
+ public CachedPreparedStatementJDK6(PreparedStatement ps) throws SQLException
+ {
+ super(ps);
+ }
+
+ public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException
+ {
+ getWrappedObject().setAsciiStream(parameterIndex, x, length);
+ }
+
+ public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException
+ {
+ getWrappedObject().setAsciiStream(parameterIndex, x);
+ }
+
+ public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException
+ {
+ getWrappedObject().setBinaryStream(parameterIndex, x, length);
+ }
+
+ public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException
+ {
+ getWrappedObject().setBinaryStream(parameterIndex, x);
+ }
+
+ public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException
+ {
+ getWrappedObject().setBlob(parameterIndex, inputStream, length);
+ }
+
+ public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException
+ {
+ getWrappedObject().setBlob(parameterIndex, inputStream);
+ }
+
+ public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException
+ {
+ getWrappedObject().setCharacterStream(parameterIndex, reader, length);
+ }
+
+ public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException
+ {
+ getWrappedObject().setCharacterStream(parameterIndex, reader);
+ }
+
+ public void setClob(int parameterIndex, Reader reader, long length) throws SQLException
+ {
+ getWrappedObject().setClob(parameterIndex, reader, length);
+ }
+
+ public void setClob(int parameterIndex, Reader reader) throws SQLException
+ {
+ getWrappedObject().setClob(parameterIndex, reader);
+ }
+
+ public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException
+ {
+ getWrappedObject().setNCharacterStream(parameterIndex, value, length);
+ }
+
+ public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException
+ {
+ getWrappedObject().setNCharacterStream(parameterIndex, value);
+ }
+
+ public void setNClob(int parameterIndex, NClob value) throws SQLException
+ {
+ getWrappedObject().setNClob(parameterIndex, value);
+ }
+
+ public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException
+ {
+ getWrappedObject().setNClob(parameterIndex, reader, length);
+ }
+
+ public void setNClob(int parameterIndex, Reader reader) throws SQLException
+ {
+ getWrappedObject().setNClob(parameterIndex, reader);
+ }
+
+ public void setNString(int parameterIndex, String value) throws SQLException
+ {
+ getWrappedObject().setNString(parameterIndex, value);
+ }
+
+ public void setRowId(int parameterIndex, RowId x) throws SQLException
+ {
+ getWrappedObject().setRowId(parameterIndex, x);
+ }
+
+ public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException
+ {
+ getWrappedObject().setSQLXML(parameterIndex, xmlObject);
+ }
+
+ public boolean isClosed() throws SQLException
+ {
+ return getWrappedObject().isClosed();
+ }
+
+ public boolean isPoolable() throws SQLException
+ {
+ return getWrappedObject().isPoolable();
+ }
+
+ public void setPoolable(boolean poolable) throws SQLException
+ {
+ getWrappedObject().setPoolable(poolable);
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedCallableStatementJDK6.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedCallableStatementJDK6.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedCallableStatementJDK6.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,748 +1,748 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jdbc.jdk6;
-
-import java.io.InputStream;
-import java.io.Reader;
-import java.sql.Blob;
-import java.sql.CallableStatement;
-import java.sql.Clob;
-import java.sql.NClob;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.RowId;
-import java.sql.SQLException;
-import java.sql.SQLXML;
-
-import org.jboss.resource.adapter.jdbc.WrappedCallableStatement;
-import org.jboss.resource.adapter.jdbc.WrappedResultSet;
-
-/**
- * WrappedCallableStatementJDK6.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class WrappedCallableStatementJDK6 extends WrappedCallableStatement
-{
- public WrappedCallableStatementJDK6(WrappedConnectionJDK6 lc, CallableStatement s)
- {
- super(lc, s);
- }
-
- protected WrappedResultSet wrapResultSet(ResultSet resultSet)
- {
- return new WrappedResultSetJDK6(this, resultSet);
- }
-
- public boolean isClosed() throws SQLException
- {
- try
- {
- PreparedStatement wrapped = getWrappedObject();
- if (wrapped == null)
- return true;
- return wrapped.isClosed();
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public boolean isPoolable() throws SQLException
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- return statement.isPoolable();
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setPoolable(boolean poolable) throws SQLException
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setPoolable(poolable);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setAsciiStream(parameterIndex, x, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setAsciiStream(parameterIndex, x);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setBinaryStream(parameterIndex, x, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setBinaryStream(parameterIndex, x);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setBlob(parameterIndex, inputStream, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setBlob(parameterIndex, inputStream);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setCharacterStream(parameterIndex, reader, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setCharacterStream(parameterIndex, reader);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setClob(int parameterIndex, Reader reader, long length) throws SQLException
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setClob(parameterIndex, reader, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setClob(int parameterIndex, Reader reader) throws SQLException
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setClob(parameterIndex, reader);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setNCharacterStream(parameterIndex, value, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setNCharacterStream(parameterIndex, value);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setNClob(int parameterIndex, NClob value) throws SQLException
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setNClob(parameterIndex, value);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setNClob(parameterIndex, reader, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setNClob(int parameterIndex, Reader reader) throws SQLException
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setNClob(parameterIndex, reader);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setNString(int parameterIndex, String value) throws SQLException
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setNString(parameterIndex, value);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setRowId(int parameterIndex, RowId x) throws SQLException
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setRowId(parameterIndex, x);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setSQLXML(parameterIndex, xmlObject);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public Reader getCharacterStream(int parameterIndex) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- return statement.getCharacterStream(parameterIndex);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public Reader getCharacterStream(String parameterName) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- return statement.getCharacterStream(parameterName);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public Reader getNCharacterStream(int parameterIndex) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- return statement.getNCharacterStream(parameterIndex);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public Reader getNCharacterStream(String parameterName) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- return statement.getCharacterStream(parameterName);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public NClob getNClob(int parameterIndex) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- return statement.getNClob(parameterIndex);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public NClob getNClob(String parameterName) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- return statement.getNClob(parameterName);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public String getNString(int parameterIndex) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- return statement.getNString(parameterIndex);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public String getNString(String parameterName) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- return statement.getNString(parameterName);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public RowId getRowId(int parameterIndex) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- return statement.getRowId(parameterIndex);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public RowId getRowId(String parameterName) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- return statement.getRowId(parameterName);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public SQLXML getSQLXML(int parameterIndex) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- return statement.getSQLXML(parameterIndex);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public SQLXML getSQLXML(String parameterName) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- return statement.getSQLXML(parameterName);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setAsciiStream(String parameterName, InputStream x, long length) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- statement.setAsciiStream(parameterName, x, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setAsciiStream(String parameterName, InputStream x) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- statement.setAsciiStream(parameterName, x);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setBinaryStream(String parameterName, InputStream x, long length) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- statement.setBinaryStream(parameterName, x, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setBinaryStream(String parameterName, InputStream x) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- statement.setBinaryStream(parameterName, x);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setBlob(String parameterName, Blob x) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- statement.setBlob(parameterName, x);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- statement.setBlob(parameterName, inputStream, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setBlob(String parameterName, InputStream inputStream) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- statement.setBlob(parameterName, inputStream);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setCharacterStream(String parameterName, Reader reader, long length) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- statement.setCharacterStream(parameterName, reader, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setCharacterStream(String parameterName, Reader reader) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- statement.setCharacterStream(parameterName, reader);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setClob(String parameterName, Clob x) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- statement.setClob(parameterName, x);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setClob(String parameterName, Reader reader, long length) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- statement.setClob(parameterName, reader, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setClob(String parameterName, Reader reader) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- statement.setClob(parameterName, reader);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setNCharacterStream(String parameterName, Reader value, long length) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- statement.setNCharacterStream(parameterName, value, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setNCharacterStream(String parameterName, Reader value) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- statement.setNCharacterStream(parameterName, value);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setNClob(String parameterName, NClob value) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- statement.setNClob(parameterName, value);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setNClob(String parameterName, Reader reader, long length) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- statement.setNClob(parameterName, reader, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setNClob(String parameterName, Reader reader) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- statement.setNClob(parameterName, reader);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setNString(String parameterName, String value) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- statement.setNString(parameterName, value);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setRowId(String parameterName, RowId x) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- statement.setRowId(parameterName, x);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException
- {
- CallableStatement statement = getUnderlyingStatement();
- try
- {
- statement.setSQLXML(parameterName, xmlObject);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jdbc.jdk6;
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.sql.Blob;
+import java.sql.CallableStatement;
+import java.sql.Clob;
+import java.sql.NClob;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.RowId;
+import java.sql.SQLException;
+import java.sql.SQLXML;
+
+import org.jboss.resource.adapter.jdbc.WrappedCallableStatement;
+import org.jboss.resource.adapter.jdbc.WrappedResultSet;
+
+/**
+ * WrappedCallableStatementJDK6.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class WrappedCallableStatementJDK6 extends WrappedCallableStatement
+{
+ public WrappedCallableStatementJDK6(WrappedConnectionJDK6 lc, CallableStatement s)
+ {
+ super(lc, s);
+ }
+
+ protected WrappedResultSet wrapResultSet(ResultSet resultSet)
+ {
+ return new WrappedResultSetJDK6(this, resultSet);
+ }
+
+ public boolean isClosed() throws SQLException
+ {
+ try
+ {
+ PreparedStatement wrapped = getWrappedObject();
+ if (wrapped == null)
+ return true;
+ return wrapped.isClosed();
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public boolean isPoolable() throws SQLException
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ return statement.isPoolable();
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setPoolable(boolean poolable) throws SQLException
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setPoolable(poolable);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setAsciiStream(parameterIndex, x, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setAsciiStream(parameterIndex, x);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setBinaryStream(parameterIndex, x, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setBinaryStream(parameterIndex, x);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setBlob(parameterIndex, inputStream, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setBlob(parameterIndex, inputStream);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setCharacterStream(parameterIndex, reader, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setCharacterStream(parameterIndex, reader);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setClob(int parameterIndex, Reader reader, long length) throws SQLException
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setClob(parameterIndex, reader, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setClob(int parameterIndex, Reader reader) throws SQLException
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setClob(parameterIndex, reader);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setNCharacterStream(parameterIndex, value, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setNCharacterStream(parameterIndex, value);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setNClob(int parameterIndex, NClob value) throws SQLException
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setNClob(parameterIndex, value);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setNClob(parameterIndex, reader, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setNClob(int parameterIndex, Reader reader) throws SQLException
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setNClob(parameterIndex, reader);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setNString(int parameterIndex, String value) throws SQLException
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setNString(parameterIndex, value);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setRowId(int parameterIndex, RowId x) throws SQLException
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setRowId(parameterIndex, x);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setSQLXML(parameterIndex, xmlObject);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public Reader getCharacterStream(int parameterIndex) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ return statement.getCharacterStream(parameterIndex);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public Reader getCharacterStream(String parameterName) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ return statement.getCharacterStream(parameterName);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public Reader getNCharacterStream(int parameterIndex) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ return statement.getNCharacterStream(parameterIndex);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public Reader getNCharacterStream(String parameterName) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ return statement.getCharacterStream(parameterName);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public NClob getNClob(int parameterIndex) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ return statement.getNClob(parameterIndex);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public NClob getNClob(String parameterName) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ return statement.getNClob(parameterName);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public String getNString(int parameterIndex) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ return statement.getNString(parameterIndex);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public String getNString(String parameterName) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ return statement.getNString(parameterName);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public RowId getRowId(int parameterIndex) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ return statement.getRowId(parameterIndex);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public RowId getRowId(String parameterName) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ return statement.getRowId(parameterName);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public SQLXML getSQLXML(int parameterIndex) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ return statement.getSQLXML(parameterIndex);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public SQLXML getSQLXML(String parameterName) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ return statement.getSQLXML(parameterName);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setAsciiStream(String parameterName, InputStream x, long length) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setAsciiStream(parameterName, x, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setAsciiStream(String parameterName, InputStream x) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setAsciiStream(parameterName, x);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setBinaryStream(String parameterName, InputStream x, long length) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setBinaryStream(parameterName, x, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setBinaryStream(String parameterName, InputStream x) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setBinaryStream(parameterName, x);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setBlob(String parameterName, Blob x) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setBlob(parameterName, x);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setBlob(String parameterName, InputStream inputStream, long length) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setBlob(parameterName, inputStream, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setBlob(String parameterName, InputStream inputStream) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setBlob(parameterName, inputStream);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setCharacterStream(String parameterName, Reader reader, long length) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setCharacterStream(parameterName, reader, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setCharacterStream(String parameterName, Reader reader) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setCharacterStream(parameterName, reader);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setClob(String parameterName, Clob x) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setClob(parameterName, x);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setClob(String parameterName, Reader reader, long length) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setClob(parameterName, reader, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setClob(String parameterName, Reader reader) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setClob(parameterName, reader);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setNCharacterStream(String parameterName, Reader value, long length) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setNCharacterStream(parameterName, value, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setNCharacterStream(String parameterName, Reader value) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setNCharacterStream(parameterName, value);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setNClob(String parameterName, NClob value) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setNClob(parameterName, value);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setNClob(String parameterName, Reader reader, long length) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setNClob(parameterName, reader, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setNClob(String parameterName, Reader reader) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setNClob(parameterName, reader);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setNString(String parameterName, String value) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setNString(parameterName, value);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setRowId(String parameterName, RowId x) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setRowId(parameterName, x);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void setSQLXML(String parameterName, SQLXML xmlObject) throws SQLException
+ {
+ CallableStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setSQLXML(parameterName, xmlObject);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedConnectionFactoryJDK6.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedConnectionFactoryJDK6.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedConnectionFactoryJDK6.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,56 +1,56 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jdbc.jdk6;
-
-import java.sql.CallableStatement;
-import java.sql.PreparedStatement;
-import java.sql.SQLException;
-
-import org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection;
-import org.jboss.resource.adapter.jdbc.CachedCallableStatement;
-import org.jboss.resource.adapter.jdbc.CachedPreparedStatement;
-import org.jboss.resource.adapter.jdbc.WrappedConnection;
-import org.jboss.resource.adapter.jdbc.WrappedConnectionFactory;
-
-/**
- * WrappedConnectionFactoryJDK6
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class WrappedConnectionFactoryJDK6 implements WrappedConnectionFactory
-{
- public WrappedConnection createWrappedConnection(BaseWrapperManagedConnection mc)
- {
- return new WrappedConnectionJDK6(mc);
- }
-
- public CachedPreparedStatement createCachedPreparedStatement(PreparedStatement ps) throws SQLException
- {
- return new CachedPreparedStatementJDK6(ps);
- }
-
- public CachedCallableStatement createCachedCallableStatement(CallableStatement cs) throws SQLException
- {
- return new CachedCallableStatementJDK6(cs);
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jdbc.jdk6;
+
+import java.sql.CallableStatement;
+import java.sql.PreparedStatement;
+import java.sql.SQLException;
+
+import org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection;
+import org.jboss.resource.adapter.jdbc.CachedCallableStatement;
+import org.jboss.resource.adapter.jdbc.CachedPreparedStatement;
+import org.jboss.resource.adapter.jdbc.WrappedConnection;
+import org.jboss.resource.adapter.jdbc.WrappedConnectionFactory;
+
+/**
+ * WrappedConnectionFactoryJDK6
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class WrappedConnectionFactoryJDK6 implements WrappedConnectionFactory
+{
+ public WrappedConnection createWrappedConnection(BaseWrapperManagedConnection mc)
+ {
+ return new WrappedConnectionJDK6(mc);
+ }
+
+ public CachedPreparedStatement createCachedPreparedStatement(PreparedStatement ps) throws SQLException
+ {
+ return new CachedPreparedStatementJDK6(ps);
+ }
+
+ public CachedCallableStatement createCachedCallableStatement(CallableStatement cs) throws SQLException
+ {
+ return new CachedCallableStatementJDK6(cs);
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedConnectionJDK6.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedConnectionJDK6.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedConnectionJDK6.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,346 +1,346 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jdbc.jdk6;
-
-import java.sql.Array;
-import java.sql.Blob;
-import java.sql.CallableStatement;
-import java.sql.Clob;
-import java.sql.Connection;
-import java.sql.NClob;
-import java.sql.PreparedStatement;
-import java.sql.SQLClientInfoException;
-import java.sql.SQLException;
-import java.sql.SQLXML;
-import java.sql.Statement;
-import java.sql.Struct;
-import java.util.Properties;
-
-import org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection;
-import org.jboss.resource.adapter.jdbc.WrappedCallableStatement;
-import org.jboss.resource.adapter.jdbc.WrappedConnection;
-import org.jboss.resource.adapter.jdbc.WrappedPreparedStatement;
-import org.jboss.resource.adapter.jdbc.WrappedStatement;
-
-/**
- * WrappedConnectionJDK6.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
- at SuppressWarnings("unchecked")
-public class WrappedConnectionJDK6 extends WrappedConnection
-{
- /**
- * Create a new WrappedConnectionJDK6.
- *
- * @param mc the managed connection
- */
- public WrappedConnectionJDK6(BaseWrapperManagedConnection mc)
- {
- super(mc);
- }
-
- protected WrappedStatement wrapStatement(Statement statement)
- {
- return new WrappedStatementJDK6(this, statement);
- }
-
- protected WrappedPreparedStatement wrapPreparedStatement(PreparedStatement statement)
- {
- return new WrappedPreparedStatementJDK6(this, statement);
- }
-
- protected WrappedCallableStatement wrapCallableStatement(CallableStatement statement)
- {
- return new WrappedCallableStatementJDK6(this, statement);
- }
-
- public Array createArrayOf(String typeName, Object[] elements) throws SQLException
- {
- lock();
- try
- {
- Connection c = getUnderlyingConnection();
- try
- {
- return c.createArrayOf(typeName, elements);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public Blob createBlob() throws SQLException
- {
- lock();
- try
- {
- Connection c = getUnderlyingConnection();
- try
- {
- return c.createBlob();
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public Clob createClob() throws SQLException
- {
- lock();
- try
- {
- Connection c = getUnderlyingConnection();
- try
- {
- return c.createClob();
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public NClob createNClob() throws SQLException
- {
- lock();
- try
- {
- Connection c = getUnderlyingConnection();
- try
- {
- return c.createNClob();
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public SQLXML createSQLXML() throws SQLException
- {
- lock();
- try
- {
- Connection c = getUnderlyingConnection();
- try
- {
- return c.createSQLXML();
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public Struct createStruct(String typeName, Object[] attributes) throws SQLException
- {
- lock();
- try
- {
- Connection c = getUnderlyingConnection();
- try
- {
- return c.createStruct(typeName, attributes);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public Properties getClientInfo() throws SQLException
- {
- lock();
- try
- {
- Connection c = getUnderlyingConnection();
- try
- {
- return c.getClientInfo();
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public String getClientInfo(String name) throws SQLException
- {
- lock();
- try
- {
- Connection c = getUnderlyingConnection();
- try
- {
- return c.getClientInfo(name);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public boolean isValid(int timeout) throws SQLException
- {
- lock();
- try
- {
- Connection c = getUnderlyingConnection();
- try
- {
- return c.isValid(timeout);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public void setClientInfo(Properties properties) throws SQLClientInfoException
- {
- try
- {
- lock();
- try
- {
- Connection c = getUnderlyingConnection();
- try
- {
- c.setClientInfo(properties);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- catch (SQLClientInfoException e)
- {
- throw e;
- }
- catch (SQLException e)
- {
- SQLClientInfoException t = new SQLClientInfoException();
- t.initCause(e);
- throw t;
- }
- }
- catch (SQLException e)
- {
- SQLClientInfoException t = new SQLClientInfoException();
- t.initCause(e);
- throw t;
- }
- finally
- {
- unlock();
- }
- }
-
- public void setClientInfo(String name, String value) throws SQLClientInfoException
- {
- try
- {
- lock();
- try
- {
- Connection c = getUnderlyingConnection();
- try
- {
- c.setClientInfo(name, value);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- catch (SQLClientInfoException e)
- {
- throw e;
- }
- catch (SQLException e)
- {
- SQLClientInfoException t = new SQLClientInfoException();
- t.initCause(e);
- throw t;
- }
- }
- catch (SQLException e)
- {
- SQLClientInfoException t = new SQLClientInfoException();
- t.initCause(e);
- throw t;
- }
- finally
- {
- unlock();
- }
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jdbc.jdk6;
+
+import java.sql.Array;
+import java.sql.Blob;
+import java.sql.CallableStatement;
+import java.sql.Clob;
+import java.sql.Connection;
+import java.sql.NClob;
+import java.sql.PreparedStatement;
+import java.sql.SQLClientInfoException;
+import java.sql.SQLException;
+import java.sql.SQLXML;
+import java.sql.Statement;
+import java.sql.Struct;
+import java.util.Properties;
+
+import org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection;
+import org.jboss.resource.adapter.jdbc.WrappedCallableStatement;
+import org.jboss.resource.adapter.jdbc.WrappedConnection;
+import org.jboss.resource.adapter.jdbc.WrappedPreparedStatement;
+import org.jboss.resource.adapter.jdbc.WrappedStatement;
+
+/**
+ * WrappedConnectionJDK6.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at SuppressWarnings("unchecked")
+public class WrappedConnectionJDK6 extends WrappedConnection
+{
+ /**
+ * Create a new WrappedConnectionJDK6.
+ *
+ * @param mc the managed connection
+ */
+ public WrappedConnectionJDK6(BaseWrapperManagedConnection mc)
+ {
+ super(mc);
+ }
+
+ protected WrappedStatement wrapStatement(Statement statement)
+ {
+ return new WrappedStatementJDK6(this, statement);
+ }
+
+ protected WrappedPreparedStatement wrapPreparedStatement(PreparedStatement statement)
+ {
+ return new WrappedPreparedStatementJDK6(this, statement);
+ }
+
+ protected WrappedCallableStatement wrapCallableStatement(CallableStatement statement)
+ {
+ return new WrappedCallableStatementJDK6(this, statement);
+ }
+
+ public Array createArrayOf(String typeName, Object[] elements) throws SQLException
+ {
+ lock();
+ try
+ {
+ Connection c = getUnderlyingConnection();
+ try
+ {
+ return c.createArrayOf(typeName, elements);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public Blob createBlob() throws SQLException
+ {
+ lock();
+ try
+ {
+ Connection c = getUnderlyingConnection();
+ try
+ {
+ return c.createBlob();
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public Clob createClob() throws SQLException
+ {
+ lock();
+ try
+ {
+ Connection c = getUnderlyingConnection();
+ try
+ {
+ return c.createClob();
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public NClob createNClob() throws SQLException
+ {
+ lock();
+ try
+ {
+ Connection c = getUnderlyingConnection();
+ try
+ {
+ return c.createNClob();
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public SQLXML createSQLXML() throws SQLException
+ {
+ lock();
+ try
+ {
+ Connection c = getUnderlyingConnection();
+ try
+ {
+ return c.createSQLXML();
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public Struct createStruct(String typeName, Object[] attributes) throws SQLException
+ {
+ lock();
+ try
+ {
+ Connection c = getUnderlyingConnection();
+ try
+ {
+ return c.createStruct(typeName, attributes);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public Properties getClientInfo() throws SQLException
+ {
+ lock();
+ try
+ {
+ Connection c = getUnderlyingConnection();
+ try
+ {
+ return c.getClientInfo();
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public String getClientInfo(String name) throws SQLException
+ {
+ lock();
+ try
+ {
+ Connection c = getUnderlyingConnection();
+ try
+ {
+ return c.getClientInfo(name);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public boolean isValid(int timeout) throws SQLException
+ {
+ lock();
+ try
+ {
+ Connection c = getUnderlyingConnection();
+ try
+ {
+ return c.isValid(timeout);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public void setClientInfo(Properties properties) throws SQLClientInfoException
+ {
+ try
+ {
+ lock();
+ try
+ {
+ Connection c = getUnderlyingConnection();
+ try
+ {
+ c.setClientInfo(properties);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ catch (SQLClientInfoException e)
+ {
+ throw e;
+ }
+ catch (SQLException e)
+ {
+ SQLClientInfoException t = new SQLClientInfoException();
+ t.initCause(e);
+ throw t;
+ }
+ }
+ catch (SQLException e)
+ {
+ SQLClientInfoException t = new SQLClientInfoException();
+ t.initCause(e);
+ throw t;
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public void setClientInfo(String name, String value) throws SQLClientInfoException
+ {
+ try
+ {
+ lock();
+ try
+ {
+ Connection c = getUnderlyingConnection();
+ try
+ {
+ c.setClientInfo(name, value);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ catch (SQLClientInfoException e)
+ {
+ throw e;
+ }
+ catch (SQLException e)
+ {
+ SQLClientInfoException t = new SQLClientInfoException();
+ t.initCause(e);
+ throw t;
+ }
+ }
+ catch (SQLException e)
+ {
+ SQLClientInfoException t = new SQLClientInfoException();
+ t.initCause(e);
+ throw t;
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedPreparedStatementJDK6.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedPreparedStatementJDK6.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedPreparedStatementJDK6.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,493 +1,493 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jdbc.jdk6;
-
-import java.io.InputStream;
-import java.io.Reader;
-import java.sql.NClob;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
-import java.sql.RowId;
-import java.sql.SQLException;
-import java.sql.SQLXML;
-
-import org.jboss.resource.adapter.jdbc.WrappedPreparedStatement;
-import org.jboss.resource.adapter.jdbc.WrappedResultSet;
-
-/**
- * WrappedPreparedStatementJDK6.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class WrappedPreparedStatementJDK6 extends WrappedPreparedStatement
-{
- public WrappedPreparedStatementJDK6(WrappedConnectionJDK6 lc, PreparedStatement s)
- {
- super(lc, s);
- }
-
- protected WrappedResultSet wrapResultSet(ResultSet resultSet)
- {
- return new WrappedResultSetJDK6(this, resultSet);
- }
-
- public boolean isClosed() throws SQLException
- {
- lock();
- try
- {
- PreparedStatement wrapped = getWrappedObject();
- if (wrapped == null)
- return true;
- return wrapped.isClosed();
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- finally
- {
- unlock();
- }
- }
-
- public boolean isPoolable() throws SQLException
- {
- lock();
- try
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- return statement.isPoolable();
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public void setPoolable(boolean poolable) throws SQLException
- {
- lock();
- try
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setPoolable(poolable);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException
- {
- lock();
- try
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setAsciiStream(parameterIndex, x, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException
- {
- lock();
- try
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setAsciiStream(parameterIndex, x);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException
- {
- lock();
- try
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setBinaryStream(parameterIndex, x, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException
- {
- lock();
- try
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setBinaryStream(parameterIndex, x);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException
- {
- lock();
- try
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setBlob(parameterIndex, inputStream, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException
- {
- lock();
- try
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setBlob(parameterIndex, inputStream);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException
- {
- lock();
- try
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setCharacterStream(parameterIndex, reader, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException
- {
- lock();
- try
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setCharacterStream(parameterIndex, reader);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public void setClob(int parameterIndex, Reader reader, long length) throws SQLException
- {
- lock();
- try
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setClob(parameterIndex, reader, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public void setClob(int parameterIndex, Reader reader) throws SQLException
- {
- lock();
- try
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setClob(parameterIndex, reader);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException
- {
- lock();
- try
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setNCharacterStream(parameterIndex, value, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException
- {
- lock();
- try
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setNCharacterStream(parameterIndex, value);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public void setNClob(int parameterIndex, NClob value) throws SQLException
- {
- lock();
- try
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setNClob(parameterIndex, value);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException
- {
- lock();
- try
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setNClob(parameterIndex, reader, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public void setNClob(int parameterIndex, Reader reader) throws SQLException
- {
- lock();
- try
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setNClob(parameterIndex, reader);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public void setNString(int parameterIndex, String value) throws SQLException
- {
- lock();
- try
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setNString(parameterIndex, value);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public void setRowId(int parameterIndex, RowId x) throws SQLException
- {
- lock();
- try
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setRowId(parameterIndex, x);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException
- {
- lock();
- try
- {
- PreparedStatement statement = getUnderlyingStatement();
- try
- {
- statement.setSQLXML(parameterIndex, xmlObject);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jdbc.jdk6;
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.sql.NClob;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.RowId;
+import java.sql.SQLException;
+import java.sql.SQLXML;
+
+import org.jboss.resource.adapter.jdbc.WrappedPreparedStatement;
+import org.jboss.resource.adapter.jdbc.WrappedResultSet;
+
+/**
+ * WrappedPreparedStatementJDK6.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class WrappedPreparedStatementJDK6 extends WrappedPreparedStatement
+{
+ public WrappedPreparedStatementJDK6(WrappedConnectionJDK6 lc, PreparedStatement s)
+ {
+ super(lc, s);
+ }
+
+ protected WrappedResultSet wrapResultSet(ResultSet resultSet)
+ {
+ return new WrappedResultSetJDK6(this, resultSet);
+ }
+
+ public boolean isClosed() throws SQLException
+ {
+ lock();
+ try
+ {
+ PreparedStatement wrapped = getWrappedObject();
+ if (wrapped == null)
+ return true;
+ return wrapped.isClosed();
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public boolean isPoolable() throws SQLException
+ {
+ lock();
+ try
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ return statement.isPoolable();
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public void setPoolable(boolean poolable) throws SQLException
+ {
+ lock();
+ try
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setPoolable(poolable);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public void setAsciiStream(int parameterIndex, InputStream x, long length) throws SQLException
+ {
+ lock();
+ try
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setAsciiStream(parameterIndex, x, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public void setAsciiStream(int parameterIndex, InputStream x) throws SQLException
+ {
+ lock();
+ try
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setAsciiStream(parameterIndex, x);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public void setBinaryStream(int parameterIndex, InputStream x, long length) throws SQLException
+ {
+ lock();
+ try
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setBinaryStream(parameterIndex, x, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public void setBinaryStream(int parameterIndex, InputStream x) throws SQLException
+ {
+ lock();
+ try
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setBinaryStream(parameterIndex, x);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public void setBlob(int parameterIndex, InputStream inputStream, long length) throws SQLException
+ {
+ lock();
+ try
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setBlob(parameterIndex, inputStream, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public void setBlob(int parameterIndex, InputStream inputStream) throws SQLException
+ {
+ lock();
+ try
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setBlob(parameterIndex, inputStream);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public void setCharacterStream(int parameterIndex, Reader reader, long length) throws SQLException
+ {
+ lock();
+ try
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setCharacterStream(parameterIndex, reader, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public void setCharacterStream(int parameterIndex, Reader reader) throws SQLException
+ {
+ lock();
+ try
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setCharacterStream(parameterIndex, reader);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public void setClob(int parameterIndex, Reader reader, long length) throws SQLException
+ {
+ lock();
+ try
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setClob(parameterIndex, reader, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public void setClob(int parameterIndex, Reader reader) throws SQLException
+ {
+ lock();
+ try
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setClob(parameterIndex, reader);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public void setNCharacterStream(int parameterIndex, Reader value, long length) throws SQLException
+ {
+ lock();
+ try
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setNCharacterStream(parameterIndex, value, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public void setNCharacterStream(int parameterIndex, Reader value) throws SQLException
+ {
+ lock();
+ try
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setNCharacterStream(parameterIndex, value);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public void setNClob(int parameterIndex, NClob value) throws SQLException
+ {
+ lock();
+ try
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setNClob(parameterIndex, value);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public void setNClob(int parameterIndex, Reader reader, long length) throws SQLException
+ {
+ lock();
+ try
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setNClob(parameterIndex, reader, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public void setNClob(int parameterIndex, Reader reader) throws SQLException
+ {
+ lock();
+ try
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setNClob(parameterIndex, reader);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public void setNString(int parameterIndex, String value) throws SQLException
+ {
+ lock();
+ try
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setNString(parameterIndex, value);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public void setRowId(int parameterIndex, RowId x) throws SQLException
+ {
+ lock();
+ try
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setRowId(parameterIndex, x);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public void setSQLXML(int parameterIndex, SQLXML xmlObject) throws SQLException
+ {
+ lock();
+ try
+ {
+ PreparedStatement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setSQLXML(parameterIndex, xmlObject);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedResultSetJDK6.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedResultSetJDK6.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedResultSetJDK6.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,673 +1,673 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jdbc.jdk6;
-
-import java.io.InputStream;
-import java.io.Reader;
-import java.sql.NClob;
-import java.sql.ResultSet;
-import java.sql.RowId;
-import java.sql.SQLException;
-import java.sql.SQLXML;
-
-import org.jboss.resource.adapter.jdbc.WrappedResultSet;
-import org.jboss.resource.adapter.jdbc.WrappedStatement;
-
-/**
- * WrappedResultSetJDK6.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class WrappedResultSetJDK6 extends WrappedResultSet
-{
- public WrappedResultSetJDK6(WrappedStatement statement, ResultSet resultSet)
- {
- super(statement, resultSet);
- }
-
- public int getHoldability() throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- return resultSet.getHoldability();
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public Reader getNCharacterStream(int columnIndex) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- return resultSet.getNCharacterStream(columnIndex);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public Reader getNCharacterStream(String columnLabel) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- return resultSet.getNCharacterStream(columnLabel);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public NClob getNClob(int columnIndex) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- return resultSet.getNClob(columnIndex);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public NClob getNClob(String columnLabel) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- return resultSet.getNClob(columnLabel);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public String getNString(int columnIndex) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- return resultSet.getNString(columnIndex);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public String getNString(String columnLabel) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- return resultSet.getNString(columnLabel);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public RowId getRowId(int columnIndex) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- return resultSet.getRowId(columnIndex);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public RowId getRowId(String columnLabel) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- return resultSet.getRowId(columnLabel);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public SQLXML getSQLXML(int columnIndex) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- return resultSet.getSQLXML(columnIndex);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public SQLXML getSQLXML(String columnLabel) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- return resultSet.getSQLXML(columnLabel);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public boolean isClosed() throws SQLException
- {
- ResultSet resultSet = getWrappedObject();
- if (resultSet == null)
- return true;
- try
- {
- return resultSet.isClosed();
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateAsciiStream(columnIndex, x, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateAsciiStream(int columnIndex, InputStream x) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateAsciiStream(columnIndex, x);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateAsciiStream(columnLabel, x, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateAsciiStream(String columnLabel, InputStream x) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateAsciiStream(columnLabel, x);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateBinaryStream(int columnIndex, InputStream x, long length) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateBinaryStream(columnIndex, x, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateBinaryStream(int columnIndex, InputStream x) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateBinaryStream(columnIndex, x);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateBinaryStream(String columnLabel, InputStream x, long length) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateBinaryStream(columnLabel, x, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateBinaryStream(String columnLabel, InputStream x) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateBinaryStream(columnLabel, x);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateBlob(columnIndex, inputStream, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateBlob(columnIndex, inputStream);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateBlob(columnLabel, inputStream, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateBlob(columnLabel, inputStream);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateCharacterStream(int columnIndex, Reader x, long length) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateCharacterStream(columnIndex, x, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateCharacterStream(int columnIndex, Reader x) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateCharacterStream(columnIndex, x);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateCharacterStream(String columnLabel, Reader reader, long length) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateCharacterStream(columnLabel, reader, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateCharacterStream(String columnLabel, Reader reader) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateCharacterStream(columnLabel, reader);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateClob(int columnIndex, Reader reader, long length) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateClob(columnIndex, reader, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateClob(int columnIndex, Reader reader) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateClob(columnIndex, reader);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateClob(String columnLabel, Reader reader, long length) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateClob(columnLabel, reader, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateClob(String columnLabel, Reader reader) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateClob(columnLabel, reader);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateNCharacterStream(int columnIndex, Reader x, long length) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateNCharacterStream(columnIndex, x, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateNCharacterStream(int columnIndex, Reader x) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateNCharacterStream(columnIndex, x);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateNCharacterStream(columnLabel, reader, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateNCharacterStream(String columnLabel, Reader reader) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateNCharacterStream(columnLabel, reader);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateNClob(int columnIndex, NClob clob) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateNClob(columnIndex, clob);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateNClob(columnIndex, reader, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateNClob(int columnIndex, Reader reader) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateNClob(columnIndex, reader);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateNClob(String columnLabel, NClob clob) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateNClob(columnLabel, clob);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateNClob(columnLabel, reader, length);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateNClob(String columnLabel, Reader reader) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateNClob(columnLabel, reader);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateNString(int columnIndex, String string) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateNString(columnIndex, string);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateNString(String columnLabel, String string) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateNString(columnLabel, string);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateRowId(int columnIndex, RowId x) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateRowId(columnIndex, x);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateRowId(String columnLabel, RowId x) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateRowId(columnLabel, x);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateSQLXML(columnIndex, xmlObject);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-
- public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException
- {
- ResultSet resultSet = getUnderlyingResultSet();
- try
- {
- resultSet.updateSQLXML(columnLabel, xmlObject);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jdbc.jdk6;
+
+import java.io.InputStream;
+import java.io.Reader;
+import java.sql.NClob;
+import java.sql.ResultSet;
+import java.sql.RowId;
+import java.sql.SQLException;
+import java.sql.SQLXML;
+
+import org.jboss.resource.adapter.jdbc.WrappedResultSet;
+import org.jboss.resource.adapter.jdbc.WrappedStatement;
+
+/**
+ * WrappedResultSetJDK6.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class WrappedResultSetJDK6 extends WrappedResultSet
+{
+ public WrappedResultSetJDK6(WrappedStatement statement, ResultSet resultSet)
+ {
+ super(statement, resultSet);
+ }
+
+ public int getHoldability() throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ return resultSet.getHoldability();
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public Reader getNCharacterStream(int columnIndex) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ return resultSet.getNCharacterStream(columnIndex);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public Reader getNCharacterStream(String columnLabel) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ return resultSet.getNCharacterStream(columnLabel);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public NClob getNClob(int columnIndex) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ return resultSet.getNClob(columnIndex);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public NClob getNClob(String columnLabel) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ return resultSet.getNClob(columnLabel);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public String getNString(int columnIndex) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ return resultSet.getNString(columnIndex);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public String getNString(String columnLabel) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ return resultSet.getNString(columnLabel);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public RowId getRowId(int columnIndex) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ return resultSet.getRowId(columnIndex);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public RowId getRowId(String columnLabel) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ return resultSet.getRowId(columnLabel);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public SQLXML getSQLXML(int columnIndex) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ return resultSet.getSQLXML(columnIndex);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public SQLXML getSQLXML(String columnLabel) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ return resultSet.getSQLXML(columnLabel);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public boolean isClosed() throws SQLException
+ {
+ ResultSet resultSet = getWrappedObject();
+ if (resultSet == null)
+ return true;
+ try
+ {
+ return resultSet.isClosed();
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateAsciiStream(int columnIndex, InputStream x, long length) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateAsciiStream(columnIndex, x, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateAsciiStream(int columnIndex, InputStream x) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateAsciiStream(columnIndex, x);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateAsciiStream(String columnLabel, InputStream x, long length) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateAsciiStream(columnLabel, x, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateAsciiStream(String columnLabel, InputStream x) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateAsciiStream(columnLabel, x);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateBinaryStream(int columnIndex, InputStream x, long length) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateBinaryStream(columnIndex, x, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateBinaryStream(int columnIndex, InputStream x) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateBinaryStream(columnIndex, x);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateBinaryStream(String columnLabel, InputStream x, long length) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateBinaryStream(columnLabel, x, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateBinaryStream(String columnLabel, InputStream x) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateBinaryStream(columnLabel, x);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateBlob(int columnIndex, InputStream inputStream, long length) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateBlob(columnIndex, inputStream, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateBlob(int columnIndex, InputStream inputStream) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateBlob(columnIndex, inputStream);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateBlob(String columnLabel, InputStream inputStream, long length) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateBlob(columnLabel, inputStream, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateBlob(String columnLabel, InputStream inputStream) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateBlob(columnLabel, inputStream);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateCharacterStream(int columnIndex, Reader x, long length) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateCharacterStream(columnIndex, x, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateCharacterStream(int columnIndex, Reader x) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateCharacterStream(columnIndex, x);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateCharacterStream(String columnLabel, Reader reader, long length) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateCharacterStream(columnLabel, reader, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateCharacterStream(String columnLabel, Reader reader) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateCharacterStream(columnLabel, reader);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateClob(int columnIndex, Reader reader, long length) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateClob(columnIndex, reader, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateClob(int columnIndex, Reader reader) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateClob(columnIndex, reader);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateClob(String columnLabel, Reader reader, long length) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateClob(columnLabel, reader, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateClob(String columnLabel, Reader reader) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateClob(columnLabel, reader);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateNCharacterStream(int columnIndex, Reader x, long length) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateNCharacterStream(columnIndex, x, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateNCharacterStream(int columnIndex, Reader x) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateNCharacterStream(columnIndex, x);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateNCharacterStream(String columnLabel, Reader reader, long length) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateNCharacterStream(columnLabel, reader, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateNCharacterStream(String columnLabel, Reader reader) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateNCharacterStream(columnLabel, reader);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateNClob(int columnIndex, NClob clob) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateNClob(columnIndex, clob);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateNClob(int columnIndex, Reader reader, long length) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateNClob(columnIndex, reader, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateNClob(int columnIndex, Reader reader) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateNClob(columnIndex, reader);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateNClob(String columnLabel, NClob clob) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateNClob(columnLabel, clob);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateNClob(String columnLabel, Reader reader, long length) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateNClob(columnLabel, reader, length);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateNClob(String columnLabel, Reader reader) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateNClob(columnLabel, reader);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateNString(int columnIndex, String string) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateNString(columnIndex, string);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateNString(String columnLabel, String string) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateNString(columnLabel, string);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateRowId(int columnIndex, RowId x) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateRowId(columnIndex, x);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateRowId(String columnLabel, RowId x) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateRowId(columnLabel, x);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateSQLXML(int columnIndex, SQLXML xmlObject) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateSQLXML(columnIndex, xmlObject);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+
+ public void updateSQLXML(String columnLabel, SQLXML xmlObject) throws SQLException
+ {
+ ResultSet resultSet = getUnderlyingResultSet();
+ try
+ {
+ resultSet.updateSQLXML(columnLabel, xmlObject);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedStatementJDK6.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedStatementJDK6.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/jdk6/WrappedStatementJDK6.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,110 +1,110 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jdbc.jdk6;
-
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-
-import org.jboss.resource.adapter.jdbc.WrappedResultSet;
-import org.jboss.resource.adapter.jdbc.WrappedStatement;
-
-/**
- * WrappedStatementJDK6.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class WrappedStatementJDK6 extends WrappedStatement
-{
- public WrappedStatementJDK6(WrappedConnectionJDK6 lc, Statement s)
- {
- super(lc, s);
- }
-
- protected WrappedResultSet wrapResultSet(ResultSet resultSet)
- {
- return new WrappedResultSetJDK6(this, resultSet);
- }
-
- public boolean isClosed() throws SQLException
- {
- lock();
- try
- {
- Statement wrapped = getWrappedObject();
- if (wrapped == null)
- return true;
- return wrapped.isClosed();
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- finally
- {
- unlock();
- }
- }
-
- public boolean isPoolable() throws SQLException
- {
- lock();
- try
- {
- Statement statement = getUnderlyingStatement();
- try
- {
- return statement.isPoolable();
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-
- public void setPoolable(boolean poolable) throws SQLException
- {
- lock();
- try
- {
- Statement statement = getUnderlyingStatement();
- try
- {
- statement.setPoolable(poolable);
- }
- catch (Throwable t)
- {
- throw checkException(t);
- }
- }
- finally
- {
- unlock();
- }
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jdbc.jdk6;
+
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+
+import org.jboss.resource.adapter.jdbc.WrappedResultSet;
+import org.jboss.resource.adapter.jdbc.WrappedStatement;
+
+/**
+ * WrappedStatementJDK6.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class WrappedStatementJDK6 extends WrappedStatement
+{
+ public WrappedStatementJDK6(WrappedConnectionJDK6 lc, Statement s)
+ {
+ super(lc, s);
+ }
+
+ protected WrappedResultSet wrapResultSet(ResultSet resultSet)
+ {
+ return new WrappedResultSetJDK6(this, resultSet);
+ }
+
+ public boolean isClosed() throws SQLException
+ {
+ lock();
+ try
+ {
+ Statement wrapped = getWrappedObject();
+ if (wrapped == null)
+ return true;
+ return wrapped.isClosed();
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public boolean isPoolable() throws SQLException
+ {
+ lock();
+ try
+ {
+ Statement statement = getUnderlyingStatement();
+ try
+ {
+ return statement.isPoolable();
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+
+ public void setPoolable(boolean poolable) throws SQLException
+ {
+ lock();
+ try
+ {
+ Statement statement = getUnderlyingStatement();
+ try
+ {
+ statement.setPoolable(poolable);
+ }
+ catch (Throwable t)
+ {
+ throw checkException(t);
+ }
+ }
+ finally
+ {
+ unlock();
+ }
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/vendor/DB2StaleConnectionChecker.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/vendor/DB2StaleConnectionChecker.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/vendor/DB2StaleConnectionChecker.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,46 +1,46 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jdbc.vendor;
-
-import java.sql.SQLException;
-
-import org.jboss.resource.adapter.jdbc.StaleConnectionChecker;
-
-/**
- * A DB2StaleConnectionChecker.
- *
- * @author <a href="weston.price at jboss.com">Weston Price</a>
- * @version $Revision: 1.1 $
- */
-public class DB2StaleConnectionChecker implements StaleConnectionChecker
-{
-
- public boolean isStaleConnection(SQLException e)
- {
-
- final int code = Math.abs(e.getErrorCode());
-
- return false;
-
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jdbc.vendor;
+
+import java.sql.SQLException;
+
+import org.jboss.resource.adapter.jdbc.StaleConnectionChecker;
+
+/**
+ * A DB2StaleConnectionChecker.
+ *
+ * @author <a href="weston.price at jboss.com">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public class DB2StaleConnectionChecker implements StaleConnectionChecker
+{
+
+ public boolean isStaleConnection(SQLException e)
+ {
+
+ final int code = Math.abs(e.getErrorCode());
+
+ return false;
+
+ }
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/vendor/MSSQLValidConnectionChecker.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/vendor/MSSQLValidConnectionChecker.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/vendor/MSSQLValidConnectionChecker.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,83 +1,83 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jdbc.vendor;
-
-import java.io.Serializable;
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.sql.Statement;
-
-import org.jboss.logging.Logger;
-import org.jboss.resource.adapter.jdbc.ValidConnectionChecker;
-
-/**
- * A MSSQLValidConnectionChecker.
- *
- * @author <a href="weston.price at jboss.com">Weston Price</a>
- * @version $Revision$
- */
-public class MSSQLValidConnectionChecker implements ValidConnectionChecker, Serializable
-{
- private static final String QUERY = "SELECT 1";
- private static final Logger log = Logger.getLogger(MSSQLValidConnectionChecker.class);
-
- /** The serialVersionUID */
- private static final long serialVersionUID = 3995516551833725723L;
-
- public SQLException isValidConnection(final Connection c)
- {
- SQLException sqe = null;
- Statement stmt = null;
-
- try
- {
- stmt = c.createStatement();
- stmt.execute(QUERY);
- }
-
- catch (SQLException e)
- {
- log.warn("warning: connection validation failed for current managed connection.");
- sqe = e;
- }
- finally
- {
- try
- {
- if(stmt != null)
- {
- stmt.close();
-
- }
- }
- catch (SQLException e)
- {
- log.warn("simple close failed for managed connection", e);
-
- }
-
- }
-
- return sqe;
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jdbc.vendor;
+
+import java.io.Serializable;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Statement;
+
+import org.jboss.logging.Logger;
+import org.jboss.resource.adapter.jdbc.ValidConnectionChecker;
+
+/**
+ * A MSSQLValidConnectionChecker.
+ *
+ * @author <a href="weston.price at jboss.com">Weston Price</a>
+ * @version $Revision$
+ */
+public class MSSQLValidConnectionChecker implements ValidConnectionChecker, Serializable
+{
+ private static final String QUERY = "SELECT 1";
+ private static final Logger log = Logger.getLogger(MSSQLValidConnectionChecker.class);
+
+ /** The serialVersionUID */
+ private static final long serialVersionUID = 3995516551833725723L;
+
+ public SQLException isValidConnection(final Connection c)
+ {
+ SQLException sqe = null;
+ Statement stmt = null;
+
+ try
+ {
+ stmt = c.createStatement();
+ stmt.execute(QUERY);
+ }
+
+ catch (SQLException e)
+ {
+ log.warn("warning: connection validation failed for current managed connection.");
+ sqe = e;
+ }
+ finally
+ {
+ try
+ {
+ if(stmt != null)
+ {
+ stmt.close();
+
+ }
+ }
+ catch (SQLException e)
+ {
+ log.warn("simple close failed for managed connection", e);
+
+ }
+
+ }
+
+ return sqe;
+ }
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/vendor/MySQLReplicationValidConnectionChecker.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/vendor/MySQLReplicationValidConnectionChecker.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/vendor/MySQLReplicationValidConnectionChecker.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,261 +1,261 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jdbc.vendor;
-
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.Serializable;
-import java.lang.reflect.Method;
-import java.sql.Connection;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-
-import org.jboss.logging.Logger;
-import org.jboss.resource.adapter.jdbc.ValidConnectionChecker;
-
-/**
- * <p>This class is an implementation of ValidConnectionChecker for MySQL
- * ReplicatedDriver. It supports both isValid and ping methods on the
- * connection object.
- *
- * <p>Please note that the isValid method requires java 6 classes to be present.
- *
- * <p>The code was inspired by MySQLValidConnectionChecker. See it's javadoc for
- * authors info. This code is released under the LGPL license.
- *
- * @author Luc Boudreau (lucboudreau att gmail dott com)
- *
- */
-public class MySQLReplicationValidConnectionChecker implements ValidConnectionChecker, Serializable
-{
- /**
- * Serial version ID
- */
- private static final long serialVersionUID = 2658231045989623858L;
-
- /**
- * Tells if the connection supports the isValid method.
- * (Java 6 only)
- */
- private boolean driverHasIsValidMethod;
-
- private transient Method isValid;
-
- /**
- * Tells if the connection supports the ping method.
- */
- private boolean driverHasPingMethod;
-
- private transient Method ping;
-
- /**
- * Classname of the supported connection
- */
- protected final static String CONNECTION_CLASS = "com.mysql.jdbc.ReplicationConnection";
-
- /**
- * Log access object
- */
- private static transient Logger log;
-
- // The timeout (apparently the timeout is ignored?)
- private static Object[] timeoutParam = new Object[] {};
-
- /**
- * Initiates the ValidConnectionChecker implementation.
- */
- public MySQLReplicationValidConnectionChecker()
- {
- try
- {
- initPing();
- }
- catch (Exception e)
- {
- log.warn("Cannot find the driver class defined in CONNECTION_CLASS. Will use 'SELECT 1' instead.", e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.jboss.resource.adapter.jdbc.ValidConnectionChecker#isValidConnection(java.sql.Connection)
- */
- public SQLException isValidConnection(Connection c)
- {
- if (driverHasIsValidMethod)
- {
- try
- {
- isValid.invoke(c, timeoutParam);
- }
- catch (Exception e)
- {
- if (e instanceof SQLException)
- {
- return (SQLException) e;
- }
- else
- {
- log.warn("Unexpected error in ping", e);
- return new SQLException("ping failed: " + e.toString());
- }
- }
- }
- else if (driverHasPingMethod)
- {
- //if there is a ping method then use it
- try
- {
- ping.invoke(c, timeoutParam);
- }
- catch (Exception e)
- {
- if (e instanceof SQLException)
- {
- return (SQLException) e;
- }
- else
- {
- log.warn("Unexpected error in ping", e);
- return new SQLException("ping failed: " + e.toString());
- }
- }
- }
- else
- {
- //otherwise just use a 'SELECT 1' statement
-
- Statement stmt = null;
- ResultSet rs = null;
-
- try
- {
- stmt = c.createStatement();
- rs = stmt.executeQuery("SELECT 1");
- }
- catch (Exception e)
- {
- if (e instanceof SQLException)
- {
- return (SQLException) e;
- }
- else
- {
- log.warn("Unexpected error in ping (SELECT 1)", e);
- return new SQLException("ping (SELECT 1) failed: " + e.toString());
- }
-
- }
- finally
- {
- // Cleanup everything and make sure to handle
- // sql exceptions occuring
- try
- {
- if (rs != null)
- rs.close();
- }
- catch (SQLException e)
- {
- }
- try
- {
- if (stmt != null)
- stmt.close();
- }
- catch (SQLException e)
- {
- }
- }
- }
- return null;
- }
-
-
- private void initPing() throws ClassNotFoundException, NoSuchMethodException
- {
- driverHasIsValidMethod = false;
- driverHasPingMethod = false;
-
- log = Logger.getLogger(MySQLReplicationValidConnectionChecker.class);
-
- // Load connection class
- Class mysqlConnection = Thread.currentThread().getContextClassLoader().loadClass( CONNECTION_CLASS );
-
- // Check for Java 6 compatibility and use isValid on the connection
- try
- {
- isValid = mysqlConnection.getMethod("isValid", new Class[] {});
- driverHasIsValidMethod = true;
- }
- catch (NoSuchMethodException e)
- {
- // Notify someone
- log.info("Cannot resolve com.mysq.jdbc.ReplicationConnection.isValid method. Fallback to ping.", e);
- }
- catch (SecurityException e)
- {
- // Notify someone
- log.info("Cannot resolve com.mysq.jdbc.ReplicationConnection.isValid method. Fallback to ping.", e);
- }
-
- if (!driverHasIsValidMethod)
- {
- try
- {
- // Check for ping method
- ping = mysqlConnection.getMethod("ping", new Class[] {});
- driverHasPingMethod = true;
- }
- catch (NoSuchMethodException e)
- {
- // Notify someone
- log.warn("Cannot resolve com.mysq.jdbc.ReplicationConnection.ping method. Will use 'SELECT 1' instead.", e);
- }
- catch (SecurityException e)
- {
- // Notify someone
- log.info("Cannot resolve com.mysq.jdbc.ReplicationConnection.ping method. Will use 'SELECT 1' instead.", e);
- }
- }
- }
-
- private void writeObject(ObjectOutputStream stream) throws IOException
- {
- // nothing
- }
-
- private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException
- {
- try
- {
- initPing();
- }
- catch (Exception e)
- {
- IOException ioe = new IOException("Unable to resolve ping method: " + e.getMessage());
- ioe.initCause(e);
- throw ioe;
- }
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jdbc.vendor;
+
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+import java.lang.reflect.Method;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+
+import org.jboss.logging.Logger;
+import org.jboss.resource.adapter.jdbc.ValidConnectionChecker;
+
+/**
+ * <p>This class is an implementation of ValidConnectionChecker for MySQL
+ * ReplicatedDriver. It supports both isValid and ping methods on the
+ * connection object.
+ *
+ * <p>Please note that the isValid method requires java 6 classes to be present.
+ *
+ * <p>The code was inspired by MySQLValidConnectionChecker. See it's javadoc for
+ * authors info. This code is released under the LGPL license.
+ *
+ * @author Luc Boudreau (lucboudreau att gmail dott com)
+ *
+ */
+public class MySQLReplicationValidConnectionChecker implements ValidConnectionChecker, Serializable
+{
+ /**
+ * Serial version ID
+ */
+ private static final long serialVersionUID = 2658231045989623858L;
+
+ /**
+ * Tells if the connection supports the isValid method.
+ * (Java 6 only)
+ */
+ private boolean driverHasIsValidMethod;
+
+ private transient Method isValid;
+
+ /**
+ * Tells if the connection supports the ping method.
+ */
+ private boolean driverHasPingMethod;
+
+ private transient Method ping;
+
+ /**
+ * Classname of the supported connection
+ */
+ protected final static String CONNECTION_CLASS = "com.mysql.jdbc.ReplicationConnection";
+
+ /**
+ * Log access object
+ */
+ private static transient Logger log;
+
+ // The timeout (apparently the timeout is ignored?)
+ private static Object[] timeoutParam = new Object[] {};
+
+ /**
+ * Initiates the ValidConnectionChecker implementation.
+ */
+ public MySQLReplicationValidConnectionChecker()
+ {
+ try
+ {
+ initPing();
+ }
+ catch (Exception e)
+ {
+ log.warn("Cannot find the driver class defined in CONNECTION_CLASS. Will use 'SELECT 1' instead.", e);
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.jboss.resource.adapter.jdbc.ValidConnectionChecker#isValidConnection(java.sql.Connection)
+ */
+ public SQLException isValidConnection(Connection c)
+ {
+ if (driverHasIsValidMethod)
+ {
+ try
+ {
+ isValid.invoke(c, timeoutParam);
+ }
+ catch (Exception e)
+ {
+ if (e instanceof SQLException)
+ {
+ return (SQLException) e;
+ }
+ else
+ {
+ log.warn("Unexpected error in ping", e);
+ return new SQLException("ping failed: " + e.toString());
+ }
+ }
+ }
+ else if (driverHasPingMethod)
+ {
+ //if there is a ping method then use it
+ try
+ {
+ ping.invoke(c, timeoutParam);
+ }
+ catch (Exception e)
+ {
+ if (e instanceof SQLException)
+ {
+ return (SQLException) e;
+ }
+ else
+ {
+ log.warn("Unexpected error in ping", e);
+ return new SQLException("ping failed: " + e.toString());
+ }
+ }
+ }
+ else
+ {
+ //otherwise just use a 'SELECT 1' statement
+
+ Statement stmt = null;
+ ResultSet rs = null;
+
+ try
+ {
+ stmt = c.createStatement();
+ rs = stmt.executeQuery("SELECT 1");
+ }
+ catch (Exception e)
+ {
+ if (e instanceof SQLException)
+ {
+ return (SQLException) e;
+ }
+ else
+ {
+ log.warn("Unexpected error in ping (SELECT 1)", e);
+ return new SQLException("ping (SELECT 1) failed: " + e.toString());
+ }
+
+ }
+ finally
+ {
+ // Cleanup everything and make sure to handle
+ // sql exceptions occuring
+ try
+ {
+ if (rs != null)
+ rs.close();
+ }
+ catch (SQLException e)
+ {
+ }
+ try
+ {
+ if (stmt != null)
+ stmt.close();
+ }
+ catch (SQLException e)
+ {
+ }
+ }
+ }
+ return null;
+ }
+
+
+ private void initPing() throws ClassNotFoundException, NoSuchMethodException
+ {
+ driverHasIsValidMethod = false;
+ driverHasPingMethod = false;
+
+ log = Logger.getLogger(MySQLReplicationValidConnectionChecker.class);
+
+ // Load connection class
+ Class mysqlConnection = Thread.currentThread().getContextClassLoader().loadClass( CONNECTION_CLASS );
+
+ // Check for Java 6 compatibility and use isValid on the connection
+ try
+ {
+ isValid = mysqlConnection.getMethod("isValid", new Class[] {});
+ driverHasIsValidMethod = true;
+ }
+ catch (NoSuchMethodException e)
+ {
+ // Notify someone
+ log.info("Cannot resolve com.mysq.jdbc.ReplicationConnection.isValid method. Fallback to ping.", e);
+ }
+ catch (SecurityException e)
+ {
+ // Notify someone
+ log.info("Cannot resolve com.mysq.jdbc.ReplicationConnection.isValid method. Fallback to ping.", e);
+ }
+
+ if (!driverHasIsValidMethod)
+ {
+ try
+ {
+ // Check for ping method
+ ping = mysqlConnection.getMethod("ping", new Class[] {});
+ driverHasPingMethod = true;
+ }
+ catch (NoSuchMethodException e)
+ {
+ // Notify someone
+ log.warn("Cannot resolve com.mysq.jdbc.ReplicationConnection.ping method. Will use 'SELECT 1' instead.", e);
+ }
+ catch (SecurityException e)
+ {
+ // Notify someone
+ log.info("Cannot resolve com.mysq.jdbc.ReplicationConnection.ping method. Will use 'SELECT 1' instead.", e);
+ }
+ }
+ }
+
+ private void writeObject(ObjectOutputStream stream) throws IOException
+ {
+ // nothing
+ }
+
+ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException
+ {
+ try
+ {
+ initPing();
+ }
+ catch (Exception e)
+ {
+ IOException ioe = new IOException("Unable to resolve ping method: " + e.getMessage());
+ ioe.initCause(e);
+ throw ioe;
+ }
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/vendor/OracleStaleConnectionChecker.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/vendor/OracleStaleConnectionChecker.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/vendor/OracleStaleConnectionChecker.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,52 +1,52 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jdbc.vendor;
-
-import java.sql.SQLException;
-
-import org.jboss.resource.adapter.jdbc.StaleConnectionChecker;
-
-/**
- * A OracleStaleConnectionChecker.
- *
- * @author <a href="weston.price at jboss.com">Weston Price</a>
- * @version $Revision: 1.1 $
- */
-public class OracleStaleConnectionChecker implements StaleConnectionChecker
-{
-
- public boolean isStaleConnection(SQLException e)
- {
-
- final int error_code = Math.abs(e.getErrorCode());
-
- if(( error_code == 1014 )
- || ( error_code == 1033 )
- || ( error_code == 1034 ))
- {
- return true;
- }
-
- return false;
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jdbc.vendor;
+
+import java.sql.SQLException;
+
+import org.jboss.resource.adapter.jdbc.StaleConnectionChecker;
+
+/**
+ * A OracleStaleConnectionChecker.
+ *
+ * @author <a href="weston.price at jboss.com">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public class OracleStaleConnectionChecker implements StaleConnectionChecker
+{
+
+ public boolean isStaleConnection(SQLException e)
+ {
+
+ final int error_code = Math.abs(e.getErrorCode());
+
+ if(( error_code == 1014 )
+ || ( error_code == 1033 )
+ || ( error_code == 1034 ))
+ {
+ return true;
+ }
+
+ return false;
+ }
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jdbc/vendor/SybaseValidConnectionChecker.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jdbc/vendor/SybaseValidConnectionChecker.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jdbc/vendor/SybaseValidConnectionChecker.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,102 +1,102 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jdbc.vendor;
-
-import java.io.Serializable;
-import java.sql.Connection;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-
-import org.jboss.logging.Logger;
-import org.jboss.resource.adapter.jdbc.ValidConnectionChecker;
-
-/**
- * A SybaseValidConnectionChecker.
- *
- * @author <a href="weston.price at jboss.com">Weston Price</a>
- * @version $Revision: 1.1 $
- */
-public class SybaseValidConnectionChecker implements ValidConnectionChecker, Serializable
-{
- private static final Logger log = Logger.getLogger(SybaseValidConnectionChecker.class);
-
- /** The serialVersionUID */
- private static final long serialVersionUID = 4179707462244257791L;
-
- /** The VALID_QUERY */
- private static final String VALID_QUERY = "SELECT getdate()";
-
-
- public SQLException isValidConnection(Connection c)
- {
- SQLException sqe = null;
- Statement s = null;
- ResultSet rs = null;
-
- try
- {
- s = c.createStatement();
- rs = s.executeQuery(VALID_QUERY);
-
- }catch (SQLException e)
- {
-
- sqe = e;
-
- }finally
- {
-
- try
- {
- if(s != null)
- {
- s.close();
-
- }
- }
-
- catch (SQLException ignore)
- {
- log.warn("JDBC resource for " + this + " could not be closed");
-
- }
-
- try
- {
- if(rs != null)
- {
- rs.close();
- }
- }
-
- catch (SQLException ignore)
- {
- log.warn("JDBC resource for " + this + " could not be closed");
- }
- }
-
-
- return sqe;
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jdbc.vendor;
+
+import java.io.Serializable;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+
+import org.jboss.logging.Logger;
+import org.jboss.resource.adapter.jdbc.ValidConnectionChecker;
+
+/**
+ * A SybaseValidConnectionChecker.
+ *
+ * @author <a href="weston.price at jboss.com">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public class SybaseValidConnectionChecker implements ValidConnectionChecker, Serializable
+{
+ private static final Logger log = Logger.getLogger(SybaseValidConnectionChecker.class);
+
+ /** The serialVersionUID */
+ private static final long serialVersionUID = 4179707462244257791L;
+
+ /** The VALID_QUERY */
+ private static final String VALID_QUERY = "SELECT getdate()";
+
+
+ public SQLException isValidConnection(Connection c)
+ {
+ SQLException sqe = null;
+ Statement s = null;
+ ResultSet rs = null;
+
+ try
+ {
+ s = c.createStatement();
+ rs = s.executeQuery(VALID_QUERY);
+
+ }catch (SQLException e)
+ {
+
+ sqe = e;
+
+ }finally
+ {
+
+ try
+ {
+ if(s != null)
+ {
+ s.close();
+
+ }
+ }
+
+ catch (SQLException ignore)
+ {
+ log.warn("JDBC resource for " + this + " could not be closed");
+
+ }
+
+ try
+ {
+ if(rs != null)
+ {
+ rs.close();
+ }
+ }
+
+ catch (SQLException ignore)
+ {
+ log.warn("JDBC resource for " + this + " could not be closed");
+ }
+ }
+
+
+ return sqe;
+ }
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jms/JmsMessageProducer.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jms/JmsMessageProducer.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jms/JmsMessageProducer.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,216 +1,216 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jms;
-
-import javax.jms.Destination;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageProducer;
-
-import org.jboss.logging.Logger;
-
-/**
- * JmsMessageProducer.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class JmsMessageProducer implements MessageProducer
-{
- private static final Logger log = Logger.getLogger(JmsMessageConsumer.class);
-
- /** The wrapped message producer */
- MessageProducer producer;
-
- /** The session for this consumer */
- JmsSession session;
-
- /** Whether trace is enabled */
- private boolean trace = log.isTraceEnabled();
-
- /**
- * Create a new wrapper
- *
- * @param producer the producer
- * @param session the session
- */
- public JmsMessageProducer(MessageProducer producer, JmsSession session)
- {
- this.producer = producer;
- this.session = session;
-
- if (trace)
- log.trace("new JmsMessageProducer " + this + " producer=" + producer + " session=" + session);
- }
-
- public void close() throws JMSException
- {
- if (trace)
- log.trace("close " + this);
- try
- {
- closeProducer();
- }
- finally
- {
- session.removeProducer(this);
- }
- }
-
- public void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive)
- throws JMSException
- {
- session.lock();
- try
- {
- if (trace)
- log.trace("send " + this + " destination=" + destination + " message=" + message + " deliveryMode=" + deliveryMode + " priority=" + priority + " ttl=" + timeToLive);
- checkState();
- producer.send(destination, message, deliveryMode, priority, timeToLive);
- if (trace)
- log.trace("sent " + this + " result=" + message);
- }
- finally
- {
- session.unlock();
- }
- }
-
- public void send(Destination destination, Message message) throws JMSException
- {
- session.lock();
- try
- {
- if (trace)
- log.trace("send " + this + " destination=" + destination + " message=" + message);
- checkState();
- producer.send(destination, message);
- if (trace)
- log.trace("sent " + this + " result=" + message);
- }
- finally
- {
- session.unlock();
- }
- }
-
- public void send(Message message, int deliveryMode, int priority, long timeToLive) throws JMSException
- {
- session.lock();
- try
- {
- if (trace)
- log.trace("send " + this + " message=" + message + " deliveryMode=" + deliveryMode + " priority=" + priority + " ttl=" + timeToLive);
- checkState();
- producer.send(message, deliveryMode, priority, timeToLive);
- if (trace)
- log.trace("sent " + this + " result=" + message);
- }
- finally
- {
- session.unlock();
- }
- }
-
- public void send(Message message) throws JMSException
- {
- session.lock();
- try
- {
- if (trace)
- log.trace("send " + this + " message=" + message);
- checkState();
- producer.send(message);
- if (trace)
- log.trace("sent " + this + " result=" + message);
- }
- finally
- {
- session.unlock();
- }
- }
-
- public int getDeliveryMode() throws JMSException
- {
- return producer.getDeliveryMode();
- }
-
- public Destination getDestination() throws JMSException
- {
- return producer.getDestination();
- }
-
- public boolean getDisableMessageID() throws JMSException
- {
- return producer.getDisableMessageID();
- }
-
- public boolean getDisableMessageTimestamp() throws JMSException
- {
- return producer.getDisableMessageTimestamp();
- }
-
- public int getPriority() throws JMSException
- {
- return producer.getPriority();
- }
-
- public long getTimeToLive() throws JMSException
- {
- return producer.getTimeToLive();
- }
-
- public void setDeliveryMode(int deliveryMode) throws JMSException
- {
- producer.setDeliveryMode(deliveryMode);
- }
-
- public void setDisableMessageID(boolean value) throws JMSException
- {
- producer.setDisableMessageID(value);
- }
-
- public void setDisableMessageTimestamp(boolean value) throws JMSException
- {
- producer.setDisableMessageTimestamp(value);
- }
-
- public void setPriority(int defaultPriority) throws JMSException
- {
- producer.setPriority(defaultPriority);
- }
-
- public void setTimeToLive(long timeToLive) throws JMSException
- {
- producer.setTimeToLive(timeToLive);
- }
-
- void checkState() throws JMSException
- {
- session.checkTransactionActive();
- }
-
- void closeProducer() throws JMSException
- {
- producer.close();
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jms;
+
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageProducer;
+
+import org.jboss.logging.Logger;
+
+/**
+ * JmsMessageProducer.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class JmsMessageProducer implements MessageProducer
+{
+ private static final Logger log = Logger.getLogger(JmsMessageConsumer.class);
+
+ /** The wrapped message producer */
+ MessageProducer producer;
+
+ /** The session for this consumer */
+ JmsSession session;
+
+ /** Whether trace is enabled */
+ private boolean trace = log.isTraceEnabled();
+
+ /**
+ * Create a new wrapper
+ *
+ * @param producer the producer
+ * @param session the session
+ */
+ public JmsMessageProducer(MessageProducer producer, JmsSession session)
+ {
+ this.producer = producer;
+ this.session = session;
+
+ if (trace)
+ log.trace("new JmsMessageProducer " + this + " producer=" + producer + " session=" + session);
+ }
+
+ public void close() throws JMSException
+ {
+ if (trace)
+ log.trace("close " + this);
+ try
+ {
+ closeProducer();
+ }
+ finally
+ {
+ session.removeProducer(this);
+ }
+ }
+
+ public void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive)
+ throws JMSException
+ {
+ session.lock();
+ try
+ {
+ if (trace)
+ log.trace("send " + this + " destination=" + destination + " message=" + message + " deliveryMode=" + deliveryMode + " priority=" + priority + " ttl=" + timeToLive);
+ checkState();
+ producer.send(destination, message, deliveryMode, priority, timeToLive);
+ if (trace)
+ log.trace("sent " + this + " result=" + message);
+ }
+ finally
+ {
+ session.unlock();
+ }
+ }
+
+ public void send(Destination destination, Message message) throws JMSException
+ {
+ session.lock();
+ try
+ {
+ if (trace)
+ log.trace("send " + this + " destination=" + destination + " message=" + message);
+ checkState();
+ producer.send(destination, message);
+ if (trace)
+ log.trace("sent " + this + " result=" + message);
+ }
+ finally
+ {
+ session.unlock();
+ }
+ }
+
+ public void send(Message message, int deliveryMode, int priority, long timeToLive) throws JMSException
+ {
+ session.lock();
+ try
+ {
+ if (trace)
+ log.trace("send " + this + " message=" + message + " deliveryMode=" + deliveryMode + " priority=" + priority + " ttl=" + timeToLive);
+ checkState();
+ producer.send(message, deliveryMode, priority, timeToLive);
+ if (trace)
+ log.trace("sent " + this + " result=" + message);
+ }
+ finally
+ {
+ session.unlock();
+ }
+ }
+
+ public void send(Message message) throws JMSException
+ {
+ session.lock();
+ try
+ {
+ if (trace)
+ log.trace("send " + this + " message=" + message);
+ checkState();
+ producer.send(message);
+ if (trace)
+ log.trace("sent " + this + " result=" + message);
+ }
+ finally
+ {
+ session.unlock();
+ }
+ }
+
+ public int getDeliveryMode() throws JMSException
+ {
+ return producer.getDeliveryMode();
+ }
+
+ public Destination getDestination() throws JMSException
+ {
+ return producer.getDestination();
+ }
+
+ public boolean getDisableMessageID() throws JMSException
+ {
+ return producer.getDisableMessageID();
+ }
+
+ public boolean getDisableMessageTimestamp() throws JMSException
+ {
+ return producer.getDisableMessageTimestamp();
+ }
+
+ public int getPriority() throws JMSException
+ {
+ return producer.getPriority();
+ }
+
+ public long getTimeToLive() throws JMSException
+ {
+ return producer.getTimeToLive();
+ }
+
+ public void setDeliveryMode(int deliveryMode) throws JMSException
+ {
+ producer.setDeliveryMode(deliveryMode);
+ }
+
+ public void setDisableMessageID(boolean value) throws JMSException
+ {
+ producer.setDisableMessageID(value);
+ }
+
+ public void setDisableMessageTimestamp(boolean value) throws JMSException
+ {
+ producer.setDisableMessageTimestamp(value);
+ }
+
+ public void setPriority(int defaultPriority) throws JMSException
+ {
+ producer.setPriority(defaultPriority);
+ }
+
+ public void setTimeToLive(long timeToLive) throws JMSException
+ {
+ producer.setTimeToLive(timeToLive);
+ }
+
+ void checkState() throws JMSException
+ {
+ session.checkTransactionActive();
+ }
+
+ void closeProducer() throws JMSException
+ {
+ producer.close();
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jms/JmsQueueSender.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jms/JmsQueueSender.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jms/JmsQueueSender.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,95 +1,95 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jms;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.Queue;
-import javax.jms.QueueSender;
-
-import org.jboss.logging.Logger;
-
-/**
- * JmsQueueSender.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class JmsQueueSender extends JmsMessageProducer implements QueueSender
-{
- private static final Logger log = Logger.getLogger(JmsQueueSender.class);
-
- /** Whether trace is enabled */
- private boolean trace = log.isTraceEnabled();
-
- /**
- * Create a new wrapper
- *
- * @param producer the producer
- * @param session the session
- */
- public JmsQueueSender(QueueSender producer, JmsSession session)
- {
- super(producer, session);
- }
-
- public Queue getQueue() throws JMSException
- {
- return ((QueueSender) producer).getQueue();
- }
-
- public void send(Queue destination, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException
- {
- session.lock();
- try
- {
- if (trace)
- log.trace("send " + this + " destination=" + destination + " message=" + message + " deliveryMode=" + deliveryMode + " priority=" + priority + " ttl=" + timeToLive);
- checkState();
- producer.send(destination, message, deliveryMode, priority, timeToLive);
- if (trace)
- log.trace("sent " + this + " result=" + message);
- }
- finally
- {
- session.unlock();
- }
- }
-
- public void send(Queue destination, Message message) throws JMSException
- {
- session.lock();
- try
- {
- if (trace)
- log.trace("send " + this + " destination=" + destination + " message=" + message);
- checkState();
- producer.send(destination, message);
- if (trace)
- log.trace("sent " + this + " result=" + message);
- }
- finally
- {
- session.unlock();
- }
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jms;
+
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.Queue;
+import javax.jms.QueueSender;
+
+import org.jboss.logging.Logger;
+
+/**
+ * JmsQueueSender.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class JmsQueueSender extends JmsMessageProducer implements QueueSender
+{
+ private static final Logger log = Logger.getLogger(JmsQueueSender.class);
+
+ /** Whether trace is enabled */
+ private boolean trace = log.isTraceEnabled();
+
+ /**
+ * Create a new wrapper
+ *
+ * @param producer the producer
+ * @param session the session
+ */
+ public JmsQueueSender(QueueSender producer, JmsSession session)
+ {
+ super(producer, session);
+ }
+
+ public Queue getQueue() throws JMSException
+ {
+ return ((QueueSender) producer).getQueue();
+ }
+
+ public void send(Queue destination, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException
+ {
+ session.lock();
+ try
+ {
+ if (trace)
+ log.trace("send " + this + " destination=" + destination + " message=" + message + " deliveryMode=" + deliveryMode + " priority=" + priority + " ttl=" + timeToLive);
+ checkState();
+ producer.send(destination, message, deliveryMode, priority, timeToLive);
+ if (trace)
+ log.trace("sent " + this + " result=" + message);
+ }
+ finally
+ {
+ session.unlock();
+ }
+ }
+
+ public void send(Queue destination, Message message) throws JMSException
+ {
+ session.lock();
+ try
+ {
+ if (trace)
+ log.trace("send " + this + " destination=" + destination + " message=" + message);
+ checkState();
+ producer.send(destination, message);
+ if (trace)
+ log.trace("sent " + this + " result=" + message);
+ }
+ finally
+ {
+ session.unlock();
+ }
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jms/JmsTopicPublisher.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jms/JmsTopicPublisher.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jms/JmsTopicPublisher.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,132 +1,132 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jms;
-
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.Topic;
-import javax.jms.TopicPublisher;
-
-import org.jboss.logging.Logger;
-
-/**
- * JmsQueueSender.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class JmsTopicPublisher extends JmsMessageProducer implements TopicPublisher
-{
- private static final Logger log = Logger.getLogger(JmsTopicPublisher.class);
-
- /** Whether trace is enabled */
- private boolean trace = log.isTraceEnabled();
-
- /**
- * Create a new wrapper
- *
- * @param producer the producer
- * @param session the session
- */
- public JmsTopicPublisher(TopicPublisher producer, JmsSession session)
- {
- super(producer, session);
- }
-
- public Topic getTopic() throws JMSException
- {
- return ((TopicPublisher) producer).getTopic();
- }
-
- public void publish(Message message, int deliveryMode, int priority, long timeToLive) throws JMSException
- {
- session.lock();
- try
- {
- }
- finally
- {
- session.unlock();
- }
- if (trace)
- log.trace("send " + this + " message=" + message + " deliveryMode=" + deliveryMode + " priority=" + priority + " ttl=" + timeToLive);
- checkState();
- ((TopicPublisher) producer).publish(message, deliveryMode, priority, timeToLive);
- if (trace)
- log.trace("sent " + this + " result=" + message);
- }
-
- public void publish(Message message) throws JMSException
- {
- session.lock();
- try
- {
- if (trace)
- log.trace("send " + this + " message=" + message);
- checkState();
- ((TopicPublisher) producer).publish(message);
- if (trace)
- log.trace("sent " + this + " result=" + message);
- }
- finally
- {
- session.unlock();
- }
- }
-
- public void publish(Topic destination, Message message, int deliveryMode, int priority, long timeToLive)
- throws JMSException
- {
- session.lock();
- try
- {
- if (trace)
- log.trace("send " + this + " destination=" + destination + " message=" + message + " deliveryMode=" + deliveryMode + " priority=" + priority + " ttl=" + timeToLive);
- checkState();
- ((TopicPublisher) producer).publish(destination, message, deliveryMode, priority, timeToLive);
- if (trace)
- log.trace("sent " + this + " result=" + message);
- }
- finally
- {
- session.unlock();
- }
- }
-
- public void publish(Topic destination, Message message) throws JMSException
- {
- session.lock();
- try
- {
- if (trace)
- log.trace("send " + this + " destination=" + destination + " message=" + message);
- checkState();
- ((TopicPublisher) producer).publish(destination, message);
- if (trace)
- log.trace("sent " + this + " result=" + message);
- }
- finally
- {
- session.unlock();
- }
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jms;
+
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.Topic;
+import javax.jms.TopicPublisher;
+
+import org.jboss.logging.Logger;
+
+/**
+ * JmsQueueSender.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class JmsTopicPublisher extends JmsMessageProducer implements TopicPublisher
+{
+ private static final Logger log = Logger.getLogger(JmsTopicPublisher.class);
+
+ /** Whether trace is enabled */
+ private boolean trace = log.isTraceEnabled();
+
+ /**
+ * Create a new wrapper
+ *
+ * @param producer the producer
+ * @param session the session
+ */
+ public JmsTopicPublisher(TopicPublisher producer, JmsSession session)
+ {
+ super(producer, session);
+ }
+
+ public Topic getTopic() throws JMSException
+ {
+ return ((TopicPublisher) producer).getTopic();
+ }
+
+ public void publish(Message message, int deliveryMode, int priority, long timeToLive) throws JMSException
+ {
+ session.lock();
+ try
+ {
+ }
+ finally
+ {
+ session.unlock();
+ }
+ if (trace)
+ log.trace("send " + this + " message=" + message + " deliveryMode=" + deliveryMode + " priority=" + priority + " ttl=" + timeToLive);
+ checkState();
+ ((TopicPublisher) producer).publish(message, deliveryMode, priority, timeToLive);
+ if (trace)
+ log.trace("sent " + this + " result=" + message);
+ }
+
+ public void publish(Message message) throws JMSException
+ {
+ session.lock();
+ try
+ {
+ if (trace)
+ log.trace("send " + this + " message=" + message);
+ checkState();
+ ((TopicPublisher) producer).publish(message);
+ if (trace)
+ log.trace("sent " + this + " result=" + message);
+ }
+ finally
+ {
+ session.unlock();
+ }
+ }
+
+ public void publish(Topic destination, Message message, int deliveryMode, int priority, long timeToLive)
+ throws JMSException
+ {
+ session.lock();
+ try
+ {
+ if (trace)
+ log.trace("send " + this + " destination=" + destination + " message=" + message + " deliveryMode=" + deliveryMode + " priority=" + priority + " ttl=" + timeToLive);
+ checkState();
+ ((TopicPublisher) producer).publish(destination, message, deliveryMode, priority, timeToLive);
+ if (trace)
+ log.trace("sent " + this + " result=" + message);
+ }
+ finally
+ {
+ session.unlock();
+ }
+ }
+
+ public void publish(Topic destination, Message message) throws JMSException
+ {
+ session.lock();
+ try
+ {
+ if (trace)
+ log.trace("send " + this + " destination=" + destination + " message=" + message);
+ checkState();
+ ((TopicPublisher) producer).publish(destination, message);
+ if (trace)
+ log.trace("sent " + this + " result=" + message);
+ }
+ finally
+ {
+ session.unlock();
+ }
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/jms/JmsXAResource.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/jms/JmsXAResource.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/jms/JmsXAResource.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,129 +1,129 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.jms;
-
-import javax.transaction.xa.XAException;
-import javax.transaction.xa.XAResource;
-import javax.transaction.xa.Xid;
-
-/**
- * JmsXAResource.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class JmsXAResource implements XAResource
-{
- /** The managed connection */
- private JmsManagedConnection managedConnection;
-
- /** The resource */
- private XAResource xaResource;
-
- /**
- * Create a new JmsXAResource.
- *
- * @param managedConnection the managed connection
- * @param xaResource the xa resource
- */
- public JmsXAResource(JmsManagedConnection managedConnection, XAResource xaResource)
- {
- this.managedConnection = managedConnection;
- this.xaResource = xaResource;
- }
-
- public void start(Xid xid, int flags) throws XAException
- {
- managedConnection.lock();
- try
- {
- xaResource.start(xid, flags);
- }
- finally
- {
- managedConnection.unlock();
- }
- }
-
- public void end(Xid xid, int flags) throws XAException
- {
- managedConnection.lock();
- try
- {
- xaResource.end(xid, flags);
- }
- finally
- {
- managedConnection.unlock();
- }
- }
-
- public int prepare(Xid xid) throws XAException
- {
- return xaResource.prepare(xid);
- }
-
- public void commit(Xid xid, boolean onePhase) throws XAException
- {
- xaResource.commit(xid, onePhase);
- }
-
- public void rollback(Xid xid) throws XAException
- {
- xaResource.rollback(xid);
- }
-
- public void forget(Xid xid) throws XAException
- {
- managedConnection.lock();
- try
- {
- xaResource.forget(xid);
- }
- finally
- {
- managedConnection.unlock();
- }
- }
-
- public boolean isSameRM(XAResource xaRes) throws XAException
- {
- return xaResource.isSameRM(xaRes);
- }
-
- public Xid[] recover(int flag) throws XAException
- {
- return xaResource.recover(flag);
- }
-
- public int getTransactionTimeout() throws XAException
- {
- return xaResource.getTransactionTimeout();
- }
-
- public boolean setTransactionTimeout(int seconds) throws XAException
- {
- return xaResource.setTransactionTimeout(seconds);
- }
-
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.jms;
+
+import javax.transaction.xa.XAException;
+import javax.transaction.xa.XAResource;
+import javax.transaction.xa.Xid;
+
+/**
+ * JmsXAResource.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class JmsXAResource implements XAResource
+{
+ /** The managed connection */
+ private JmsManagedConnection managedConnection;
+
+ /** The resource */
+ private XAResource xaResource;
+
+ /**
+ * Create a new JmsXAResource.
+ *
+ * @param managedConnection the managed connection
+ * @param xaResource the xa resource
+ */
+ public JmsXAResource(JmsManagedConnection managedConnection, XAResource xaResource)
+ {
+ this.managedConnection = managedConnection;
+ this.xaResource = xaResource;
+ }
+
+ public void start(Xid xid, int flags) throws XAException
+ {
+ managedConnection.lock();
+ try
+ {
+ xaResource.start(xid, flags);
+ }
+ finally
+ {
+ managedConnection.unlock();
+ }
+ }
+
+ public void end(Xid xid, int flags) throws XAException
+ {
+ managedConnection.lock();
+ try
+ {
+ xaResource.end(xid, flags);
+ }
+ finally
+ {
+ managedConnection.unlock();
+ }
+ }
+
+ public int prepare(Xid xid) throws XAException
+ {
+ return xaResource.prepare(xid);
+ }
+
+ public void commit(Xid xid, boolean onePhase) throws XAException
+ {
+ xaResource.commit(xid, onePhase);
+ }
+
+ public void rollback(Xid xid) throws XAException
+ {
+ xaResource.rollback(xid);
+ }
+
+ public void forget(Xid xid) throws XAException
+ {
+ managedConnection.lock();
+ try
+ {
+ xaResource.forget(xid);
+ }
+ finally
+ {
+ managedConnection.unlock();
+ }
+ }
+
+ public boolean isSameRM(XAResource xaRes) throws XAException
+ {
+ return xaResource.isSameRM(xaRes);
+ }
+
+ public Xid[] recover(int flag) throws XAException
+ {
+ return xaResource.recover(flag);
+ }
+
+ public int getTransactionTimeout() throws XAException
+ {
+ return xaResource.getTransactionTimeout();
+ }
+
+ public boolean setTransactionTimeout(int seconds) throws XAException
+ {
+ return xaResource.setTransactionTimeout(seconds);
+ }
+
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/IMAPMailFolder.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/IMAPMailFolder.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/IMAPMailFolder.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,71 +1,71 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.mail.inflow;
-
-import javax.mail.Folder;
-import javax.mail.Message;
-import javax.mail.MessagingException;
-import javax.mail.NoSuchProviderException;
-import javax.mail.Session;
-import javax.mail.Store;
-import javax.mail.Flags.Flag;
-
-public class IMAPMailFolder extends MailFolder {
-
- public IMAPMailFolder(MailActivationSpec spec) {
- super(spec);
- }
-
- protected Message[] getMessages(Folder folder) throws MessagingException {
- if (folder.getUnreadMessageCount() > 0) {
- int newCount = folder.getUnreadMessageCount();
- int messageCount = folder.getMessageCount();
- // folder.getMessages indexes from 1 and uses an inclusive range (ffs)
- return folder.getMessages(messageCount - newCount + 1, messageCount);
- }
- else
- {
- return new Message[0];
- }
- }
-
- protected Store openStore(Session session) throws NoSuchProviderException {
- return session.getStore("imap");
- }
-
- protected void markMessageSeen(Message message) throws MessagingException {
- message.setFlag(Flag.SEEN, true);
- }
-
- protected void closeStore(boolean success, Store store, Folder folder) throws MessagingException {
- try {
- if (folder != null && folder.isOpen()) {
- folder.close(success);
- }
- } finally {
- if (store != null && store.isConnected()) {
- store.close();
- }
- }
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.mail.inflow;
+
+import javax.mail.Folder;
+import javax.mail.Message;
+import javax.mail.MessagingException;
+import javax.mail.NoSuchProviderException;
+import javax.mail.Session;
+import javax.mail.Store;
+import javax.mail.Flags.Flag;
+
+public class IMAPMailFolder extends MailFolder {
+
+ public IMAPMailFolder(MailActivationSpec spec) {
+ super(spec);
+ }
+
+ protected Message[] getMessages(Folder folder) throws MessagingException {
+ if (folder.getUnreadMessageCount() > 0) {
+ int newCount = folder.getUnreadMessageCount();
+ int messageCount = folder.getMessageCount();
+ // folder.getMessages indexes from 1 and uses an inclusive range (ffs)
+ return folder.getMessages(messageCount - newCount + 1, messageCount);
+ }
+ else
+ {
+ return new Message[0];
+ }
+ }
+
+ protected Store openStore(Session session) throws NoSuchProviderException {
+ return session.getStore("imap");
+ }
+
+ protected void markMessageSeen(Message message) throws MessagingException {
+ message.setFlag(Flag.SEEN, true);
+ }
+
+ protected void closeStore(boolean success, Store store, Folder folder) throws MessagingException {
+ try {
+ if (folder != null && folder.isOpen()) {
+ folder.close(success);
+ }
+ } finally {
+ if (store != null && store.isConnected()) {
+ store.close();
+ }
+ }
+ }
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/IMAPsMailFolder.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/IMAPsMailFolder.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/IMAPsMailFolder.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,38 +1,38 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.resource.adapter.mail.inflow;
-
-import javax.mail.NoSuchProviderException;
-import javax.mail.Session;
-import javax.mail.Store;
-
-public class IMAPsMailFolder extends IMAPMailFolder {
-
- public IMAPsMailFolder(MailActivationSpec spec) {
- super(spec);
- }
-
- protected Store openStore(Session session) throws NoSuchProviderException {
- return session.getStore("imaps");
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.resource.adapter.mail.inflow;
+
+import javax.mail.NoSuchProviderException;
+import javax.mail.Session;
+import javax.mail.Store;
+
+public class IMAPsMailFolder extends IMAPMailFolder {
+
+ public IMAPsMailFolder(MailActivationSpec spec) {
+ super(spec);
+ }
+
+ protected Store openStore(Session session) throws NoSuchProviderException {
+ return session.getStore("imaps");
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/POP3MailFolder.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/POP3MailFolder.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/POP3MailFolder.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,66 +1,66 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.mail.inflow;
-
-import javax.mail.Folder;
-import javax.mail.Message;
-import javax.mail.MessagingException;
-import javax.mail.NoSuchProviderException;
-import javax.mail.Session;
-import javax.mail.Store;
-import javax.mail.Flags.Flag;
-
-public class POP3MailFolder extends MailFolder {
-
- private boolean flush;
-
- public POP3MailFolder(MailActivationSpec spec) {
- super(spec);
- this.flush = spec.isFlush();
- }
-
- protected Message[] getMessages(Folder folder) throws MessagingException {
- return folder.getMessages();
- }
-
- protected Store openStore(Session session) throws NoSuchProviderException {
- return session.getStore("pop3");
- }
-
- protected void markMessageSeen(Message message) throws MessagingException {
- message.setFlag(Flag.DELETED, true);
- }
-
- protected void closeStore(boolean success, Store store, Folder folder) throws MessagingException {
- try {
- if (folder != null && folder.isOpen()) {
- folder.close(success && flush);
- }
- } finally {
- if (store != null && store.isConnected()) {
- store.close();
- }
- }
-
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.mail.inflow;
+
+import javax.mail.Folder;
+import javax.mail.Message;
+import javax.mail.MessagingException;
+import javax.mail.NoSuchProviderException;
+import javax.mail.Session;
+import javax.mail.Store;
+import javax.mail.Flags.Flag;
+
+public class POP3MailFolder extends MailFolder {
+
+ private boolean flush;
+
+ public POP3MailFolder(MailActivationSpec spec) {
+ super(spec);
+ this.flush = spec.isFlush();
+ }
+
+ protected Message[] getMessages(Folder folder) throws MessagingException {
+ return folder.getMessages();
+ }
+
+ protected Store openStore(Session session) throws NoSuchProviderException {
+ return session.getStore("pop3");
+ }
+
+ protected void markMessageSeen(Message message) throws MessagingException {
+ message.setFlag(Flag.DELETED, true);
+ }
+
+ protected void closeStore(boolean success, Store store, Folder folder) throws MessagingException {
+ try {
+ if (folder != null && folder.isOpen()) {
+ folder.close(success && flush);
+ }
+ } finally {
+ if (store != null && store.isConnected()) {
+ store.close();
+ }
+ }
+
+ }
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/POP3sMailFolder.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/POP3sMailFolder.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/mail/inflow/POP3sMailFolder.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,38 +1,38 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.jboss.resource.adapter.mail.inflow;
-
-import javax.mail.NoSuchProviderException;
-import javax.mail.Session;
-import javax.mail.Store;
-
-public class POP3sMailFolder extends POP3MailFolder {
-
- public POP3sMailFolder(MailActivationSpec spec) {
- super(spec);
- }
-
- protected Store openStore(Session session) throws NoSuchProviderException {
- return session.getStore("pop3s");
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.resource.adapter.mail.inflow;
+
+import javax.mail.NoSuchProviderException;
+import javax.mail.Session;
+import javax.mail.Store;
+
+public class POP3sMailFolder extends POP3MailFolder {
+
+ public POP3sMailFolder(MailActivationSpec spec) {
+ super(spec);
+ }
+
+ protected Store openStore(Session session) throws NoSuchProviderException {
+ return session.getStore("pop3s");
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/adapter/quartz/inflow/JBossQuartzThreadPool.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/adapter/quartz/inflow/JBossQuartzThreadPool.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/adapter/quartz/inflow/JBossQuartzThreadPool.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,112 +1,112 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.adapter.quartz.inflow;
-
-import org.quartz.SchedulerConfigException;
-
-import javax.resource.spi.work.Work;
-import javax.resource.spi.work.WorkException;
-import javax.resource.spi.work.WorkManager;
-
-/**
- * Thread pool used to fire Quartz Jobs.
- * <p/>
- * Using BootstrapContext's workManager thread pool.
- * No dependency outside this rar or JCA.
- *
- * @see http://jira.jboss.com/jira/browse/JBAS-1792
- * @see quartz.properties
- *
- * @author <a href="mailto:ales.justin at gmail.com">Ales Justin</a>
- */
-public class JBossQuartzThreadPool implements org.quartz.spi.ThreadPool
-{
- private int poolSize = Integer.MAX_VALUE;
-
- private WorkManager workManager;
-
- public void initialize() throws SchedulerConfigException
- {
- workManager = QuartzResourceAdapter.getConfigTimeWorkManager();
- }
-
- /**
- * Currently this method is only used in metadata lookup.
- * Which is has no further use.
- * How to provide better estimate?
- */
- public int getPoolSize()
- {
- return poolSize;
- }
-
- public boolean runInThread(Runnable runnable)
- {
- try
- {
- WorkWrapper workWrapper = new WorkWrapper(runnable);
- workManager.doWork(workWrapper);
- return true;
- }
- catch (WorkException e)
- {
- return false;
- }
- }
-
- /**
- * No shutdown impl - workManager is shutdown by itself.
- */
- public void shutdown(boolean waitForJobsToComplete)
- {
- }
-
- /**
- * Just in case we want to set pool size.
- */
- public void setPoolSize(int poolSize)
- {
- this.poolSize = poolSize;
- }
-
- private class WorkWrapper implements Work
- {
-
- private Runnable delegate;
-
- public WorkWrapper(Runnable delegate)
- {
- this.delegate = delegate;
- }
-
- public void run()
- {
- delegate.run();
- }
-
- public void release()
- {
- }
-
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.adapter.quartz.inflow;
+
+import org.quartz.SchedulerConfigException;
+
+import javax.resource.spi.work.Work;
+import javax.resource.spi.work.WorkException;
+import javax.resource.spi.work.WorkManager;
+
+/**
+ * Thread pool used to fire Quartz Jobs.
+ * <p/>
+ * Using BootstrapContext's workManager thread pool.
+ * No dependency outside this rar or JCA.
+ *
+ * @see http://jira.jboss.com/jira/browse/JBAS-1792
+ * @see quartz.properties
+ *
+ * @author <a href="mailto:ales.justin at gmail.com">Ales Justin</a>
+ */
+public class JBossQuartzThreadPool implements org.quartz.spi.ThreadPool
+{
+ private int poolSize = Integer.MAX_VALUE;
+
+ private WorkManager workManager;
+
+ public void initialize() throws SchedulerConfigException
+ {
+ workManager = QuartzResourceAdapter.getConfigTimeWorkManager();
+ }
+
+ /**
+ * Currently this method is only used in metadata lookup.
+ * Which is has no further use.
+ * How to provide better estimate?
+ */
+ public int getPoolSize()
+ {
+ return poolSize;
+ }
+
+ public boolean runInThread(Runnable runnable)
+ {
+ try
+ {
+ WorkWrapper workWrapper = new WorkWrapper(runnable);
+ workManager.doWork(workWrapper);
+ return true;
+ }
+ catch (WorkException e)
+ {
+ return false;
+ }
+ }
+
+ /**
+ * No shutdown impl - workManager is shutdown by itself.
+ */
+ public void shutdown(boolean waitForJobsToComplete)
+ {
+ }
+
+ /**
+ * Just in case we want to set pool size.
+ */
+ public void setPoolSize(int poolSize)
+ {
+ this.poolSize = poolSize;
+ }
+
+ private class WorkWrapper implements Work
+ {
+
+ private Runnable delegate;
+
+ public WorkWrapper(Runnable delegate)
+ {
+ this.delegate = delegate;
+ }
+
+ public void run()
+ {
+ delegate.run();
+ }
+
+ public void release()
+ {
+ }
+
+ }
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/connectionmanager/IdleConnectionRemovalSupport.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/connectionmanager/IdleConnectionRemovalSupport.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/connectionmanager/IdleConnectionRemovalSupport.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,16 +1,16 @@
-package org.jboss.resource.connectionmanager;
-
-/**
- * A IdleConnectionRemovalSupport specified contract for a pool that is able
- * to remove an idle connection.
- *
- *
- * @author <a href="weston.price at jboss.com">Weston Price</a>
- * @version $Revision: 1.1 $
- */
-public interface IdleConnectionRemovalSupport
-{
-
- public void removeIdleConnections();
-
-}
+package org.jboss.resource.connectionmanager;
+
+/**
+ * A IdleConnectionRemovalSupport specified contract for a pool that is able
+ * to remove an idle connection.
+ *
+ *
+ * @author <a href="weston.price at jboss.com">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public interface IdleConnectionRemovalSupport
+{
+
+ public void removeIdleConnections();
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/connectionmanager/JTATransactionChecker.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/connectionmanager/JTATransactionChecker.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/connectionmanager/JTATransactionChecker.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,42 +1,42 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.connectionmanager;
-
-import javax.transaction.RollbackException;
-import javax.transaction.SystemException;
-
-/**
- * JTATransactionChecker.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public interface JTATransactionChecker
-{
- /**
- * Check whether a tranasction is active
- *
- * @throws RollbackException if the transaction is not active, preparing, prepared or committing
- * @throws SystemException for any error in the transaction manager
- */
- void checkTransactionActive() throws RollbackException, SystemException;
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.connectionmanager;
+
+import javax.transaction.RollbackException;
+import javax.transaction.SystemException;
+
+/**
+ * JTATransactionChecker.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public interface JTATransactionChecker
+{
+ /**
+ * Check whether a tranasction is active
+ *
+ * @throws RollbackException if the transaction is not active, preparing, prepared or committing
+ * @throws SystemException for any error in the transaction manager
+ */
+ void checkTransactionActive() throws RollbackException, SystemException;
+}
Modified: trunk/connector/src/main/org/jboss/resource/connectionmanager/ManagedConnectionFactoryDeployment.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/connectionmanager/ManagedConnectionFactoryDeployment.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/connectionmanager/ManagedConnectionFactoryDeployment.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,800 +1,800 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.connectionmanager;
-
-import java.beans.PropertyEditor;
-import java.beans.PropertyEditorManager;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.management.Attribute;
-import javax.management.AttributeNotFoundException;
-import javax.management.InvalidAttributeValueException;
-import javax.management.MBeanAttributeInfo;
-import javax.management.MBeanException;
-import javax.management.MBeanOperationInfo;
-import javax.management.MBeanParameterInfo;
-import javax.management.Notification;
-import javax.management.ObjectName;
-import javax.management.ReflectionException;
-import javax.resource.ResourceException;
-import javax.resource.spi.ConnectionManager;
-import javax.resource.spi.ConnectionRequestInfo;
-import javax.resource.spi.ManagedConnection;
-import javax.resource.spi.ManagedConnectionFactory;
-import javax.resource.spi.ResourceAdapter;
-import javax.resource.spi.ResourceAdapterAssociation;
-
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.logging.Logger;
-import org.jboss.metadata.MetaData;
-import org.jboss.resource.metadata.ConfigPropertyMetaData;
-import org.jboss.resource.metadata.ConnectionDefinitionMetaData;
-import org.jboss.resource.metadata.ConnectorMetaData;
-import org.jboss.resource.metadata.DescriptionGroupMetaData;
-import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData;
-import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryPropertyMetaData;
-import org.jboss.system.ServiceDynamicMBeanSupport;
-import org.jboss.util.Classes;
-import org.jboss.util.NestedRuntimeException;
-import org.jboss.util.StringPropertyReplacer;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-
-/**
- * A ManagedConnectionFactoryDeployment.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @version $Revision: 1.1 $
- */
-public class ManagedConnectionFactoryDeployment extends ServiceDynamicMBeanSupport implements ManagedConnectionFactory
-{
-
- /** The serialVersionUID */
- private static final long serialVersionUID = -8448602289610025849L;
-
- public final static String MCF_ATTRIBUTE_CHANGED_NOTIFICATION = "jboss.mcfattributechangednotification";
-
- private Logger log = Logger.getLogger(getClass());
-
- //Hack to use previous ra.xml parsing code until xslt deployment is written.
- private ObjectName oldRarDeployment;
-
- private String rarName;
-
- private String connectionDefinition;
-
- private String vendorName;
-
- private String specVersion;
-
- private String eisType;
-
- private String version;
-
- private String managedConnectionFactoryClass;
-
- private String connectionFactoryInterface;
-
- private String connectionFactoryImplClass;
-
- private String connectionInterface;
-
- private String connectionImplClass;
-
- private String transactionSupport;
-
- private Element managedConnectionFactoryProperties;
-
- private String authenticationMechanismType;
-
- private String credentialInterface;
-
- private boolean reauthenticationSupport;
-
- private Class mcfClass;
-
- private String jndiName;
-
- private ManagedConnectionFactory mcf;
-
- private ManagedConnectionFactoryDeploymentMetaData dmd;
-
- private ConnectorMetaData cmd;
-
- /**
- * Default managed constructor for RARDeployment mbeans.
- */
- public ManagedConnectionFactoryDeployment()
- {
- }
-
- public ManagedConnectionFactoryDeployment(ConnectorMetaData cmd, ManagedConnectionFactoryDeploymentMetaData dmd)
- {
- this.cmd = cmd;
- this.dmd = dmd;
- }
-
- public String getJndiName()
- {
- return this.jndiName;
- }
-
- public void setJndiName(String jndiName)
- {
- this.jndiName = jndiName;
-
- }
- public String getRARName()
- {
- return rarName;
- }
-
- public void setRARName(String rarName)
- {
- this.rarName = rarName;
- }
-
- public String getConnectionDefinition()
- {
- return connectionDefinition;
- }
-
- public void setConnectionDefinition(String connectionDefinition)
- {
- this.connectionDefinition = connectionDefinition;
- }
-
- public String getVendorName()
- {
- return vendorName;
- }
-
- public void setVendorName(String vendorName)
- {
- this.vendorName = vendorName;
- }
-
- public String getSpecVersion()
- {
- return specVersion;
- }
-
- public void setSpecVersion(String specVersion)
- {
- this.specVersion = specVersion;
- }
-
- public String getEisType()
- {
- return eisType;
- }
-
- public void setEisType(String eisType)
- {
- this.eisType = eisType;
- }
-
- public String getVersion()
- {
- return version;
- }
-
- public void setVersion(String version)
- {
- this.version = version;
- }
-
- public String getManagedConnectionFactoryClass()
- {
- return managedConnectionFactoryClass;
- }
-
- public void setManagedConnectionFactoryClass(final String managedConnectionFactoryClass)
- {
- this.managedConnectionFactoryClass = managedConnectionFactoryClass;
- }
-
- public String getConnectionFactoryInterface()
- {
- return connectionFactoryInterface;
- }
-
- public void setConnectionFactoryInterface(String connectionFactoryInterface)
- {
- this.connectionFactoryInterface = connectionFactoryInterface;
- }
-
- public String getConnectionFactoryImplClass()
- {
- return connectionFactoryImplClass;
- }
-
- public void setConnectionFactoryImplClass(String connectionFactoryImplClass)
- {
- this.connectionFactoryImplClass = connectionFactoryImplClass;
- }
-
- public String getConnectionInterface()
- {
- return connectionInterface;
- }
-
- public void setConnectionInterface(String connectionInterface)
- {
- this.connectionInterface = connectionInterface;
- }
-
- public String getConnectionImplClass()
- {
- return connectionImplClass;
- }
-
- public void setConnectionImplClass(String connectionImplClass)
- {
- this.connectionImplClass = connectionImplClass;
- }
-
- public String getTransactionSupport()
- {
- return transactionSupport;
- }
-
- public void setTransactionSupport(String transactionSupport)
- {
- this.transactionSupport = transactionSupport;
- }
-
- public Element getManagedConnectionFactoryProperties()
- {
- return managedConnectionFactoryProperties;
- }
-
- public void setManagedConnectionFactoryProperties(Element managedConnectionFactoryProperties)
- {
- this.managedConnectionFactoryProperties = managedConnectionFactoryProperties;
- }
-
- public String getAuthenticationMechanismType()
- {
- return authenticationMechanismType;
- }
-
- public void setAuthenticationMechanismType(String authenticationMechanismType)
- {
- this.authenticationMechanismType = authenticationMechanismType;
- }
-
- public String getCredentialInterface()
- {
- return credentialInterface;
- }
-
- public void setCredentialInterface(String credentialInterface)
- {
- this.credentialInterface = credentialInterface;
- }
-
- public boolean isReauthenticationSupport()
- {
- return reauthenticationSupport;
- }
-
- public void setReauthenticationSupport(boolean reauthenticationSupport)
- {
- this.reauthenticationSupport = reauthenticationSupport;
- }
-
- public ManagedConnectionFactory getMcfInstance()
- {
- return mcf;
- }
-
- protected void startService() throws Exception
- {
- if (mcf != null)
- throw new DeploymentException("Stop the RARDeployment before restarting it");
-
- ResourceAdapter resourceAdapter = null;
- ConnectionDefinitionMetaData cdmd = cmd.getConnectionDefinition(dmd.getConnectionDefinition());
-
- try
- {
- resourceAdapter = (ResourceAdapter) getServer().getAttribute(oldRarDeployment, "ResourceAdapter");
-
- if (cdmd == null)
- throw new DeploymentException("ConnectionDefinition '" + connectionDefinition + "' not found in rar '"
- + rarName + "'");
-
- setManagedConnectionFactoryClass(cdmd.getManagedConnectionFactoryClass());
- setReauthenticationSupport(cmd.getReauthenticationSupport());
- }
- catch (Exception e)
- {
- throw new DeploymentException("couldn't get oldRarDeployment! " + oldRarDeployment, e);
- }
-
- try
- {
- mcfClass = Thread.currentThread().getContextClassLoader().loadClass(cdmd.getManagedConnectionFactoryClass());
- }
- catch (ClassNotFoundException cnfe)
- {
- log.error("Could not find ManagedConnectionFactory class: " + managedConnectionFactoryClass, cnfe);
- throw new DeploymentException("Could not find ManagedConnectionFactory class: "
- + managedConnectionFactoryClass);
- }
- try
- {
- mcf = (ManagedConnectionFactory) mcfClass.newInstance();
- }
- catch (Exception e)
- {
- log.error("Could not instantiate ManagedConnectionFactory: " + managedConnectionFactoryClass, e);
- throw new DeploymentException("Could not instantiate ManagedConnectionFactory: "
- + managedConnectionFactoryClass);
- }
-
- if (cmd != null)
- {
- // Set the resource adapter properties
- setMcfProperties(cmd.getProperties(), false);
- // Set the connection definition properties
- setMcfProperties(cdmd.getProperties(), true);
- }
-
- setManagedConnectionFactoryProperties(dmd.getManagedConnectionFactoryProperties());
-
- if (resourceAdapter != null && mcf instanceof ResourceAdapterAssociation)
- {
- ResourceAdapterAssociation raa = (ResourceAdapterAssociation) mcf;
- raa.setResourceAdapter(resourceAdapter);
- }
- }
-
- protected void stopService()
- {
- mcf = null;
- mcfClass = null;
- }
-
- public void setManagedConnectionFactoryAttribute(String name, Class clazz, Object value)
- {
- setManagedConnectionFactoryAttribute(name, clazz, value, false);
- }
-
- protected void setManagedConnectionFactoryAttribute(String name, Class clazz, Object value, boolean mustExist)
- {
- if (name == null || name.length() == 0)
- throw new IllegalArgumentException("Null or empty attribute name " + name);
- String setterName = "set" + Character.toUpperCase(name.charAt(0));
- if (name.length() > 1)
- setterName = setterName.concat(name.substring(1));
- Method setter;
- try
- {
- setter = mcfClass.getMethod(setterName, new Class[] {clazz});
- }
- catch (NoSuchMethodException nsme)
- {
- String error = "The class '" + mcfClass.toString() + "' has no setter for config property '" + name + "'";
- if (mustExist)
- throw new IllegalArgumentException(error);
- else
- {
- log.trace(error, nsme);
- return;
- }
- }
- try
- {
- setter.invoke(mcf, new Object[] {value});
- log.debug("set property " + name + " to value " + value);
- }
- catch (Exception e)
- {
- String error = "Unable to invoke setter method '" + setter + "' " + "on object '" + mcf + "'";
- if (e instanceof InvocationTargetException)
- throw new NestedRuntimeException(error, ((InvocationTargetException) e).getCause());
- else
- throw new NestedRuntimeException(error, e);
- }
- sendNotification(new Notification(MCF_ATTRIBUTE_CHANGED_NOTIFICATION, getServiceName(),
- getNextNotificationSequenceNumber()));
- }
-
- public Object getManagedConnectionFactoryAttribute(String name)
- {
- if (name == null || name.length() == 0)
- throw new IllegalArgumentException("Null or empty attribute name " + name);
- String getterName = "get" + Character.toUpperCase(name.charAt(0));
- if (name.length() > 1)
- getterName = getterName.concat(name.substring(1));
- Method getter;
- try
- {
- getter = mcfClass.getMethod(getterName, new Class[] {});
- }
- catch (NoSuchMethodException e)
- {
- String msg = "The class '" + mcfClass + "' has no getter("
- + getterName + ") for config property '" + name + "'";
- log.debug(msg, e);
- throw new IllegalArgumentException(msg);
- }
- try
- {
- Object value = getter.invoke(mcf, new Object[]{});
- log.debug("get property " + name + ": value " + value);
- return value;
- }
- catch (Exception e)
- {
- String error = "Unable to invoke getter method '" + getter + "' " + "on object '" + mcf + "'";
- log.debug(error, e);
- if (e instanceof InvocationTargetException)
- throw new NestedRuntimeException(error, ((InvocationTargetException) e).getCause());
- else
- throw new NestedRuntimeException(error, e);
- }
- }
-
- protected void setMcfProperties(Collection properties, boolean mustExist) throws DeploymentException
- {
- for (Iterator i = properties.iterator(); i.hasNext();)
- {
- ConfigPropertyMetaData cpmd = (ConfigPropertyMetaData) i.next();
- String name = cpmd.getName();
- String type = cpmd.getType();
- String value = cpmd.getValue();
- if (name == null || name.length() == 0 || value == null || value.length() == 0)
- {
- log.debug("Not setting config property '" + name + "'");
- continue;
- }
- // see if it is a primitive type first
- Class clazz = Classes.getPrimitiveTypeForName(type);
- if (clazz == null)
- {
- //not primitive, look for it.
- try
- {
- clazz = Thread.currentThread().getContextClassLoader().loadClass(type);
- }
- catch (ClassNotFoundException cnfe)
- {
- log.warn("Unable to find class '" + type + "' for " + "property '" + name + "' - skipping property.");
- continue;
- }
- }
- PropertyEditor pe = PropertyEditorManager.findEditor(clazz);
- if (pe == null)
- {
- log.warn("Unable to find a PropertyEditor for class '" + clazz + "' of property '" + name + "' - "
- + "skipping property");
- continue;
- }
- // TODO: should happen in parsing layer?
- value = StringPropertyReplacer.replaceProperties(value);
- log.debug("setting property: " + name + " to value " + value);
- try
- {
- pe.setAsText(value);
- }
- catch (IllegalArgumentException iae)
- {
- log.warn("Value '" + value + "' is not valid for property '" + name + "' of class '" + clazz
- + "' - skipping " + "property");
- continue;
- }
- Object v = pe.getValue();
- setManagedConnectionFactoryAttribute(name, clazz, v, mustExist);
- }
- }
-
- protected void setManagedConnectionFactoryProperties(List<ManagedConnectionFactoryPropertyMetaData> properties)
- {
-
- for (ManagedConnectionFactoryPropertyMetaData property : properties)
- {
- String name = property.getName();
- String type = property.getType();
- String value = property.getValue();
-
- if (name == null || name.length() == 0 || value == null || value.length() == 0)
- {
- log.debug("Not setting config property '" + name + "'");
- continue;
- }
-
- if (type == null || type.length() == 0)
- {
- // Default to String for convenience.
- type = "java.lang.String";
- }
- Class clazz = Classes.getPrimitiveTypeForName(type);
- if (clazz == null)
- {
- //not primitive, look for it.
- try
- {
- clazz = Thread.currentThread().getContextClassLoader().loadClass(type);
- }
- catch (ClassNotFoundException cnfe)
- {
- log.warn("Unable to find class '" + type + "' for " + "property '" + name
- + "' - skipping property.");
- continue;
- }
- }
- PropertyEditor pe = PropertyEditorManager.findEditor(clazz);
- if (pe == null)
- {
- log.warn("Unable to find a PropertyEditor for class '" + clazz + "' of property '" + name + "' - "
- + "skipping property");
- continue;
- }
- // TODO: should happen in parsing layer?
- value = StringPropertyReplacer.replaceProperties(value);
- log.debug("setting property: " + name + " to value " + value);
- try
- {
- pe.setAsText(value);
- }
- catch (IllegalArgumentException iae)
- {
- log.warn("Value '" + value + "' is not valid for property '" + name + "' of class '" + clazz
- + "' - skipping " + "property");
- continue;
- }
- Object v = pe.getValue();
- setManagedConnectionFactoryAttribute(name, clazz, v);
-
- }
-
-
- }
-
- public Object createConnectionFactory() throws ResourceException
- {
- return mcf.createConnectionFactory();
- }
-
- public Object createConnectionFactory(ConnectionManager cxManager) throws ResourceException
- {
- return mcf.createConnectionFactory(cxManager);
- }
-
- public ManagedConnection createManagedConnection(javax.security.auth.Subject subject,
- ConnectionRequestInfo cxRequestInfo) throws ResourceException
- {
- return mcf.createManagedConnection(subject, cxRequestInfo);
- }
-
- public boolean equals(Object other)
- {
- return mcf.equals(other);
- }
-
- public java.io.PrintWriter getLogWriter() throws ResourceException
- {
- return mcf.getLogWriter();
- }
-
- public String toString()
- {
- StringBuffer buffer = new StringBuffer();
- buffer.append(getClass().getName());
- buffer.append('@');
- buffer.append(Integer.toHexString(System.identityHashCode(this)));
- return buffer.toString();
- }
-
- public int hashCode()
- {
- return mcf.hashCode();
- }
-
- public ManagedConnection matchManagedConnections(java.util.Set connectionSet, javax.security.auth.Subject subject,
- ConnectionRequestInfo cxRequestInfo) throws ResourceException
- {
- return mcf.matchManagedConnections(connectionSet, subject, cxRequestInfo);
- }
-
- public void setLogWriter(java.io.PrintWriter out) throws ResourceException
- {
- mcf.setLogWriter(out);
- }
-
- @Override
- protected MBeanAttributeInfo[] getInternalAttributeInfo()
- {
- List<MBeanAttributeInfo> attributes = new ArrayList<MBeanAttributeInfo>();
- attributes.add(new MBeanAttributeInfo("RARName", String.class.getName(), "The ResourceAdapter deployment name.", true, false, false));
- attributes.add(new MBeanAttributeInfo("OldRarDeployment", javax.management.ObjectName.class.getName(), "The Connection Defintion class name.", true, true, false));
- attributes.add(new MBeanAttributeInfo("ConnectionDefinition", String.class.getName(), "The Connection Defintion class name.", true, false, false));
- attributes.add(new MBeanAttributeInfo("VendorName", String.class.getName(), "The Vendor Name.", true, false, false));
- attributes.add(new MBeanAttributeInfo("SpecVersion", String.class.getName(), "The Specification Version.", true, false, false));
- attributes.add(new MBeanAttributeInfo("EisType", String.class.getName(), "The Enterprise Information System type.", true, false, false));
- attributes.add(new MBeanAttributeInfo("Version", String.class.getName(), "The ResourceAdapter version.", true, false, false));
- attributes.add(new MBeanAttributeInfo("ManagedConnectionFactoryClass", String.class.getName(), "The ManagedConnectionFactory class", true, false, false));
- attributes.add(new MBeanAttributeInfo("ConnectionFactoryImpl", String.class.getName(), "The Connection Factory implementation", true, false, false));
- attributes.add(new MBeanAttributeInfo("ConnectionInterface", String.class.getName(), "The Connection Inteface", true, false, false));
- attributes.add(new MBeanAttributeInfo("ConnectionImplClass", String.class.getName(), "The Connection Implementation class", true, false, false));
- attributes.add(new MBeanAttributeInfo("TransactionSupport", String.class.getName(), "The Transaction Support", true, false, false));
- attributes.add(new MBeanAttributeInfo("AuthenticationMechanismType", String.class.getName(), "The Authentication Mechanism Type", true, false, false));
- attributes.add(new MBeanAttributeInfo("CredentialInterface", String.class.getName(), "The Credential Interface", true, false, false));
- attributes.add(new MBeanAttributeInfo("ReauthenticationSupport", Boolean.class.getName(), "The Reauthentication Support", true, false, true));
- attributes.add(new MBeanAttributeInfo("McfInstance", "javax.resource.spi.ManagedConnectionFactory", "The ManagedConnectionFactory instance", true, false, false));
-
-// ConnectionDefinitionMetaData cdmd = cmd.getConnectionDefinition(this.connectionDefinition);
-
-// Collection mcfProps = cdmd.getProperties();
-//
-// for(Iterator iter = mcfProps.iterator(); iter.hasNext();)
-// {
-// ConfigPropertyMetaData cpmd = (ConfigPropertyMetaData)iter.next();
-// attributes.add(new MBeanAttributeInfo(cpmd.getName(), cpmd.getType(), cpmd.getDescription().getDescription(), true, false, false));
-// }
- MBeanAttributeInfo[] info = attributes.toArray(new MBeanAttributeInfo[attributes.size()]);
- return info;
-
- }
-
- @Override
- protected void setInternalAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
- {
- if("OldRarDeployment".equals(attribute.getName()))
- {
- this.oldRarDeployment = (ObjectName)attribute.getValue();
-
- }
- }
-
- @Override
- protected MBeanOperationInfo[] getInternalOperationInfo()
- {
- MBeanOperationInfo[] operations = new MBeanOperationInfo[1];
- MBeanParameterInfo[] getMCFAttributeParamInfo = new MBeanParameterInfo[]{ new MBeanParameterInfo("ManagedConnectionFactoryAttributeName", String.class.getName(), "The ManagedConnectionFactoryAttribute name")};
- operations[0] = new MBeanOperationInfo("getManagedConnectionFactoryAttribute", "Inspect the value of a ManagedConnectionFactory attribute", getMCFAttributeParamInfo, Object.class.getName(), MBeanOperationInfo.INFO);
- return operations;
-
- }
-
- @Override
- protected Object internalInvoke(String actionName, Object[] params, String[] signature) throws MBeanException, ReflectionException
- {
- if(actionName.equals("getManagedConnectionFactoryAttribute"))
- {
- String param = (String)params[0];
- return getManagedConnectionFactoryAttribute(param);
-
- }
- else
- {
- return super.internalInvoke(actionName, params, signature);
- }
-
- }
-
- @Override
- protected Object getInternalAttribute(String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException
- {
- ConnectionDefinitionMetaData cdmd = cmd.getConnectionDefinition(dmd.getConnectionDefinition());
-
- Object result = null;
-
- if("RARName".equals(attribute))
- {
- result = rarName;
-
- }else if("OldRarDeployment".equals(attribute))
- {
- result = oldRarDeployment;
- }
- else if("ConnectionDefinition".equals(attribute))
- {
- result = dmd.getConnectionDefinition();
-
- }else if("VendorName".equals(attribute))
- {
- result = cmd.getVendorName();
-
- }else if("SpecVersion".equals(attribute))
- {
- result = cmd.getVersion();
-
- }else if("EisType".equals(attribute))
- {
- result = cmd.getEISType();
-
- }else if("Version".equals(attribute))
- {
- result = cmd.getRAVersion();
-
- }else if("ManagedConnectionFactoryClass".equals(attribute))
- {
- result = cdmd.getManagedConnectionFactoryClass();
-
- }else if("ConnectionInterface".equals(attribute))
- {
- result = cdmd.getConnectionInterfaceClass();
- }
- else if("ConnectionFactoryImpl".equals(attribute))
- {
- result = cdmd.getConnectionFactoryImplementationClass();
-
- }else if("ConnectionImplClass".equals(attribute))
- {
- result = cdmd.getConnectionImplementationClass();
-
- }
- else if("TransactionSupport".equals(attribute))
- {
- result = dmd.getTransactionSupportMetaData();
-
- }
- else if("AuthenticationMechanismType".equals(attribute))
- {
- result = cmd.getAuthenticationMechanism().getAuthenticationMechansimType();
-
- }
- else if("CredentialInterface".equals(attribute))
- {
- result = cmd.getAuthenticationMechanism().getCredentialInterfaceClass();
-
- }
- else if("ReauthenticationSupport".equals(attribute))
- {
- result = cmd.getReauthenticationSupport();
-
- }
- else if("McfInstance".equals(attribute))
- {
- result = mcf;
- }
-
- if(result == null)
- {
- result = super.getInternalAttribute(attribute);
- }
-
- return result;
- }
-
- protected String getInternalDescription()
- {
- String description = null;
- DescriptionGroupMetaData dgmd = cmd.getDescription();
- if (dgmd != null)
- description = dgmd.getDescription();
- if (description == null)
- description = "RAR Deployment ";
- return description;
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.connectionmanager;
+
+import java.beans.PropertyEditor;
+import java.beans.PropertyEditorManager;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.management.Attribute;
+import javax.management.AttributeNotFoundException;
+import javax.management.InvalidAttributeValueException;
+import javax.management.MBeanAttributeInfo;
+import javax.management.MBeanException;
+import javax.management.MBeanOperationInfo;
+import javax.management.MBeanParameterInfo;
+import javax.management.Notification;
+import javax.management.ObjectName;
+import javax.management.ReflectionException;
+import javax.resource.ResourceException;
+import javax.resource.spi.ConnectionManager;
+import javax.resource.spi.ConnectionRequestInfo;
+import javax.resource.spi.ManagedConnection;
+import javax.resource.spi.ManagedConnectionFactory;
+import javax.resource.spi.ResourceAdapter;
+import javax.resource.spi.ResourceAdapterAssociation;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.MetaData;
+import org.jboss.resource.metadata.ConfigPropertyMetaData;
+import org.jboss.resource.metadata.ConnectionDefinitionMetaData;
+import org.jboss.resource.metadata.ConnectorMetaData;
+import org.jboss.resource.metadata.DescriptionGroupMetaData;
+import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData;
+import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryPropertyMetaData;
+import org.jboss.system.ServiceDynamicMBeanSupport;
+import org.jboss.util.Classes;
+import org.jboss.util.NestedRuntimeException;
+import org.jboss.util.StringPropertyReplacer;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+
+/**
+ * A ManagedConnectionFactoryDeployment.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public class ManagedConnectionFactoryDeployment extends ServiceDynamicMBeanSupport implements ManagedConnectionFactory
+{
+
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -8448602289610025849L;
+
+ public final static String MCF_ATTRIBUTE_CHANGED_NOTIFICATION = "jboss.mcfattributechangednotification";
+
+ private Logger log = Logger.getLogger(getClass());
+
+ //Hack to use previous ra.xml parsing code until xslt deployment is written.
+ private ObjectName oldRarDeployment;
+
+ private String rarName;
+
+ private String connectionDefinition;
+
+ private String vendorName;
+
+ private String specVersion;
+
+ private String eisType;
+
+ private String version;
+
+ private String managedConnectionFactoryClass;
+
+ private String connectionFactoryInterface;
+
+ private String connectionFactoryImplClass;
+
+ private String connectionInterface;
+
+ private String connectionImplClass;
+
+ private String transactionSupport;
+
+ private Element managedConnectionFactoryProperties;
+
+ private String authenticationMechanismType;
+
+ private String credentialInterface;
+
+ private boolean reauthenticationSupport;
+
+ private Class mcfClass;
+
+ private String jndiName;
+
+ private ManagedConnectionFactory mcf;
+
+ private ManagedConnectionFactoryDeploymentMetaData dmd;
+
+ private ConnectorMetaData cmd;
+
+ /**
+ * Default managed constructor for RARDeployment mbeans.
+ */
+ public ManagedConnectionFactoryDeployment()
+ {
+ }
+
+ public ManagedConnectionFactoryDeployment(ConnectorMetaData cmd, ManagedConnectionFactoryDeploymentMetaData dmd)
+ {
+ this.cmd = cmd;
+ this.dmd = dmd;
+ }
+
+ public String getJndiName()
+ {
+ return this.jndiName;
+ }
+
+ public void setJndiName(String jndiName)
+ {
+ this.jndiName = jndiName;
+
+ }
+ public String getRARName()
+ {
+ return rarName;
+ }
+
+ public void setRARName(String rarName)
+ {
+ this.rarName = rarName;
+ }
+
+ public String getConnectionDefinition()
+ {
+ return connectionDefinition;
+ }
+
+ public void setConnectionDefinition(String connectionDefinition)
+ {
+ this.connectionDefinition = connectionDefinition;
+ }
+
+ public String getVendorName()
+ {
+ return vendorName;
+ }
+
+ public void setVendorName(String vendorName)
+ {
+ this.vendorName = vendorName;
+ }
+
+ public String getSpecVersion()
+ {
+ return specVersion;
+ }
+
+ public void setSpecVersion(String specVersion)
+ {
+ this.specVersion = specVersion;
+ }
+
+ public String getEisType()
+ {
+ return eisType;
+ }
+
+ public void setEisType(String eisType)
+ {
+ this.eisType = eisType;
+ }
+
+ public String getVersion()
+ {
+ return version;
+ }
+
+ public void setVersion(String version)
+ {
+ this.version = version;
+ }
+
+ public String getManagedConnectionFactoryClass()
+ {
+ return managedConnectionFactoryClass;
+ }
+
+ public void setManagedConnectionFactoryClass(final String managedConnectionFactoryClass)
+ {
+ this.managedConnectionFactoryClass = managedConnectionFactoryClass;
+ }
+
+ public String getConnectionFactoryInterface()
+ {
+ return connectionFactoryInterface;
+ }
+
+ public void setConnectionFactoryInterface(String connectionFactoryInterface)
+ {
+ this.connectionFactoryInterface = connectionFactoryInterface;
+ }
+
+ public String getConnectionFactoryImplClass()
+ {
+ return connectionFactoryImplClass;
+ }
+
+ public void setConnectionFactoryImplClass(String connectionFactoryImplClass)
+ {
+ this.connectionFactoryImplClass = connectionFactoryImplClass;
+ }
+
+ public String getConnectionInterface()
+ {
+ return connectionInterface;
+ }
+
+ public void setConnectionInterface(String connectionInterface)
+ {
+ this.connectionInterface = connectionInterface;
+ }
+
+ public String getConnectionImplClass()
+ {
+ return connectionImplClass;
+ }
+
+ public void setConnectionImplClass(String connectionImplClass)
+ {
+ this.connectionImplClass = connectionImplClass;
+ }
+
+ public String getTransactionSupport()
+ {
+ return transactionSupport;
+ }
+
+ public void setTransactionSupport(String transactionSupport)
+ {
+ this.transactionSupport = transactionSupport;
+ }
+
+ public Element getManagedConnectionFactoryProperties()
+ {
+ return managedConnectionFactoryProperties;
+ }
+
+ public void setManagedConnectionFactoryProperties(Element managedConnectionFactoryProperties)
+ {
+ this.managedConnectionFactoryProperties = managedConnectionFactoryProperties;
+ }
+
+ public String getAuthenticationMechanismType()
+ {
+ return authenticationMechanismType;
+ }
+
+ public void setAuthenticationMechanismType(String authenticationMechanismType)
+ {
+ this.authenticationMechanismType = authenticationMechanismType;
+ }
+
+ public String getCredentialInterface()
+ {
+ return credentialInterface;
+ }
+
+ public void setCredentialInterface(String credentialInterface)
+ {
+ this.credentialInterface = credentialInterface;
+ }
+
+ public boolean isReauthenticationSupport()
+ {
+ return reauthenticationSupport;
+ }
+
+ public void setReauthenticationSupport(boolean reauthenticationSupport)
+ {
+ this.reauthenticationSupport = reauthenticationSupport;
+ }
+
+ public ManagedConnectionFactory getMcfInstance()
+ {
+ return mcf;
+ }
+
+ protected void startService() throws Exception
+ {
+ if (mcf != null)
+ throw new DeploymentException("Stop the RARDeployment before restarting it");
+
+ ResourceAdapter resourceAdapter = null;
+ ConnectionDefinitionMetaData cdmd = cmd.getConnectionDefinition(dmd.getConnectionDefinition());
+
+ try
+ {
+ resourceAdapter = (ResourceAdapter) getServer().getAttribute(oldRarDeployment, "ResourceAdapter");
+
+ if (cdmd == null)
+ throw new DeploymentException("ConnectionDefinition '" + connectionDefinition + "' not found in rar '"
+ + rarName + "'");
+
+ setManagedConnectionFactoryClass(cdmd.getManagedConnectionFactoryClass());
+ setReauthenticationSupport(cmd.getReauthenticationSupport());
+ }
+ catch (Exception e)
+ {
+ throw new DeploymentException("couldn't get oldRarDeployment! " + oldRarDeployment, e);
+ }
+
+ try
+ {
+ mcfClass = Thread.currentThread().getContextClassLoader().loadClass(cdmd.getManagedConnectionFactoryClass());
+ }
+ catch (ClassNotFoundException cnfe)
+ {
+ log.error("Could not find ManagedConnectionFactory class: " + managedConnectionFactoryClass, cnfe);
+ throw new DeploymentException("Could not find ManagedConnectionFactory class: "
+ + managedConnectionFactoryClass);
+ }
+ try
+ {
+ mcf = (ManagedConnectionFactory) mcfClass.newInstance();
+ }
+ catch (Exception e)
+ {
+ log.error("Could not instantiate ManagedConnectionFactory: " + managedConnectionFactoryClass, e);
+ throw new DeploymentException("Could not instantiate ManagedConnectionFactory: "
+ + managedConnectionFactoryClass);
+ }
+
+ if (cmd != null)
+ {
+ // Set the resource adapter properties
+ setMcfProperties(cmd.getProperties(), false);
+ // Set the connection definition properties
+ setMcfProperties(cdmd.getProperties(), true);
+ }
+
+ setManagedConnectionFactoryProperties(dmd.getManagedConnectionFactoryProperties());
+
+ if (resourceAdapter != null && mcf instanceof ResourceAdapterAssociation)
+ {
+ ResourceAdapterAssociation raa = (ResourceAdapterAssociation) mcf;
+ raa.setResourceAdapter(resourceAdapter);
+ }
+ }
+
+ protected void stopService()
+ {
+ mcf = null;
+ mcfClass = null;
+ }
+
+ public void setManagedConnectionFactoryAttribute(String name, Class clazz, Object value)
+ {
+ setManagedConnectionFactoryAttribute(name, clazz, value, false);
+ }
+
+ protected void setManagedConnectionFactoryAttribute(String name, Class clazz, Object value, boolean mustExist)
+ {
+ if (name == null || name.length() == 0)
+ throw new IllegalArgumentException("Null or empty attribute name " + name);
+ String setterName = "set" + Character.toUpperCase(name.charAt(0));
+ if (name.length() > 1)
+ setterName = setterName.concat(name.substring(1));
+ Method setter;
+ try
+ {
+ setter = mcfClass.getMethod(setterName, new Class[] {clazz});
+ }
+ catch (NoSuchMethodException nsme)
+ {
+ String error = "The class '" + mcfClass.toString() + "' has no setter for config property '" + name + "'";
+ if (mustExist)
+ throw new IllegalArgumentException(error);
+ else
+ {
+ log.trace(error, nsme);
+ return;
+ }
+ }
+ try
+ {
+ setter.invoke(mcf, new Object[] {value});
+ log.debug("set property " + name + " to value " + value);
+ }
+ catch (Exception e)
+ {
+ String error = "Unable to invoke setter method '" + setter + "' " + "on object '" + mcf + "'";
+ if (e instanceof InvocationTargetException)
+ throw new NestedRuntimeException(error, ((InvocationTargetException) e).getCause());
+ else
+ throw new NestedRuntimeException(error, e);
+ }
+ sendNotification(new Notification(MCF_ATTRIBUTE_CHANGED_NOTIFICATION, getServiceName(),
+ getNextNotificationSequenceNumber()));
+ }
+
+ public Object getManagedConnectionFactoryAttribute(String name)
+ {
+ if (name == null || name.length() == 0)
+ throw new IllegalArgumentException("Null or empty attribute name " + name);
+ String getterName = "get" + Character.toUpperCase(name.charAt(0));
+ if (name.length() > 1)
+ getterName = getterName.concat(name.substring(1));
+ Method getter;
+ try
+ {
+ getter = mcfClass.getMethod(getterName, new Class[] {});
+ }
+ catch (NoSuchMethodException e)
+ {
+ String msg = "The class '" + mcfClass + "' has no getter("
+ + getterName + ") for config property '" + name + "'";
+ log.debug(msg, e);
+ throw new IllegalArgumentException(msg);
+ }
+ try
+ {
+ Object value = getter.invoke(mcf, new Object[]{});
+ log.debug("get property " + name + ": value " + value);
+ return value;
+ }
+ catch (Exception e)
+ {
+ String error = "Unable to invoke getter method '" + getter + "' " + "on object '" + mcf + "'";
+ log.debug(error, e);
+ if (e instanceof InvocationTargetException)
+ throw new NestedRuntimeException(error, ((InvocationTargetException) e).getCause());
+ else
+ throw new NestedRuntimeException(error, e);
+ }
+ }
+
+ protected void setMcfProperties(Collection properties, boolean mustExist) throws DeploymentException
+ {
+ for (Iterator i = properties.iterator(); i.hasNext();)
+ {
+ ConfigPropertyMetaData cpmd = (ConfigPropertyMetaData) i.next();
+ String name = cpmd.getName();
+ String type = cpmd.getType();
+ String value = cpmd.getValue();
+ if (name == null || name.length() == 0 || value == null || value.length() == 0)
+ {
+ log.debug("Not setting config property '" + name + "'");
+ continue;
+ }
+ // see if it is a primitive type first
+ Class clazz = Classes.getPrimitiveTypeForName(type);
+ if (clazz == null)
+ {
+ //not primitive, look for it.
+ try
+ {
+ clazz = Thread.currentThread().getContextClassLoader().loadClass(type);
+ }
+ catch (ClassNotFoundException cnfe)
+ {
+ log.warn("Unable to find class '" + type + "' for " + "property '" + name + "' - skipping property.");
+ continue;
+ }
+ }
+ PropertyEditor pe = PropertyEditorManager.findEditor(clazz);
+ if (pe == null)
+ {
+ log.warn("Unable to find a PropertyEditor for class '" + clazz + "' of property '" + name + "' - "
+ + "skipping property");
+ continue;
+ }
+ // TODO: should happen in parsing layer?
+ value = StringPropertyReplacer.replaceProperties(value);
+ log.debug("setting property: " + name + " to value " + value);
+ try
+ {
+ pe.setAsText(value);
+ }
+ catch (IllegalArgumentException iae)
+ {
+ log.warn("Value '" + value + "' is not valid for property '" + name + "' of class '" + clazz
+ + "' - skipping " + "property");
+ continue;
+ }
+ Object v = pe.getValue();
+ setManagedConnectionFactoryAttribute(name, clazz, v, mustExist);
+ }
+ }
+
+ protected void setManagedConnectionFactoryProperties(List<ManagedConnectionFactoryPropertyMetaData> properties)
+ {
+
+ for (ManagedConnectionFactoryPropertyMetaData property : properties)
+ {
+ String name = property.getName();
+ String type = property.getType();
+ String value = property.getValue();
+
+ if (name == null || name.length() == 0 || value == null || value.length() == 0)
+ {
+ log.debug("Not setting config property '" + name + "'");
+ continue;
+ }
+
+ if (type == null || type.length() == 0)
+ {
+ // Default to String for convenience.
+ type = "java.lang.String";
+ }
+ Class clazz = Classes.getPrimitiveTypeForName(type);
+ if (clazz == null)
+ {
+ //not primitive, look for it.
+ try
+ {
+ clazz = Thread.currentThread().getContextClassLoader().loadClass(type);
+ }
+ catch (ClassNotFoundException cnfe)
+ {
+ log.warn("Unable to find class '" + type + "' for " + "property '" + name
+ + "' - skipping property.");
+ continue;
+ }
+ }
+ PropertyEditor pe = PropertyEditorManager.findEditor(clazz);
+ if (pe == null)
+ {
+ log.warn("Unable to find a PropertyEditor for class '" + clazz + "' of property '" + name + "' - "
+ + "skipping property");
+ continue;
+ }
+ // TODO: should happen in parsing layer?
+ value = StringPropertyReplacer.replaceProperties(value);
+ log.debug("setting property: " + name + " to value " + value);
+ try
+ {
+ pe.setAsText(value);
+ }
+ catch (IllegalArgumentException iae)
+ {
+ log.warn("Value '" + value + "' is not valid for property '" + name + "' of class '" + clazz
+ + "' - skipping " + "property");
+ continue;
+ }
+ Object v = pe.getValue();
+ setManagedConnectionFactoryAttribute(name, clazz, v);
+
+ }
+
+
+ }
+
+ public Object createConnectionFactory() throws ResourceException
+ {
+ return mcf.createConnectionFactory();
+ }
+
+ public Object createConnectionFactory(ConnectionManager cxManager) throws ResourceException
+ {
+ return mcf.createConnectionFactory(cxManager);
+ }
+
+ public ManagedConnection createManagedConnection(javax.security.auth.Subject subject,
+ ConnectionRequestInfo cxRequestInfo) throws ResourceException
+ {
+ return mcf.createManagedConnection(subject, cxRequestInfo);
+ }
+
+ public boolean equals(Object other)
+ {
+ return mcf.equals(other);
+ }
+
+ public java.io.PrintWriter getLogWriter() throws ResourceException
+ {
+ return mcf.getLogWriter();
+ }
+
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append(getClass().getName());
+ buffer.append('@');
+ buffer.append(Integer.toHexString(System.identityHashCode(this)));
+ return buffer.toString();
+ }
+
+ public int hashCode()
+ {
+ return mcf.hashCode();
+ }
+
+ public ManagedConnection matchManagedConnections(java.util.Set connectionSet, javax.security.auth.Subject subject,
+ ConnectionRequestInfo cxRequestInfo) throws ResourceException
+ {
+ return mcf.matchManagedConnections(connectionSet, subject, cxRequestInfo);
+ }
+
+ public void setLogWriter(java.io.PrintWriter out) throws ResourceException
+ {
+ mcf.setLogWriter(out);
+ }
+
+ @Override
+ protected MBeanAttributeInfo[] getInternalAttributeInfo()
+ {
+ List<MBeanAttributeInfo> attributes = new ArrayList<MBeanAttributeInfo>();
+ attributes.add(new MBeanAttributeInfo("RARName", String.class.getName(), "The ResourceAdapter deployment name.", true, false, false));
+ attributes.add(new MBeanAttributeInfo("OldRarDeployment", javax.management.ObjectName.class.getName(), "The Connection Defintion class name.", true, true, false));
+ attributes.add(new MBeanAttributeInfo("ConnectionDefinition", String.class.getName(), "The Connection Defintion class name.", true, false, false));
+ attributes.add(new MBeanAttributeInfo("VendorName", String.class.getName(), "The Vendor Name.", true, false, false));
+ attributes.add(new MBeanAttributeInfo("SpecVersion", String.class.getName(), "The Specification Version.", true, false, false));
+ attributes.add(new MBeanAttributeInfo("EisType", String.class.getName(), "The Enterprise Information System type.", true, false, false));
+ attributes.add(new MBeanAttributeInfo("Version", String.class.getName(), "The ResourceAdapter version.", true, false, false));
+ attributes.add(new MBeanAttributeInfo("ManagedConnectionFactoryClass", String.class.getName(), "The ManagedConnectionFactory class", true, false, false));
+ attributes.add(new MBeanAttributeInfo("ConnectionFactoryImpl", String.class.getName(), "The Connection Factory implementation", true, false, false));
+ attributes.add(new MBeanAttributeInfo("ConnectionInterface", String.class.getName(), "The Connection Inteface", true, false, false));
+ attributes.add(new MBeanAttributeInfo("ConnectionImplClass", String.class.getName(), "The Connection Implementation class", true, false, false));
+ attributes.add(new MBeanAttributeInfo("TransactionSupport", String.class.getName(), "The Transaction Support", true, false, false));
+ attributes.add(new MBeanAttributeInfo("AuthenticationMechanismType", String.class.getName(), "The Authentication Mechanism Type", true, false, false));
+ attributes.add(new MBeanAttributeInfo("CredentialInterface", String.class.getName(), "The Credential Interface", true, false, false));
+ attributes.add(new MBeanAttributeInfo("ReauthenticationSupport", Boolean.class.getName(), "The Reauthentication Support", true, false, true));
+ attributes.add(new MBeanAttributeInfo("McfInstance", "javax.resource.spi.ManagedConnectionFactory", "The ManagedConnectionFactory instance", true, false, false));
+
+// ConnectionDefinitionMetaData cdmd = cmd.getConnectionDefinition(this.connectionDefinition);
+
+// Collection mcfProps = cdmd.getProperties();
+//
+// for(Iterator iter = mcfProps.iterator(); iter.hasNext();)
+// {
+// ConfigPropertyMetaData cpmd = (ConfigPropertyMetaData)iter.next();
+// attributes.add(new MBeanAttributeInfo(cpmd.getName(), cpmd.getType(), cpmd.getDescription().getDescription(), true, false, false));
+// }
+ MBeanAttributeInfo[] info = attributes.toArray(new MBeanAttributeInfo[attributes.size()]);
+ return info;
+
+ }
+
+ @Override
+ protected void setInternalAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
+ {
+ if("OldRarDeployment".equals(attribute.getName()))
+ {
+ this.oldRarDeployment = (ObjectName)attribute.getValue();
+
+ }
+ }
+
+ @Override
+ protected MBeanOperationInfo[] getInternalOperationInfo()
+ {
+ MBeanOperationInfo[] operations = new MBeanOperationInfo[1];
+ MBeanParameterInfo[] getMCFAttributeParamInfo = new MBeanParameterInfo[]{ new MBeanParameterInfo("ManagedConnectionFactoryAttributeName", String.class.getName(), "The ManagedConnectionFactoryAttribute name")};
+ operations[0] = new MBeanOperationInfo("getManagedConnectionFactoryAttribute", "Inspect the value of a ManagedConnectionFactory attribute", getMCFAttributeParamInfo, Object.class.getName(), MBeanOperationInfo.INFO);
+ return operations;
+
+ }
+
+ @Override
+ protected Object internalInvoke(String actionName, Object[] params, String[] signature) throws MBeanException, ReflectionException
+ {
+ if(actionName.equals("getManagedConnectionFactoryAttribute"))
+ {
+ String param = (String)params[0];
+ return getManagedConnectionFactoryAttribute(param);
+
+ }
+ else
+ {
+ return super.internalInvoke(actionName, params, signature);
+ }
+
+ }
+
+ @Override
+ protected Object getInternalAttribute(String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException
+ {
+ ConnectionDefinitionMetaData cdmd = cmd.getConnectionDefinition(dmd.getConnectionDefinition());
+
+ Object result = null;
+
+ if("RARName".equals(attribute))
+ {
+ result = rarName;
+
+ }else if("OldRarDeployment".equals(attribute))
+ {
+ result = oldRarDeployment;
+ }
+ else if("ConnectionDefinition".equals(attribute))
+ {
+ result = dmd.getConnectionDefinition();
+
+ }else if("VendorName".equals(attribute))
+ {
+ result = cmd.getVendorName();
+
+ }else if("SpecVersion".equals(attribute))
+ {
+ result = cmd.getVersion();
+
+ }else if("EisType".equals(attribute))
+ {
+ result = cmd.getEISType();
+
+ }else if("Version".equals(attribute))
+ {
+ result = cmd.getRAVersion();
+
+ }else if("ManagedConnectionFactoryClass".equals(attribute))
+ {
+ result = cdmd.getManagedConnectionFactoryClass();
+
+ }else if("ConnectionInterface".equals(attribute))
+ {
+ result = cdmd.getConnectionInterfaceClass();
+ }
+ else if("ConnectionFactoryImpl".equals(attribute))
+ {
+ result = cdmd.getConnectionFactoryImplementationClass();
+
+ }else if("ConnectionImplClass".equals(attribute))
+ {
+ result = cdmd.getConnectionImplementationClass();
+
+ }
+ else if("TransactionSupport".equals(attribute))
+ {
+ result = dmd.getTransactionSupportMetaData();
+
+ }
+ else if("AuthenticationMechanismType".equals(attribute))
+ {
+ result = cmd.getAuthenticationMechanism().getAuthenticationMechansimType();
+
+ }
+ else if("CredentialInterface".equals(attribute))
+ {
+ result = cmd.getAuthenticationMechanism().getCredentialInterfaceClass();
+
+ }
+ else if("ReauthenticationSupport".equals(attribute))
+ {
+ result = cmd.getReauthenticationSupport();
+
+ }
+ else if("McfInstance".equals(attribute))
+ {
+ result = mcf;
+ }
+
+ if(result == null)
+ {
+ result = super.getInternalAttribute(attribute);
+ }
+
+ return result;
+ }
+
+ protected String getInternalDescription()
+ {
+ String description = null;
+ DescriptionGroupMetaData dgmd = cmd.getDescription();
+ if (dgmd != null)
+ description = dgmd.getDescription();
+ if (description == null)
+ description = "RAR Deployment ";
+ return description;
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/connectionmanager/SecurityActions.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/connectionmanager/SecurityActions.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/connectionmanager/SecurityActions.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,45 +1,45 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.connectionmanager;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-
-/**
- * Privileged Blocks
- * @author Anil.Saldhana at redhat.com
- * @since Nov 7, 2008
- */
-class SecurityActions
-{
- static void setTCL(final ClassLoader cl)
- {
- AccessController.doPrivileged(new PrivilegedAction<Object>()
- {
- public Object run()
- {
- Thread.currentThread().setContextClassLoader(cl);
-
- return null;
- }});
- }
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.connectionmanager;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ * Privileged Blocks
+ * @author Anil.Saldhana at redhat.com
+ * @since Nov 7, 2008
+ */
+class SecurityActions
+{
+ static void setTCL(final ClassLoader cl)
+ {
+ AccessController.doPrivileged(new PrivilegedAction<Object>()
+ {
+ public Object run()
+ {
+ Thread.currentThread().setContextClassLoader(cl);
+
+ return null;
+ }});
+ }
}
\ No newline at end of file
Modified: trunk/connector/src/main/org/jboss/resource/connectionmanager/xa/XAResourceWrapperImpl.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/connectionmanager/xa/XAResourceWrapperImpl.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/connectionmanager/xa/XAResourceWrapperImpl.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,198 +1,198 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.connectionmanager.xa;
-
-import org.jboss.tm.XAResourceWrapper;
-
-import java.io.Serializable;
-
-import javax.transaction.xa.XAException;
-import javax.transaction.xa.XAResource;
-import javax.transaction.xa.Xid;
-
-import org.jboss.logging.Logger;
-
-/**
- * A XAResourceWrapper.
- *
- * @author <a href="weston.price at jboss.com">Weston Price</a>
- * @author <a href="jesper.pedersen at jboss.org">Jesper Pedersen</a>
- * @version $Revision: 1.1 $
- */
-public class XAResourceWrapperImpl implements XAResourceWrapper
-{
- /** The serialVersionUID */
- //private static final long serialVersionUID = 4551722165222496828L;
-
- private static final Logger log = Logger.getLogger(XAResourceWrapperImpl.class);
-
- /** The xaResource */
- private XAResource xaResource;
-
- private boolean pad;
-
- private Boolean overrideRmValue;
-
- private String productName;
-
- private String productVersion;
-
- public XAResourceWrapperImpl(XAResource resource)
- {
- this(resource, false, Boolean.FALSE, null, null);
- }
-
- public XAResourceWrapperImpl(XAResource resource, boolean pad)
- {
- this(resource, pad, Boolean.FALSE, null, null);
- }
-
- public XAResourceWrapperImpl(XAResource resource, boolean pad, Boolean override)
- {
- this(resource, pad, override, null, null);
- }
-
- public XAResourceWrapperImpl(XAResource resource, boolean pad, Boolean override, String productName, String productVersion)
- {
- this.overrideRmValue = override;
- this.pad = pad;
- this.xaResource = resource;
- this.productName = productName;
- this.productVersion = productVersion;
- }
-
- public void commit(Xid xid, boolean onePhase) throws XAException
- {
- xid = convertXid(xid);
- xaResource.commit(xid, onePhase);
- }
-
- public void end(Xid xid, int flags) throws XAException
- {
- xid = convertXid(xid);
- xaResource.end(xid, flags);
- }
-
- public void forget(Xid xid) throws XAException
- {
- xid = convertXid(xid);
- xaResource.forget(xid);
- }
-
- public int getTransactionTimeout() throws XAException
- {
- return xaResource.getTransactionTimeout();
- }
-
- public boolean isSameRM(XAResource resource) throws XAException
- {
- if (overrideRmValue != null)
- {
- if(log.isTraceEnabled())
- {
- log.trace("Executing isSameRM with override value" + overrideRmValue + " for XAResourceWrapper" + this);
- }
- return overrideRmValue.booleanValue();
- }
- else
- {
- if(resource instanceof XAResourceWrapper)
- {
- XAResourceWrapper other = (XAResourceWrapper)resource;
- return xaResource.isSameRM(other.getResource());
- }
- else
- {
- return xaResource.isSameRM(resource);
- }
-
- }
- }
-
- public int prepare(Xid xid) throws XAException
- {
- xid = convertXid(xid);
- return xaResource.prepare(xid);
- }
-
- public Xid[] recover(int flag) throws XAException
- {
- return xaResource.recover(flag);
- }
-
- public void rollback(Xid xid) throws XAException
- {
- xid = convertXid(xid);
- xaResource.rollback(xid);
- }
-
- public boolean setTransactionTimeout(int flag) throws XAException
- {
- return xaResource.setTransactionTimeout(flag);
- }
-
- public void start(Xid xid, int flags) throws XAException
- {
- xid = convertXid(xid);
- xaResource.start(xid, flags);
- }
-
- /**
- * Get the XAResource that is being wrapped
- * @return The XAResource
- */
- public XAResource getResource()
- {
- return xaResource;
- }
-
- /**
- * Get product name
- * @return Product name of the instance if defined; otherwise <code>null</code>
- */
- public String getProductName()
- {
- return productName;
- }
-
- /**
- * Get product version
- * @return Product version of the instance if defined; otherwise <code>null</code>
- */
- public String getProductVersion()
- {
- return productVersion;
- }
-
- private Xid convertXid(Xid xid)
- {
- if (xid instanceof XidWrapper)
- return xid;
- else
- return new XidWrapperImpl(pad, xid);
- }
-
- public String toString()
- {
- return super.toString();
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.connectionmanager.xa;
+
+import org.jboss.tm.XAResourceWrapper;
+
+import java.io.Serializable;
+
+import javax.transaction.xa.XAException;
+import javax.transaction.xa.XAResource;
+import javax.transaction.xa.Xid;
+
+import org.jboss.logging.Logger;
+
+/**
+ * A XAResourceWrapper.
+ *
+ * @author <a href="weston.price at jboss.com">Weston Price</a>
+ * @author <a href="jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public class XAResourceWrapperImpl implements XAResourceWrapper
+{
+ /** The serialVersionUID */
+ //private static final long serialVersionUID = 4551722165222496828L;
+
+ private static final Logger log = Logger.getLogger(XAResourceWrapperImpl.class);
+
+ /** The xaResource */
+ private XAResource xaResource;
+
+ private boolean pad;
+
+ private Boolean overrideRmValue;
+
+ private String productName;
+
+ private String productVersion;
+
+ public XAResourceWrapperImpl(XAResource resource)
+ {
+ this(resource, false, Boolean.FALSE, null, null);
+ }
+
+ public XAResourceWrapperImpl(XAResource resource, boolean pad)
+ {
+ this(resource, pad, Boolean.FALSE, null, null);
+ }
+
+ public XAResourceWrapperImpl(XAResource resource, boolean pad, Boolean override)
+ {
+ this(resource, pad, override, null, null);
+ }
+
+ public XAResourceWrapperImpl(XAResource resource, boolean pad, Boolean override, String productName, String productVersion)
+ {
+ this.overrideRmValue = override;
+ this.pad = pad;
+ this.xaResource = resource;
+ this.productName = productName;
+ this.productVersion = productVersion;
+ }
+
+ public void commit(Xid xid, boolean onePhase) throws XAException
+ {
+ xid = convertXid(xid);
+ xaResource.commit(xid, onePhase);
+ }
+
+ public void end(Xid xid, int flags) throws XAException
+ {
+ xid = convertXid(xid);
+ xaResource.end(xid, flags);
+ }
+
+ public void forget(Xid xid) throws XAException
+ {
+ xid = convertXid(xid);
+ xaResource.forget(xid);
+ }
+
+ public int getTransactionTimeout() throws XAException
+ {
+ return xaResource.getTransactionTimeout();
+ }
+
+ public boolean isSameRM(XAResource resource) throws XAException
+ {
+ if (overrideRmValue != null)
+ {
+ if(log.isTraceEnabled())
+ {
+ log.trace("Executing isSameRM with override value" + overrideRmValue + " for XAResourceWrapper" + this);
+ }
+ return overrideRmValue.booleanValue();
+ }
+ else
+ {
+ if(resource instanceof XAResourceWrapper)
+ {
+ XAResourceWrapper other = (XAResourceWrapper)resource;
+ return xaResource.isSameRM(other.getResource());
+ }
+ else
+ {
+ return xaResource.isSameRM(resource);
+ }
+
+ }
+ }
+
+ public int prepare(Xid xid) throws XAException
+ {
+ xid = convertXid(xid);
+ return xaResource.prepare(xid);
+ }
+
+ public Xid[] recover(int flag) throws XAException
+ {
+ return xaResource.recover(flag);
+ }
+
+ public void rollback(Xid xid) throws XAException
+ {
+ xid = convertXid(xid);
+ xaResource.rollback(xid);
+ }
+
+ public boolean setTransactionTimeout(int flag) throws XAException
+ {
+ return xaResource.setTransactionTimeout(flag);
+ }
+
+ public void start(Xid xid, int flags) throws XAException
+ {
+ xid = convertXid(xid);
+ xaResource.start(xid, flags);
+ }
+
+ /**
+ * Get the XAResource that is being wrapped
+ * @return The XAResource
+ */
+ public XAResource getResource()
+ {
+ return xaResource;
+ }
+
+ /**
+ * Get product name
+ * @return Product name of the instance if defined; otherwise <code>null</code>
+ */
+ public String getProductName()
+ {
+ return productName;
+ }
+
+ /**
+ * Get product version
+ * @return Product version of the instance if defined; otherwise <code>null</code>
+ */
+ public String getProductVersion()
+ {
+ return productVersion;
+ }
+
+ private Xid convertXid(Xid xid)
+ {
+ if (xid instanceof XidWrapper)
+ return xid;
+ else
+ return new XidWrapperImpl(pad, xid);
+ }
+
+ public String toString()
+ {
+ return super.toString();
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/connectionmanager/xa/XidWrapper.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/connectionmanager/xa/XidWrapper.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/connectionmanager/xa/XidWrapper.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,36 +1,36 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.connectionmanager.xa;
-
-import java.io.Serializable;
-
-import javax.transaction.xa.Xid;
-
-/**
- * A XidWrapper.
- *
- * @author <a href="jesper.pedersen at jboss.org">Jesper Pedersen</a>
- * @version $Revision: 1.1 $
- */
-public interface XidWrapper extends Serializable, Xid
-{
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.connectionmanager.xa;
+
+import java.io.Serializable;
+
+import javax.transaction.xa.Xid;
+
+/**
+ * A XidWrapper.
+ *
+ * @author <a href="jesper.pedersen at jboss.org">Jesper Pedersen</a>
+ * @version $Revision: 1.1 $
+ */
+public interface XidWrapper extends Serializable, Xid
+{
+}
Modified: trunk/connector/src/main/org/jboss/resource/connectionmanager/xa/XidWrapperImpl.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/connectionmanager/xa/XidWrapperImpl.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/connectionmanager/xa/XidWrapperImpl.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,131 +1,131 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.connectionmanager.xa;
-
-import java.io.Serializable;
-import java.util.Arrays;
-
-import javax.transaction.xa.Xid;
-
-/**
- * A XidWrapper.
- *
- * @author <a href="weston.price at jboss.com">Weston Price</a>
- * @version $Revision: 1.1 $
- */
-public class XidWrapperImpl implements XidWrapper
-{
- /** The serialVersionUID */
- private static final long serialVersionUID = 8226195409384804425L;
-
- /** The formatId */
- private int formatId;
-
- /** The globalTransactionId */
- private byte[] globalTransactionId;
-
- /** The branchQualifier */
- private byte[] branchQualifier;
-
- /** Cached toString() */
- private transient String cachedToString;
-
- /** Cached hashCode() */
- private transient int cachedHashCode;
-
- /** Whether or not to pad the id */
- private boolean pad;
-
- public XidWrapperImpl(Xid xid)
- {
- this(false, xid);
- }
-
- public XidWrapperImpl(boolean pad, Xid xid)
- {
- this.pad = pad;
-
- branchQualifier = (pad) ? new byte[Xid.MAXBQUALSIZE] : new byte[xid.getBranchQualifier().length];
- System.arraycopy(xid.getBranchQualifier(), 0, branchQualifier, 0, xid.getBranchQualifier().length);
- this.globalTransactionId = xid.getGlobalTransactionId();
- this.formatId = xid.getFormatId();
- }
-
- public byte[] getBranchQualifier()
- {
- return this.branchQualifier;
- }
-
- public int getFormatId()
- {
- return this.formatId;
- }
-
- public byte[] getGlobalTransactionId()
- {
- return this.globalTransactionId;
- }
-
- public boolean equals(Object object)
- {
- if (object == null || (object instanceof Xid) == false)
- return false;
-
- Xid other = (Xid) object;
- return
- (
- formatId == other.getFormatId() &&
- Arrays.equals(globalTransactionId, other.getGlobalTransactionId()) &&
- Arrays.equals(branchQualifier, other.getBranchQualifier())
- );
- }
-
- public int hashCode()
- {
- if (cachedHashCode == 0)
- {
- cachedHashCode = formatId;
- for (int i = 0; i < globalTransactionId.length; ++i)
- cachedHashCode += globalTransactionId[i];
- }
- return cachedHashCode;
- }
-
- public String toString()
- {
- if (cachedToString == null)
- {
- StringBuffer buffer = new StringBuffer();
- buffer.append("XidWrapper[FormatId=").append(getFormatId());
- buffer.append(" GlobalId=").append(new String(getGlobalTransactionId()).trim());
- byte[] branchQualifer = getBranchQualifier();
- buffer.append(" BranchQual=");
- if (branchQualifer == null)
- buffer.append("null");
- else
- buffer.append(new String(getBranchQualifier()).trim());
- buffer.append(']');
- cachedToString = buffer.toString();
- }
- return cachedToString;
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.connectionmanager.xa;
+
+import java.io.Serializable;
+import java.util.Arrays;
+
+import javax.transaction.xa.Xid;
+
+/**
+ * A XidWrapper.
+ *
+ * @author <a href="weston.price at jboss.com">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public class XidWrapperImpl implements XidWrapper
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = 8226195409384804425L;
+
+ /** The formatId */
+ private int formatId;
+
+ /** The globalTransactionId */
+ private byte[] globalTransactionId;
+
+ /** The branchQualifier */
+ private byte[] branchQualifier;
+
+ /** Cached toString() */
+ private transient String cachedToString;
+
+ /** Cached hashCode() */
+ private transient int cachedHashCode;
+
+ /** Whether or not to pad the id */
+ private boolean pad;
+
+ public XidWrapperImpl(Xid xid)
+ {
+ this(false, xid);
+ }
+
+ public XidWrapperImpl(boolean pad, Xid xid)
+ {
+ this.pad = pad;
+
+ branchQualifier = (pad) ? new byte[Xid.MAXBQUALSIZE] : new byte[xid.getBranchQualifier().length];
+ System.arraycopy(xid.getBranchQualifier(), 0, branchQualifier, 0, xid.getBranchQualifier().length);
+ this.globalTransactionId = xid.getGlobalTransactionId();
+ this.formatId = xid.getFormatId();
+ }
+
+ public byte[] getBranchQualifier()
+ {
+ return this.branchQualifier;
+ }
+
+ public int getFormatId()
+ {
+ return this.formatId;
+ }
+
+ public byte[] getGlobalTransactionId()
+ {
+ return this.globalTransactionId;
+ }
+
+ public boolean equals(Object object)
+ {
+ if (object == null || (object instanceof Xid) == false)
+ return false;
+
+ Xid other = (Xid) object;
+ return
+ (
+ formatId == other.getFormatId() &&
+ Arrays.equals(globalTransactionId, other.getGlobalTransactionId()) &&
+ Arrays.equals(branchQualifier, other.getBranchQualifier())
+ );
+ }
+
+ public int hashCode()
+ {
+ if (cachedHashCode == 0)
+ {
+ cachedHashCode = formatId;
+ for (int i = 0; i < globalTransactionId.length; ++i)
+ cachedHashCode += globalTransactionId[i];
+ }
+ return cachedHashCode;
+ }
+
+ public String toString()
+ {
+ if (cachedToString == null)
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("XidWrapper[FormatId=").append(getFormatId());
+ buffer.append(" GlobalId=").append(new String(getGlobalTransactionId()).trim());
+ byte[] branchQualifer = getBranchQualifier();
+ buffer.append(" BranchQual=");
+ if (branchQualifer == null)
+ buffer.append("null");
+ else
+ buffer.append(new String(getBranchQualifier()).trim());
+ buffer.append(']');
+ cachedToString = buffer.toString();
+ }
+ return cachedToString;
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/deployers/ManagedConnectionFactoryClassLoaderDeployer.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/deployers/ManagedConnectionFactoryClassLoaderDeployer.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/deployers/ManagedConnectionFactoryClassLoaderDeployer.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,61 +1,61 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.deployers;
-
-import org.jboss.classloading.spi.metadata.ClassLoadingMetaData;
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.DeploymentStages;
-import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.mx.loading.LoaderRepositoryFactory.LoaderRepositoryConfig;
-import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup;
-import org.jboss.system.deployers.LoaderRepositoryConfigHelper;
-
-/**
- * ManagedConnectionFactoryClassLoaderDeployer.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class ManagedConnectionFactoryClassLoaderDeployer extends AbstractSimpleRealDeployer<ManagedConnectionFactoryDeploymentGroup>
-{
- public ManagedConnectionFactoryClassLoaderDeployer()
- {
- super(ManagedConnectionFactoryDeploymentGroup.class);
- setStage(DeploymentStages.POST_PARSE);
- setTopLevelOnly(true);
- setOutput(ClassLoadingMetaData.class);
- }
-
- public void deploy(DeploymentUnit unit, ManagedConnectionFactoryDeploymentGroup deployment) throws DeploymentException
- {
- ClassLoadingMetaData classLoadingMetaData = unit.getAttachment(ClassLoadingMetaData.class);
- if (classLoadingMetaData != null)
- return;
-
- LoaderRepositoryConfig loaderConfig = deployment.getLoaderRepositoryConfig();
- if (loaderConfig == null)
- return;
-
- LoaderRepositoryConfigHelper.create(unit, loaderConfig);
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.deployers;
+
+import org.jboss.classloading.spi.metadata.ClassLoadingMetaData;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.mx.loading.LoaderRepositoryFactory.LoaderRepositoryConfig;
+import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup;
+import org.jboss.system.deployers.LoaderRepositoryConfigHelper;
+
+/**
+ * ManagedConnectionFactoryClassLoaderDeployer.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class ManagedConnectionFactoryClassLoaderDeployer extends AbstractSimpleRealDeployer<ManagedConnectionFactoryDeploymentGroup>
+{
+ public ManagedConnectionFactoryClassLoaderDeployer()
+ {
+ super(ManagedConnectionFactoryDeploymentGroup.class);
+ setStage(DeploymentStages.POST_PARSE);
+ setTopLevelOnly(true);
+ setOutput(ClassLoadingMetaData.class);
+ }
+
+ public void deploy(DeploymentUnit unit, ManagedConnectionFactoryDeploymentGroup deployment) throws DeploymentException
+ {
+ ClassLoadingMetaData classLoadingMetaData = unit.getAttachment(ClassLoadingMetaData.class);
+ if (classLoadingMetaData != null)
+ return;
+
+ LoaderRepositoryConfig loaderConfig = deployment.getLoaderRepositoryConfig();
+ if (loaderConfig == null)
+ return;
+
+ LoaderRepositoryConfigHelper.create(unit, loaderConfig);
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/deployers/ManagedConnectionFactoryDeployer.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/deployers/ManagedConnectionFactoryDeployer.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/deployers/ManagedConnectionFactoryDeployer.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,197 +1,197 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.deployers;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
-import org.jboss.deployers.spi.management.KnownComponentTypes;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.managed.api.ComponentType;
-import org.jboss.resource.deployers.builder.AbstractBuilder;
-import org.jboss.resource.metadata.mcf.LocalDataSourceDeploymentMetaData;
-import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup;
-import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData;
-import org.jboss.resource.metadata.mcf.NoTxDataSourceDeploymentMetaData;
-import org.jboss.resource.metadata.mcf.XADataSourceDeploymentMetaData;
-import org.jboss.resource.metadata.repository.DefaultJCAMetaDataRepository;
-import org.jboss.system.metadata.ServiceDeployment;
-import org.jboss.system.metadata.ServiceMetaData;
-
-/**
- * A ManagedConnectionFactoryDeployer.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @author Scott.Stark at jboss.org
- * @author adrian at jboss.org
- * @version $Revision: 1.1 $
- */
-public class ManagedConnectionFactoryDeployer
- extends AbstractSimpleRealDeployer<ManagedConnectionFactoryDeploymentGroup>
-{
- /** The repository */
- private DefaultJCAMetaDataRepository repository;
-
- /** The builders */
- private List<AbstractBuilder> builders = new ArrayList<AbstractBuilder>();
- /** The ManagedConnectionFactoryDeploymentGroup props to manage */
- private String[] propNames = {
- "jndiName",
- "jdbcURL",
- "userName",
- "passWord",
- "driverClass",
- "minPoolSize",
- "maxPoolSize",
- "securityMetaData",
- "managedConnectionFactoryProperties",
- };
- /**
- * A mapping from the managed property name to the attachment property name.
- */
- private Map<String, String> propertyNameMappings = new HashMap<String, String>();
-
- public Map<String, String> getPropertyNameMappings()
- {
- return propertyNameMappings;
- }
-
- public void setPropertyNameMappings(Map<String, String> mangedToMBeanNames)
- {
- propertyNameMappings.clear();
- /*
- propertyNameMappings.putAll(mangedToMBeanNames);
- */
- // Need to reverse the mapping
- for(String key : mangedToMBeanNames.keySet())
- {
- String value = mangedToMBeanNames.get(key);
- propertyNameMappings.put(value, key);
- }
- }
-
- public String[] getPropNames()
- {
- return propNames;
- }
-
- public void setPropNames(String[] propNames)
- {
- this.propNames = propNames;
- }
-
- /**
- * Create a new ManagedConnectionFactoryDeployer.
- */
- public ManagedConnectionFactoryDeployer()
- {
- super(ManagedConnectionFactoryDeploymentGroup.class);
- setOutput(ServiceDeployment.class);
- }
-
- public void setBuilders(List<AbstractBuilder> builders)
- {
- this.builders = builders;
- }
-
- public List<AbstractBuilder> getBuilders()
- {
- return this.builders;
- }
-
- /**
- * Get the repository.
- *
- * @return the repository.
- */
- public DefaultJCAMetaDataRepository getRepository()
- {
- return repository;
- }
-
- /**
- * Set the repository.
- *
- * @param repository The repository to set.
- */
- public void setRepository(DefaultJCAMetaDataRepository repository)
- {
- this.repository = repository;
- }
-
- @Override
- public void deploy(DeploymentUnit unit, ManagedConnectionFactoryDeploymentGroup group) throws DeploymentException
- {
-
- List<ManagedConnectionFactoryDeploymentMetaData> deployments = group.getDeployments();
- ServiceDeployment serviceDeployment = new ServiceDeployment();
- List<ServiceMetaData> componentServices = new ArrayList<ServiceMetaData>();
- List<ServiceMetaData> serviceDefintion = group.getServices();
-
- serviceDeployment.setName(unit.getName()+" services");
- //For some reason, this didn't like the addAll method
- for (ServiceMetaData data : serviceDefintion)
- {
- componentServices.add(data);
- }
-
- ComponentType type = null;
- for (ManagedConnectionFactoryDeploymentMetaData data : deployments)
- {
- // TODO: there should be multiple component types
- if( type == null )
- {
- if( data instanceof LocalDataSourceDeploymentMetaData )
- type = KnownComponentTypes.DataSourceTypes.LocalTx.getType();
- if( data instanceof NoTxDataSourceDeploymentMetaData )
- type = KnownComponentTypes.DataSourceTypes.NoTx.getType();
- if( data instanceof XADataSourceDeploymentMetaData )
- type = KnownComponentTypes.DataSourceTypes.XA.getType();
- }
-
- for (AbstractBuilder builder : builders)
- {
- ServiceMetaData candidate = builder.build(data);
-
- if(candidate != null)
- {
- componentServices.add(candidate);
- }
- }
- }
-
- serviceDeployment.setServices(componentServices);
- unit.addAttachment(ServiceDeployment.class, serviceDeployment);
- if( type != null )
- unit.addAttachment(ComponentType.class, type);
- }
-
- @Override
- public void undeploy(DeploymentUnit unit, ManagedConnectionFactoryDeploymentGroup deployment)
- {
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.deployers;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
+import org.jboss.deployers.spi.management.KnownComponentTypes;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.managed.api.ComponentType;
+import org.jboss.resource.deployers.builder.AbstractBuilder;
+import org.jboss.resource.metadata.mcf.LocalDataSourceDeploymentMetaData;
+import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup;
+import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData;
+import org.jboss.resource.metadata.mcf.NoTxDataSourceDeploymentMetaData;
+import org.jboss.resource.metadata.mcf.XADataSourceDeploymentMetaData;
+import org.jboss.resource.metadata.repository.DefaultJCAMetaDataRepository;
+import org.jboss.system.metadata.ServiceDeployment;
+import org.jboss.system.metadata.ServiceMetaData;
+
+/**
+ * A ManagedConnectionFactoryDeployer.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @author Scott.Stark at jboss.org
+ * @author adrian at jboss.org
+ * @version $Revision: 1.1 $
+ */
+public class ManagedConnectionFactoryDeployer
+ extends AbstractSimpleRealDeployer<ManagedConnectionFactoryDeploymentGroup>
+{
+ /** The repository */
+ private DefaultJCAMetaDataRepository repository;
+
+ /** The builders */
+ private List<AbstractBuilder> builders = new ArrayList<AbstractBuilder>();
+ /** The ManagedConnectionFactoryDeploymentGroup props to manage */
+ private String[] propNames = {
+ "jndiName",
+ "jdbcURL",
+ "userName",
+ "passWord",
+ "driverClass",
+ "minPoolSize",
+ "maxPoolSize",
+ "securityMetaData",
+ "managedConnectionFactoryProperties",
+ };
+ /**
+ * A mapping from the managed property name to the attachment property name.
+ */
+ private Map<String, String> propertyNameMappings = new HashMap<String, String>();
+
+ public Map<String, String> getPropertyNameMappings()
+ {
+ return propertyNameMappings;
+ }
+
+ public void setPropertyNameMappings(Map<String, String> mangedToMBeanNames)
+ {
+ propertyNameMappings.clear();
+ /*
+ propertyNameMappings.putAll(mangedToMBeanNames);
+ */
+ // Need to reverse the mapping
+ for(String key : mangedToMBeanNames.keySet())
+ {
+ String value = mangedToMBeanNames.get(key);
+ propertyNameMappings.put(value, key);
+ }
+ }
+
+ public String[] getPropNames()
+ {
+ return propNames;
+ }
+
+ public void setPropNames(String[] propNames)
+ {
+ this.propNames = propNames;
+ }
+
+ /**
+ * Create a new ManagedConnectionFactoryDeployer.
+ */
+ public ManagedConnectionFactoryDeployer()
+ {
+ super(ManagedConnectionFactoryDeploymentGroup.class);
+ setOutput(ServiceDeployment.class);
+ }
+
+ public void setBuilders(List<AbstractBuilder> builders)
+ {
+ this.builders = builders;
+ }
+
+ public List<AbstractBuilder> getBuilders()
+ {
+ return this.builders;
+ }
+
+ /**
+ * Get the repository.
+ *
+ * @return the repository.
+ */
+ public DefaultJCAMetaDataRepository getRepository()
+ {
+ return repository;
+ }
+
+ /**
+ * Set the repository.
+ *
+ * @param repository The repository to set.
+ */
+ public void setRepository(DefaultJCAMetaDataRepository repository)
+ {
+ this.repository = repository;
+ }
+
+ @Override
+ public void deploy(DeploymentUnit unit, ManagedConnectionFactoryDeploymentGroup group) throws DeploymentException
+ {
+
+ List<ManagedConnectionFactoryDeploymentMetaData> deployments = group.getDeployments();
+ ServiceDeployment serviceDeployment = new ServiceDeployment();
+ List<ServiceMetaData> componentServices = new ArrayList<ServiceMetaData>();
+ List<ServiceMetaData> serviceDefintion = group.getServices();
+
+ serviceDeployment.setName(unit.getName()+" services");
+ //For some reason, this didn't like the addAll method
+ for (ServiceMetaData data : serviceDefintion)
+ {
+ componentServices.add(data);
+ }
+
+ ComponentType type = null;
+ for (ManagedConnectionFactoryDeploymentMetaData data : deployments)
+ {
+ // TODO: there should be multiple component types
+ if( type == null )
+ {
+ if( data instanceof LocalDataSourceDeploymentMetaData )
+ type = KnownComponentTypes.DataSourceTypes.LocalTx.getType();
+ if( data instanceof NoTxDataSourceDeploymentMetaData )
+ type = KnownComponentTypes.DataSourceTypes.NoTx.getType();
+ if( data instanceof XADataSourceDeploymentMetaData )
+ type = KnownComponentTypes.DataSourceTypes.XA.getType();
+ }
+
+ for (AbstractBuilder builder : builders)
+ {
+ ServiceMetaData candidate = builder.build(data);
+
+ if(candidate != null)
+ {
+ componentServices.add(candidate);
+ }
+ }
+ }
+
+ serviceDeployment.setServices(componentServices);
+ unit.addAttachment(ServiceDeployment.class, serviceDeployment);
+ if( type != null )
+ unit.addAttachment(ComponentType.class, type);
+ }
+
+ @Override
+ public void undeploy(DeploymentUnit unit, ManagedConnectionFactoryDeploymentGroup deployment)
+ {
+ }
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/deployers/ManagedConnectionFactoryParserDeployer.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/deployers/ManagedConnectionFactoryParserDeployer.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/deployers/ManagedConnectionFactoryParserDeployer.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,181 +1,181 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.deployers;
-
-import java.io.InputStream;
-import java.util.Map;
-import java.util.Set;
-
-import javax.xml.bind.JAXBContext;
-import javax.xml.bind.JAXBElement;
-import javax.xml.bind.Unmarshaller;
-import javax.xml.transform.sax.SAXSource;
-
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.managed.ManagedObjectCreator;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.managed.api.ManagedObject;
-import org.jboss.managed.api.ManagedProperty;
-import org.jboss.managed.plugins.factory.AbstractManagedObjectFactory;
-import org.jboss.metatype.api.types.CollectionMetaType;
-import org.jboss.metatype.api.types.MetaType;
-import org.jboss.metatype.api.values.CollectionValue;
-import org.jboss.metatype.api.values.GenericValue;
-import org.jboss.metatype.api.values.MetaValue;
-import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup;
-import org.jboss.resource.metadata.repository.JCAMetaDataRepository;
-import org.jboss.util.xml.JBossEntityResolver;
-import org.jboss.virtual.VirtualFile;
-import org.xml.sax.InputSource;
-import org.xml.sax.XMLReader;
-import org.xml.sax.helpers.XMLReaderFactory;
-
-/**
- * A ManagedConnectionFactoryParserDeployer.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @author adrian at jboss.org
- * @version $Revision$
- *
- * TODO Note, this is currently a total hack until we can rework the JAXBDeployer
- */
-public class ManagedConnectionFactoryParserDeployer extends AbstractVFSParsingDeployer<ManagedConnectionFactoryDeploymentGroup>
- implements ManagedObjectCreator
-{
- /** The context */
- private JAXBContext context;
-
- /** The repository */
- private JCAMetaDataRepository repository;
-
- /**
- * Create a new ManagedConnectionFactoryParserDeployer.
- */
- public ManagedConnectionFactoryParserDeployer()
- {
- super(ManagedConnectionFactoryDeploymentGroup.class);
- setIncludeDeploymentFile(true);
- setBuildManagedObject(true);
-
- }
-
- /**
- * Get the repository.
- *
- * @return the repository.
- */
- public JCAMetaDataRepository getRepository()
- {
- return repository;
- }
-
- /**
- * Set the repository.
- *
- * @param repository The repository to set.
- */
- public void setRepository(JCAMetaDataRepository repository)
- {
- this.repository = repository;
- }
-
- public void create() throws Exception
- {
- Class<?>[] classes = {super.getOutput()};
- context = JAXBContext.newInstance(classes);
- }
-
- @Override
- protected ManagedConnectionFactoryDeploymentGroup parse(VFSDeploymentUnit unit, VirtualFile file, ManagedConnectionFactoryDeploymentGroup root) throws Exception
- {
- //TODO do we need to this every time?
- Unmarshaller um = context.createUnmarshaller();
- InputStream is = file.openStream();
-
- try
- {
- InputSource input = new InputSource(is);
- input.setSystemId(file.toURI().toString());
- XMLReader reader = XMLReaderFactory.createXMLReader();
- reader.setEntityResolver(new JBossEntityResolver());
- SAXSource source = new SAXSource(reader, input);
- JAXBElement<ManagedConnectionFactoryDeploymentGroup> elem = um.unmarshal(source, ManagedConnectionFactoryDeploymentGroup.class);
- ManagedConnectionFactoryDeploymentGroup deployment = elem.getValue();
- repository.addManagedConnectionFactoryDeploymentGroup(deployment);
- return deployment;
- }
- finally
- {
- if (is != null)
- is.close();
- }
- }
-
- @Override
- protected void init(VFSDeploymentUnit unit, ManagedConnectionFactoryDeploymentGroup metaData, VirtualFile file) throws Exception
- {
- metaData.setUrl(file.toURL());
- }
-
- /**
- * Build managed object.
- *
- * @param unit the deployment unit
- * @param managedObjects map of managed objects
- * @throws DeploymentException for any deployment exception
- */
- public void build(DeploymentUnit unit, Set<String> outputs,
- Map<String, ManagedObject> managedObjects) throws DeploymentException
- {
- if(isBuildManagedObject())
- {
- ManagedObject mcfdgMO = managedObjects.get(ManagedConnectionFactoryDeploymentGroup.class.getName());
- if(mcfdgMO != null)
- {
- ManagedProperty deployments = mcfdgMO.getProperty("deployments");
- MetaType propType = deployments.getMetaType();
- if (propType.isCollection())
- {
- CollectionMetaType amt = (CollectionMetaType) propType;
- MetaType etype = amt.getElementType();
- if (etype == AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE)
- {
- CollectionValue avalue = (CollectionValue) deployments.getValue();
- if(avalue != null)
- {
- MetaValue[] elements = avalue.getElements();
- for(int n = 0; n < avalue.getSize(); n ++)
- {
- GenericValue gv = (GenericValue) elements[n];
- ManagedObject propMO = (ManagedObject) gv.getValue();
- managedObjects.put(propMO.getName(), propMO);
- }
- }
- }
- }
- }
-
- }
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.deployers;
+
+import java.io.InputStream;
+import java.util.Map;
+import java.util.Set;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.Unmarshaller;
+import javax.xml.transform.sax.SAXSource;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.managed.ManagedObjectCreator;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.managed.api.ManagedObject;
+import org.jboss.managed.api.ManagedProperty;
+import org.jboss.managed.plugins.factory.AbstractManagedObjectFactory;
+import org.jboss.metatype.api.types.CollectionMetaType;
+import org.jboss.metatype.api.types.MetaType;
+import org.jboss.metatype.api.values.CollectionValue;
+import org.jboss.metatype.api.values.GenericValue;
+import org.jboss.metatype.api.values.MetaValue;
+import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup;
+import org.jboss.resource.metadata.repository.JCAMetaDataRepository;
+import org.jboss.util.xml.JBossEntityResolver;
+import org.jboss.virtual.VirtualFile;
+import org.xml.sax.InputSource;
+import org.xml.sax.XMLReader;
+import org.xml.sax.helpers.XMLReaderFactory;
+
+/**
+ * A ManagedConnectionFactoryParserDeployer.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @author adrian at jboss.org
+ * @version $Revision$
+ *
+ * TODO Note, this is currently a total hack until we can rework the JAXBDeployer
+ */
+public class ManagedConnectionFactoryParserDeployer extends AbstractVFSParsingDeployer<ManagedConnectionFactoryDeploymentGroup>
+ implements ManagedObjectCreator
+{
+ /** The context */
+ private JAXBContext context;
+
+ /** The repository */
+ private JCAMetaDataRepository repository;
+
+ /**
+ * Create a new ManagedConnectionFactoryParserDeployer.
+ */
+ public ManagedConnectionFactoryParserDeployer()
+ {
+ super(ManagedConnectionFactoryDeploymentGroup.class);
+ setIncludeDeploymentFile(true);
+ setBuildManagedObject(true);
+
+ }
+
+ /**
+ * Get the repository.
+ *
+ * @return the repository.
+ */
+ public JCAMetaDataRepository getRepository()
+ {
+ return repository;
+ }
+
+ /**
+ * Set the repository.
+ *
+ * @param repository The repository to set.
+ */
+ public void setRepository(JCAMetaDataRepository repository)
+ {
+ this.repository = repository;
+ }
+
+ public void create() throws Exception
+ {
+ Class<?>[] classes = {super.getOutput()};
+ context = JAXBContext.newInstance(classes);
+ }
+
+ @Override
+ protected ManagedConnectionFactoryDeploymentGroup parse(VFSDeploymentUnit unit, VirtualFile file, ManagedConnectionFactoryDeploymentGroup root) throws Exception
+ {
+ //TODO do we need to this every time?
+ Unmarshaller um = context.createUnmarshaller();
+ InputStream is = file.openStream();
+
+ try
+ {
+ InputSource input = new InputSource(is);
+ input.setSystemId(file.toURI().toString());
+ XMLReader reader = XMLReaderFactory.createXMLReader();
+ reader.setEntityResolver(new JBossEntityResolver());
+ SAXSource source = new SAXSource(reader, input);
+ JAXBElement<ManagedConnectionFactoryDeploymentGroup> elem = um.unmarshal(source, ManagedConnectionFactoryDeploymentGroup.class);
+ ManagedConnectionFactoryDeploymentGroup deployment = elem.getValue();
+ repository.addManagedConnectionFactoryDeploymentGroup(deployment);
+ return deployment;
+ }
+ finally
+ {
+ if (is != null)
+ is.close();
+ }
+ }
+
+ @Override
+ protected void init(VFSDeploymentUnit unit, ManagedConnectionFactoryDeploymentGroup metaData, VirtualFile file) throws Exception
+ {
+ metaData.setUrl(file.toURL());
+ }
+
+ /**
+ * Build managed object.
+ *
+ * @param unit the deployment unit
+ * @param managedObjects map of managed objects
+ * @throws DeploymentException for any deployment exception
+ */
+ public void build(DeploymentUnit unit, Set<String> outputs,
+ Map<String, ManagedObject> managedObjects) throws DeploymentException
+ {
+ if(isBuildManagedObject())
+ {
+ ManagedObject mcfdgMO = managedObjects.get(ManagedConnectionFactoryDeploymentGroup.class.getName());
+ if(mcfdgMO != null)
+ {
+ ManagedProperty deployments = mcfdgMO.getProperty("deployments");
+ MetaType propType = deployments.getMetaType();
+ if (propType.isCollection())
+ {
+ CollectionMetaType amt = (CollectionMetaType) propType;
+ MetaType etype = amt.getElementType();
+ if (etype == AbstractManagedObjectFactory.MANAGED_OBJECT_META_TYPE)
+ {
+ CollectionValue avalue = (CollectionValue) deployments.getValue();
+ if(avalue != null)
+ {
+ MetaValue[] elements = avalue.getElements();
+ for(int n = 0; n < avalue.getSize(); n ++)
+ {
+ GenericValue gv = (GenericValue) elements[n];
+ ManagedObject propMO = (ManagedObject) gv.getValue();
+ managedObjects.put(propMO.getName(), propMO);
+ }
+ }
+ }
+ }
+ }
+
+ }
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/deployers/RARDeployer.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/deployers/RARDeployer.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/deployers/RARDeployer.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,196 +1,196 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.deployers;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Iterator;
-
-import javax.management.ObjectName;
-
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.resource.metadata.DependsMetaData;
-import org.jboss.resource.metadata.RARDeploymentMetaData;
-import org.jboss.resource.metadata.JBossRAMetaData;
-import org.jboss.system.metadata.ServiceAttributeMetaData;
-import org.jboss.system.metadata.ServiceConstructorMetaData;
-import org.jboss.system.metadata.ServiceDependencyMetaData;
-import org.jboss.system.metadata.ServiceInjectionValueMetaData;
-import org.jboss.system.metadata.ServiceMetaData;
-
-/**
- * RARDeployer.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @author <a href="vicky.kak at jboss.com">Vicky Kak</a>
- * @version $Revision: 1.1 $
- */
-public class RARDeployer extends AbstractSimpleRealDeployer<RARDeploymentMetaData>
-{
- /** The work manager name */
- private String workManagerName;
-
- /** The xa terminator name */
- private String xaTerminatorName;
-
- /**
- * Create a new RARDeployer.
- */
- public RARDeployer()
- {
- super(RARDeploymentMetaData.class);
- setOutput(ServiceMetaData.class);
- }
-
- /**
- * Get the workManagerName.
- *
- * @return the workManagerName.
- */
- public String getWorkManagerName()
- {
- return workManagerName;
- }
-
- /**
- * Set the workManagerName.
- *
- * @param workManagerName the workManagerName.
- */
- public void setWorkManagerName(String workManagerName)
- {
- this.workManagerName = workManagerName;
- }
-
- /**
- * Get the XATerminatorName.
- *
- * @return the xaTerminatorName.
- */
- public String getXATerminatorName()
- {
- return xaTerminatorName;
- }
-
- /**
- * Set the XATerminatorName.
- *
- * @param xaTerminatorName the xaTerminatorName.
- */
- public void setXATerminatorName(String xaTerminatorName)
- {
- this.xaTerminatorName = xaTerminatorName;
- }
-
- protected String getObjectName(DeploymentUnit unit, RARDeploymentMetaData rdmd)
- {
- // TODO this is not needed
- String name = unit.getSimpleName();
- unit = unit.getParent();
- while (unit != null)
- {
- name = unit.getSimpleName() + "#" + name;
- unit = unit.getParent();
- }
- return "jboss.jca:service=RARDeployment,name='" + name + "'";
- }
-
- public void deploy(DeploymentUnit unit, RARDeploymentMetaData rdmd) throws DeploymentException
- {
- try
- {
- ServiceMetaData rarDeployment = new ServiceMetaData();
- String name = getObjectName(unit, rdmd);
- ObjectName objectName = new ObjectName(name);
- rarDeployment.setObjectName(objectName);
- rarDeployment.setCode(RARDeployment.class.getName());
- ServiceConstructorMetaData constructor = new ServiceConstructorMetaData();
- constructor.setSignature(new String[] { RARDeploymentMetaData.class.getName() });
- constructor.setParameters(new Object[] { rdmd });
- rarDeployment.setConstructor(constructor);
-
- List<ServiceAttributeMetaData> attributes = new ArrayList<ServiceAttributeMetaData>();
- ServiceAttributeMetaData attribute = null;
- if (workManagerName != null)
- {
- attribute = new ServiceAttributeMetaData();
- attribute.setName("WorkManager");
- attribute.setValue(new ServiceInjectionValueMetaData(workManagerName));
- attributes.add(attribute);
- }
- if (xaTerminatorName != null)
- {
- attribute = new ServiceAttributeMetaData();
- attribute.setName("XATerminator");
- attribute.setValue(new ServiceInjectionValueMetaData(xaTerminatorName, "XATerminator"));
- attributes.add(attribute);
- }
- if (attributes.isEmpty() == false)
- rarDeployment.setAttributes(attributes);
-
- // We will have to see how to define the set of dependencies
- JBossRAMetaData jmd = rdmd.getRaXmlMetaData();
- if(jmd.getDependsMetaData() != null)
- {
- //String dependsObjectName = jmd.getDependsMetaData().getDependsName();
- List<ServiceDependencyMetaData> dependencies = new ArrayList<ServiceDependencyMetaData>();
-
- List<DependsMetaData> depends = jmd.getDependsMetaData();
-
- if(!depends.isEmpty())
- {
- Iterator<DependsMetaData> iter = depends.iterator();
- while(iter.hasNext())
- {
- DependsMetaData dmd = iter.next();
- String dependsObjectName = dmd.getDependsName();
- ServiceDependencyMetaData dependency = new ServiceDependencyMetaData();
- dependency.setIDependOn(dependsObjectName);
- System.out.println(unit.getSimpleName()+ " have got the dependency on ---->>>>> "+dependsObjectName);
- dependencies.add(dependency);
- }
- }
- rarDeployment.setDependencies(dependencies);
- }
-
- unit.addAttachment(ServiceMetaData.class, rarDeployment);
- }
- catch (Exception e)
- {
- throw DeploymentException.rethrowAsDeploymentException("Error creating rar deployment " + unit.getName(), e);
- }
- }
-
- public void undeploy(DeploymentUnit unit, RARDeploymentMetaData rdmd)
- {
- /* To DO...
- // Remove the contents from the MetaData repository here
- DeploymentUnit parent = unit.getParent();
- String name = unit.getSimpleName();
- if( parent != null )
- name = parent.getSimpleName() + "#" + name;
- metaDataRepository.removeConnectorMetaData(name, rdmd.getConnectorMetaData());
- */
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.deployers;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Iterator;
+
+import javax.management.ObjectName;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.resource.metadata.DependsMetaData;
+import org.jboss.resource.metadata.RARDeploymentMetaData;
+import org.jboss.resource.metadata.JBossRAMetaData;
+import org.jboss.system.metadata.ServiceAttributeMetaData;
+import org.jboss.system.metadata.ServiceConstructorMetaData;
+import org.jboss.system.metadata.ServiceDependencyMetaData;
+import org.jboss.system.metadata.ServiceInjectionValueMetaData;
+import org.jboss.system.metadata.ServiceMetaData;
+
+/**
+ * RARDeployer.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @author <a href="vicky.kak at jboss.com">Vicky Kak</a>
+ * @version $Revision: 1.1 $
+ */
+public class RARDeployer extends AbstractSimpleRealDeployer<RARDeploymentMetaData>
+{
+ /** The work manager name */
+ private String workManagerName;
+
+ /** The xa terminator name */
+ private String xaTerminatorName;
+
+ /**
+ * Create a new RARDeployer.
+ */
+ public RARDeployer()
+ {
+ super(RARDeploymentMetaData.class);
+ setOutput(ServiceMetaData.class);
+ }
+
+ /**
+ * Get the workManagerName.
+ *
+ * @return the workManagerName.
+ */
+ public String getWorkManagerName()
+ {
+ return workManagerName;
+ }
+
+ /**
+ * Set the workManagerName.
+ *
+ * @param workManagerName the workManagerName.
+ */
+ public void setWorkManagerName(String workManagerName)
+ {
+ this.workManagerName = workManagerName;
+ }
+
+ /**
+ * Get the XATerminatorName.
+ *
+ * @return the xaTerminatorName.
+ */
+ public String getXATerminatorName()
+ {
+ return xaTerminatorName;
+ }
+
+ /**
+ * Set the XATerminatorName.
+ *
+ * @param xaTerminatorName the xaTerminatorName.
+ */
+ public void setXATerminatorName(String xaTerminatorName)
+ {
+ this.xaTerminatorName = xaTerminatorName;
+ }
+
+ protected String getObjectName(DeploymentUnit unit, RARDeploymentMetaData rdmd)
+ {
+ // TODO this is not needed
+ String name = unit.getSimpleName();
+ unit = unit.getParent();
+ while (unit != null)
+ {
+ name = unit.getSimpleName() + "#" + name;
+ unit = unit.getParent();
+ }
+ return "jboss.jca:service=RARDeployment,name='" + name + "'";
+ }
+
+ public void deploy(DeploymentUnit unit, RARDeploymentMetaData rdmd) throws DeploymentException
+ {
+ try
+ {
+ ServiceMetaData rarDeployment = new ServiceMetaData();
+ String name = getObjectName(unit, rdmd);
+ ObjectName objectName = new ObjectName(name);
+ rarDeployment.setObjectName(objectName);
+ rarDeployment.setCode(RARDeployment.class.getName());
+ ServiceConstructorMetaData constructor = new ServiceConstructorMetaData();
+ constructor.setSignature(new String[] { RARDeploymentMetaData.class.getName() });
+ constructor.setParameters(new Object[] { rdmd });
+ rarDeployment.setConstructor(constructor);
+
+ List<ServiceAttributeMetaData> attributes = new ArrayList<ServiceAttributeMetaData>();
+ ServiceAttributeMetaData attribute = null;
+ if (workManagerName != null)
+ {
+ attribute = new ServiceAttributeMetaData();
+ attribute.setName("WorkManager");
+ attribute.setValue(new ServiceInjectionValueMetaData(workManagerName));
+ attributes.add(attribute);
+ }
+ if (xaTerminatorName != null)
+ {
+ attribute = new ServiceAttributeMetaData();
+ attribute.setName("XATerminator");
+ attribute.setValue(new ServiceInjectionValueMetaData(xaTerminatorName, "XATerminator"));
+ attributes.add(attribute);
+ }
+ if (attributes.isEmpty() == false)
+ rarDeployment.setAttributes(attributes);
+
+ // We will have to see how to define the set of dependencies
+ JBossRAMetaData jmd = rdmd.getRaXmlMetaData();
+ if(jmd.getDependsMetaData() != null)
+ {
+ //String dependsObjectName = jmd.getDependsMetaData().getDependsName();
+ List<ServiceDependencyMetaData> dependencies = new ArrayList<ServiceDependencyMetaData>();
+
+ List<DependsMetaData> depends = jmd.getDependsMetaData();
+
+ if(!depends.isEmpty())
+ {
+ Iterator<DependsMetaData> iter = depends.iterator();
+ while(iter.hasNext())
+ {
+ DependsMetaData dmd = iter.next();
+ String dependsObjectName = dmd.getDependsName();
+ ServiceDependencyMetaData dependency = new ServiceDependencyMetaData();
+ dependency.setIDependOn(dependsObjectName);
+ System.out.println(unit.getSimpleName()+ " have got the dependency on ---->>>>> "+dependsObjectName);
+ dependencies.add(dependency);
+ }
+ }
+ rarDeployment.setDependencies(dependencies);
+ }
+
+ unit.addAttachment(ServiceMetaData.class, rarDeployment);
+ }
+ catch (Exception e)
+ {
+ throw DeploymentException.rethrowAsDeploymentException("Error creating rar deployment " + unit.getName(), e);
+ }
+ }
+
+ public void undeploy(DeploymentUnit unit, RARDeploymentMetaData rdmd)
+ {
+ /* To DO...
+ // Remove the contents from the MetaData repository here
+ DeploymentUnit parent = unit.getParent();
+ String name = unit.getSimpleName();
+ if( parent != null )
+ name = parent.getSimpleName() + "#" + name;
+ metaDataRepository.removeConnectorMetaData(name, rdmd.getConnectorMetaData());
+ */
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/deployers/RARDeployment.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/deployers/RARDeployment.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/deployers/RARDeployment.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,353 +1,353 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.deployers;
-
-import java.net.URL;
-import java.util.Collection;
-import java.util.Timer;
-
-import javax.management.Attribute;
-import javax.management.AttributeNotFoundException;
-import javax.management.InvalidAttributeValueException;
-import javax.management.MBeanAttributeInfo;
-import javax.management.MBeanException;
-import javax.management.MBeanOperationInfo;
-import javax.management.MBeanParameterInfo;
-import javax.management.ReflectionException;
-import javax.resource.spi.ActivationSpec;
-import javax.resource.spi.BootstrapContext;
-import javax.resource.spi.ResourceAdapter;
-import javax.resource.spi.UnavailableException;
-import javax.resource.spi.XATerminator;
-import javax.resource.spi.endpoint.MessageEndpointFactory;
-import javax.resource.spi.work.WorkManager;
-
-import org.jboss.bootstrap.spi.util.ServerConfigUtil;
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.resource.deployment.ActivationSpecFactory;
-import org.jboss.resource.deployment.ResourceAdapterFactory;
-import org.jboss.resource.metadata.ConfigPropertyMetaData;
-import org.jboss.resource.metadata.ConnectorMetaData;
-import org.jboss.resource.metadata.DescriptionGroupMetaData;
-import org.jboss.resource.metadata.JBossRAMetaData;
-import org.jboss.resource.metadata.MessageListenerMetaData;
-import org.jboss.resource.metadata.RARDeploymentMetaData;
-import org.jboss.system.ServiceDynamicMBeanSupport;
-
-/**
- * A resource adapter deployment
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 46109 $
- */
-public class RARDeployment extends ServiceDynamicMBeanSupport implements BootstrapContext
-{
- /** The RARDeploymentMetaData */
- protected RARDeploymentMetaData rdmd;
-
- /** The ConnectorMetaData */
- protected ConnectorMetaData cmd;
-
- /** The JBossRAMetaData */
- protected JBossRAMetaData ramd;
-
- /** The resource adapter */
- protected ResourceAdapter resourceAdapter;
-
- /** The work manager */
- private WorkManager workManager;
-
- /** The xa terminator */
- private XATerminator xaTerminator;
-
- /**
- * Create a new RAR deployment
- *
- * @param rdmd the metadata
- */
- public RARDeployment(RARDeploymentMetaData rdmd)
- {
- if (rdmd == null)
- throw new IllegalArgumentException("Null metadata");
- this.rdmd = rdmd;
- this.cmd = rdmd.getConnectorMetaData();
- this.ramd = rdmd.getRaXmlMetaData();
- }
-
- public Timer createTimer() throws UnavailableException
- {
- return new Timer(true);
- }
-
- /**
- * Get the workManager.
- *
- * @return the workManager.
- */
- public WorkManager getWorkManager()
- {
- return workManager;
- }
-
- /**
- * Set the workManager.
- *
- * @param workManager the workManager.
- */
- public void setWorkManager(WorkManager workManager)
- {
- this.workManager = workManager;
- }
-
- /**
- * Get the XATerminator.
- *
- * @return the xaTerminator.
- */
- public XATerminator getXATerminator()
- {
- return xaTerminator;
- }
-
- /**
- * Set the xXATerminator.
- *
- * @param xaTerminator the XATerminator.
- */
- public void setXATerminator(XATerminator xaTerminator)
- {
- this.xaTerminator = xaTerminator;
- }
-
- protected void startService() throws Exception
- {
- URL url = cmd.getURL();
- if (cmd.getLicense().getRequired())
- {
- log.info ("Required license terms exist, view " + ServerConfigUtil.shortUrlFromServerHome(url.toString()));
- log.debug("License terms full URL: " + url);
- }
- resourceAdapter = ResourceAdapterFactory.createResourceAdapter(rdmd);
- resourceAdapter.start(this);
- }
-
- protected void stopService() throws Exception
- {
- resourceAdapter.stop();
- }
-
- protected String getInternalDescription()
- {
- String description = null;
- DescriptionGroupMetaData dgmd = cmd.getDescription();
- if (dgmd != null)
- description = dgmd.getDescription();
- if (description == null)
- description = "RAR Deployment " + cmd.getURL();
- return description;
- }
-
- protected MBeanAttributeInfo[] getInternalAttributeInfo()
- {
- Collection<ConfigPropertyMetaData> properties = cmd.getProperties();
- MBeanAttributeInfo[] attrs = new MBeanAttributeInfo[13+properties.size()];
- attrs[0] = new MBeanAttributeInfo("MetaData", ConnectorMetaData.class.getName(), "The meta data", true, false, false);
- attrs[1] = new MBeanAttributeInfo("AuthenticationMechanism", String.class.getName(), "The authentication mechanism", true, false, false);
- attrs[2] = new MBeanAttributeInfo("EISType", String.class.getName(), "The EIS type", true, false, false);
- attrs[3] = new MBeanAttributeInfo("License", String.class.getName(), "The license", true, false, false);
- attrs[4] = new MBeanAttributeInfo("RAClass", String.class.getName(), "The resource adapter class", true, false, false);
- attrs[5] = new MBeanAttributeInfo("RAVersion", String.class.getName(), "The resource adapter version", true, false, false);
- attrs[6] = new MBeanAttributeInfo("TransactionSupport", String.class.getName(), "The transaction support", true, false, false);
- attrs[7] = new MBeanAttributeInfo("VendorName", String.class.getName(), "The vendor name", true, false, false);
- attrs[8] = new MBeanAttributeInfo("Version", String.class.getName(), "The spec version", true, false, false);
- attrs[9] = new MBeanAttributeInfo("ReauthenticationSupport", Boolean.TYPE.getName(), "Whether reauthentication support is supported", true, false, false);
- attrs[10] = new MBeanAttributeInfo("ResourceAdapter", ResourceAdapter.class.getName(), "The resource adapter instance", true, false, false);
- attrs[11] = new MBeanAttributeInfo("WorkManager", WorkManager.class.getName(), "The work manager", true, true, false);
- attrs[12] = new MBeanAttributeInfo("XATerminator", XATerminator.class.getName(), "The xa terminator", true, true, false);
- int n = 13;
- for (ConfigPropertyMetaData cpmd : properties)
- {
- attrs[n++] = new MBeanAttributeInfo(cpmd.getName(), cpmd.getType(), cpmd.getDescription().getDescription(), true, false, false);
- }
- return attrs;
- }
-
- protected Object getInternalAttribute(String attribute)
- throws AttributeNotFoundException, MBeanException, ReflectionException
- {
- if ("MetaData".equals(attribute))
- return cmd;
- else if ("AuthenticationMechanism".equals(attribute))
- return cmd.getAuthenticationMechanism().getAuthenticationMechansimType();
- else if ("EISType".equals(attribute))
- return cmd.getEISType();
- else if ("License".equals(attribute))
- return cmd.getLicense().getDescription().getDescription();
- else if ("RAClass".equals(attribute))
- return cmd.getRAClass();
- else if ("RAVersion".equals(attribute))
- return cmd.getRAVersion();
- else if ("TransactionSupport".equals(attribute))
- return cmd.getTransactionSupport();
- else if ("VendorName".equals(attribute))
- return cmd.getVendorName();
- else if ("Version".equals(attribute))
- return cmd.getVersion();
- else if ("ReauthenticationSupport".equals(attribute))
- return new Boolean(cmd.getReauthenticationSupport());
- else if ("ResourceAdapter".equals(attribute))
- return resourceAdapter;
- else if ("WorkManager".equals(attribute))
- return workManager;
- else if ("XATerminator".equals(attribute))
- return xaTerminator;
- Object property = cmd.getProperty(attribute);
- if (property != null)
- return property;
-
- return super.getInternalAttribute(attribute);
- }
-
- protected void setInternalAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
- {
- String name = attribute.getName();
- if ("WorkManager".equals(name))
- this.workManager = (WorkManager) attribute.getValue();
- else if ("XATerminator".equals(name))
- this.xaTerminator = (XATerminator) attribute.getValue();
- else
- super.setInternalAttribute(attribute);
- }
-
- protected MBeanOperationInfo[] getInternalOperationInfo()
- {
- MBeanOperationInfo[] ops = new MBeanOperationInfo[3];
-
- MBeanParameterInfo[] createActivationSpecParams = new MBeanParameterInfo[]
- {
- new MBeanParameterInfo("MessagingType", Class.class.getName(), "The type of the message listener"),
- new MBeanParameterInfo("ActivationConfig", Collection.class.getName(), "A collection of activation config properties")
- };
- ops[0] = new MBeanOperationInfo("createActivationSpec", "Create an activation spec",
- createActivationSpecParams, ActivationSpec.class.getName(), MBeanOperationInfo.ACTION);
-
- MBeanParameterInfo[] activationParams = new MBeanParameterInfo[]
- {
- new MBeanParameterInfo("MessageEndpointFactory", MessageEndpointFactory.class.getName(), "The message endpoint factory"),
- new MBeanParameterInfo("ActivationSpec", ActivationSpec.class.getName(), "The activation spec")
- };
- ops[1] = new MBeanOperationInfo("endpointActivation", "Active the endpoint",
- activationParams, Void.class.getName(), MBeanOperationInfo.ACTION);
- ops[2] = new MBeanOperationInfo("endpointDeactivation", "Deactive the endpoint",
- activationParams, Void.class.getName(), MBeanOperationInfo.ACTION);
-
- return ops;
- }
-
- @SuppressWarnings("unchecked")
- protected Object internalInvoke(String actionName, Object[] params, String[] signature) throws MBeanException,
- ReflectionException
- {
- if ("createActivationSpec".equals(actionName))
- {
- if (params.length != 2)
- throw new IllegalArgumentException("Wrong number of parameters for " + actionName);
- Class messagingType = (Class) params[0];
- Collection activationConfig = (Collection) params[1];
- return createActivationSpec(messagingType, activationConfig);
- }
- else if ("endpointActivation".equals(actionName))
- {
- if (params.length != 2)
- throw new IllegalArgumentException("Wrong number of parameters for " + actionName);
- MessageEndpointFactory messageEndpointFactory = (MessageEndpointFactory) params[0];
- ActivationSpec activationSpec = (ActivationSpec) params[1];
- endpointActivation(messageEndpointFactory, activationSpec);
- return null;
- }
- else if ("endpointDeactivation".equals(actionName))
- {
- if (params.length != 2)
- throw new IllegalArgumentException("Wrong number of parameters for " + actionName);
- MessageEndpointFactory messageEndpointFactory = (MessageEndpointFactory) params[0];
- ActivationSpec activationSpec = (ActivationSpec) params[1];
- endpointDeactivation(messageEndpointFactory, activationSpec);
- return null;
- }
- return super.internalInvoke(actionName, params, signature);
- }
-
- @SuppressWarnings("unchecked")
- protected ActivationSpec createActivationSpec(Class messagingType, Collection activationConfig) throws MBeanException
- {
- boolean trace = log.isTraceEnabled();
- if (trace)
- log.trace("CreateActivateSpec rar=" + getServiceName() + " messagingType=" + messagingType.getName() + " activationConfig=" + activationConfig);
-
- try
- {
- // Find the meta data
- MessageListenerMetaData mlmd = cmd.getMessageListener(messagingType.getName());
- if (mlmd == null)
- throw new DeploymentException("MessagingType '" + messagingType.getName() + "' not found in resource deployment " + getServiceName());
-
- return ActivationSpecFactory.createActivationSpec(getServiceName(), messagingType.getName(), activationConfig, mlmd);
- }
- catch (Exception e)
- {
- throw new MBeanException(e, "Error in create activation spec " + getServiceName());
- }
- }
-
- protected void endpointActivation(MessageEndpointFactory messageEndpointFactory, ActivationSpec activationSpec) throws MBeanException
- {
- boolean trace = log.isTraceEnabled();
- if (trace)
- log.trace("EndpointActivation rar=" + getServiceName() + " messagingEndpointFactory=" + messageEndpointFactory + " activationSpec=" + activationSpec);
-
- try
- {
- activationSpec.setResourceAdapter(resourceAdapter);
- resourceAdapter.endpointActivation(messageEndpointFactory, activationSpec);
- }
- catch (Exception e)
- {
- throw new MBeanException(e, "Error in endpoint activation " + getServiceName());
- }
- }
-
- protected void endpointDeactivation(MessageEndpointFactory messageEndpointFactory, ActivationSpec activationSpec) throws MBeanException
- {
- boolean trace = log.isTraceEnabled();
- if (trace)
- log.trace("EndpointDeactivation rar=" + getServiceName() + " messagingEndpointFactory=" + messageEndpointFactory + " activationSpec=" + activationSpec);
-
- try
- {
- resourceAdapter.endpointDeactivation(messageEndpointFactory, activationSpec);
- }
- catch (Exception e)
- {
- throw new MBeanException(e, "Error in endpoint deactivation " + getServiceName());
- }
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.deployers;
+
+import java.net.URL;
+import java.util.Collection;
+import java.util.Timer;
+
+import javax.management.Attribute;
+import javax.management.AttributeNotFoundException;
+import javax.management.InvalidAttributeValueException;
+import javax.management.MBeanAttributeInfo;
+import javax.management.MBeanException;
+import javax.management.MBeanOperationInfo;
+import javax.management.MBeanParameterInfo;
+import javax.management.ReflectionException;
+import javax.resource.spi.ActivationSpec;
+import javax.resource.spi.BootstrapContext;
+import javax.resource.spi.ResourceAdapter;
+import javax.resource.spi.UnavailableException;
+import javax.resource.spi.XATerminator;
+import javax.resource.spi.endpoint.MessageEndpointFactory;
+import javax.resource.spi.work.WorkManager;
+
+import org.jboss.bootstrap.spi.util.ServerConfigUtil;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.resource.deployment.ActivationSpecFactory;
+import org.jboss.resource.deployment.ResourceAdapterFactory;
+import org.jboss.resource.metadata.ConfigPropertyMetaData;
+import org.jboss.resource.metadata.ConnectorMetaData;
+import org.jboss.resource.metadata.DescriptionGroupMetaData;
+import org.jboss.resource.metadata.JBossRAMetaData;
+import org.jboss.resource.metadata.MessageListenerMetaData;
+import org.jboss.resource.metadata.RARDeploymentMetaData;
+import org.jboss.system.ServiceDynamicMBeanSupport;
+
+/**
+ * A resource adapter deployment
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 46109 $
+ */
+public class RARDeployment extends ServiceDynamicMBeanSupport implements BootstrapContext
+{
+ /** The RARDeploymentMetaData */
+ protected RARDeploymentMetaData rdmd;
+
+ /** The ConnectorMetaData */
+ protected ConnectorMetaData cmd;
+
+ /** The JBossRAMetaData */
+ protected JBossRAMetaData ramd;
+
+ /** The resource adapter */
+ protected ResourceAdapter resourceAdapter;
+
+ /** The work manager */
+ private WorkManager workManager;
+
+ /** The xa terminator */
+ private XATerminator xaTerminator;
+
+ /**
+ * Create a new RAR deployment
+ *
+ * @param rdmd the metadata
+ */
+ public RARDeployment(RARDeploymentMetaData rdmd)
+ {
+ if (rdmd == null)
+ throw new IllegalArgumentException("Null metadata");
+ this.rdmd = rdmd;
+ this.cmd = rdmd.getConnectorMetaData();
+ this.ramd = rdmd.getRaXmlMetaData();
+ }
+
+ public Timer createTimer() throws UnavailableException
+ {
+ return new Timer(true);
+ }
+
+ /**
+ * Get the workManager.
+ *
+ * @return the workManager.
+ */
+ public WorkManager getWorkManager()
+ {
+ return workManager;
+ }
+
+ /**
+ * Set the workManager.
+ *
+ * @param workManager the workManager.
+ */
+ public void setWorkManager(WorkManager workManager)
+ {
+ this.workManager = workManager;
+ }
+
+ /**
+ * Get the XATerminator.
+ *
+ * @return the xaTerminator.
+ */
+ public XATerminator getXATerminator()
+ {
+ return xaTerminator;
+ }
+
+ /**
+ * Set the xXATerminator.
+ *
+ * @param xaTerminator the XATerminator.
+ */
+ public void setXATerminator(XATerminator xaTerminator)
+ {
+ this.xaTerminator = xaTerminator;
+ }
+
+ protected void startService() throws Exception
+ {
+ URL url = cmd.getURL();
+ if (cmd.getLicense().getRequired())
+ {
+ log.info ("Required license terms exist, view " + ServerConfigUtil.shortUrlFromServerHome(url.toString()));
+ log.debug("License terms full URL: " + url);
+ }
+ resourceAdapter = ResourceAdapterFactory.createResourceAdapter(rdmd);
+ resourceAdapter.start(this);
+ }
+
+ protected void stopService() throws Exception
+ {
+ resourceAdapter.stop();
+ }
+
+ protected String getInternalDescription()
+ {
+ String description = null;
+ DescriptionGroupMetaData dgmd = cmd.getDescription();
+ if (dgmd != null)
+ description = dgmd.getDescription();
+ if (description == null)
+ description = "RAR Deployment " + cmd.getURL();
+ return description;
+ }
+
+ protected MBeanAttributeInfo[] getInternalAttributeInfo()
+ {
+ Collection<ConfigPropertyMetaData> properties = cmd.getProperties();
+ MBeanAttributeInfo[] attrs = new MBeanAttributeInfo[13+properties.size()];
+ attrs[0] = new MBeanAttributeInfo("MetaData", ConnectorMetaData.class.getName(), "The meta data", true, false, false);
+ attrs[1] = new MBeanAttributeInfo("AuthenticationMechanism", String.class.getName(), "The authentication mechanism", true, false, false);
+ attrs[2] = new MBeanAttributeInfo("EISType", String.class.getName(), "The EIS type", true, false, false);
+ attrs[3] = new MBeanAttributeInfo("License", String.class.getName(), "The license", true, false, false);
+ attrs[4] = new MBeanAttributeInfo("RAClass", String.class.getName(), "The resource adapter class", true, false, false);
+ attrs[5] = new MBeanAttributeInfo("RAVersion", String.class.getName(), "The resource adapter version", true, false, false);
+ attrs[6] = new MBeanAttributeInfo("TransactionSupport", String.class.getName(), "The transaction support", true, false, false);
+ attrs[7] = new MBeanAttributeInfo("VendorName", String.class.getName(), "The vendor name", true, false, false);
+ attrs[8] = new MBeanAttributeInfo("Version", String.class.getName(), "The spec version", true, false, false);
+ attrs[9] = new MBeanAttributeInfo("ReauthenticationSupport", Boolean.TYPE.getName(), "Whether reauthentication support is supported", true, false, false);
+ attrs[10] = new MBeanAttributeInfo("ResourceAdapter", ResourceAdapter.class.getName(), "The resource adapter instance", true, false, false);
+ attrs[11] = new MBeanAttributeInfo("WorkManager", WorkManager.class.getName(), "The work manager", true, true, false);
+ attrs[12] = new MBeanAttributeInfo("XATerminator", XATerminator.class.getName(), "The xa terminator", true, true, false);
+ int n = 13;
+ for (ConfigPropertyMetaData cpmd : properties)
+ {
+ attrs[n++] = new MBeanAttributeInfo(cpmd.getName(), cpmd.getType(), cpmd.getDescription().getDescription(), true, false, false);
+ }
+ return attrs;
+ }
+
+ protected Object getInternalAttribute(String attribute)
+ throws AttributeNotFoundException, MBeanException, ReflectionException
+ {
+ if ("MetaData".equals(attribute))
+ return cmd;
+ else if ("AuthenticationMechanism".equals(attribute))
+ return cmd.getAuthenticationMechanism().getAuthenticationMechansimType();
+ else if ("EISType".equals(attribute))
+ return cmd.getEISType();
+ else if ("License".equals(attribute))
+ return cmd.getLicense().getDescription().getDescription();
+ else if ("RAClass".equals(attribute))
+ return cmd.getRAClass();
+ else if ("RAVersion".equals(attribute))
+ return cmd.getRAVersion();
+ else if ("TransactionSupport".equals(attribute))
+ return cmd.getTransactionSupport();
+ else if ("VendorName".equals(attribute))
+ return cmd.getVendorName();
+ else if ("Version".equals(attribute))
+ return cmd.getVersion();
+ else if ("ReauthenticationSupport".equals(attribute))
+ return new Boolean(cmd.getReauthenticationSupport());
+ else if ("ResourceAdapter".equals(attribute))
+ return resourceAdapter;
+ else if ("WorkManager".equals(attribute))
+ return workManager;
+ else if ("XATerminator".equals(attribute))
+ return xaTerminator;
+ Object property = cmd.getProperty(attribute);
+ if (property != null)
+ return property;
+
+ return super.getInternalAttribute(attribute);
+ }
+
+ protected void setInternalAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException
+ {
+ String name = attribute.getName();
+ if ("WorkManager".equals(name))
+ this.workManager = (WorkManager) attribute.getValue();
+ else if ("XATerminator".equals(name))
+ this.xaTerminator = (XATerminator) attribute.getValue();
+ else
+ super.setInternalAttribute(attribute);
+ }
+
+ protected MBeanOperationInfo[] getInternalOperationInfo()
+ {
+ MBeanOperationInfo[] ops = new MBeanOperationInfo[3];
+
+ MBeanParameterInfo[] createActivationSpecParams = new MBeanParameterInfo[]
+ {
+ new MBeanParameterInfo("MessagingType", Class.class.getName(), "The type of the message listener"),
+ new MBeanParameterInfo("ActivationConfig", Collection.class.getName(), "A collection of activation config properties")
+ };
+ ops[0] = new MBeanOperationInfo("createActivationSpec", "Create an activation spec",
+ createActivationSpecParams, ActivationSpec.class.getName(), MBeanOperationInfo.ACTION);
+
+ MBeanParameterInfo[] activationParams = new MBeanParameterInfo[]
+ {
+ new MBeanParameterInfo("MessageEndpointFactory", MessageEndpointFactory.class.getName(), "The message endpoint factory"),
+ new MBeanParameterInfo("ActivationSpec", ActivationSpec.class.getName(), "The activation spec")
+ };
+ ops[1] = new MBeanOperationInfo("endpointActivation", "Active the endpoint",
+ activationParams, Void.class.getName(), MBeanOperationInfo.ACTION);
+ ops[2] = new MBeanOperationInfo("endpointDeactivation", "Deactive the endpoint",
+ activationParams, Void.class.getName(), MBeanOperationInfo.ACTION);
+
+ return ops;
+ }
+
+ @SuppressWarnings("unchecked")
+ protected Object internalInvoke(String actionName, Object[] params, String[] signature) throws MBeanException,
+ ReflectionException
+ {
+ if ("createActivationSpec".equals(actionName))
+ {
+ if (params.length != 2)
+ throw new IllegalArgumentException("Wrong number of parameters for " + actionName);
+ Class messagingType = (Class) params[0];
+ Collection activationConfig = (Collection) params[1];
+ return createActivationSpec(messagingType, activationConfig);
+ }
+ else if ("endpointActivation".equals(actionName))
+ {
+ if (params.length != 2)
+ throw new IllegalArgumentException("Wrong number of parameters for " + actionName);
+ MessageEndpointFactory messageEndpointFactory = (MessageEndpointFactory) params[0];
+ ActivationSpec activationSpec = (ActivationSpec) params[1];
+ endpointActivation(messageEndpointFactory, activationSpec);
+ return null;
+ }
+ else if ("endpointDeactivation".equals(actionName))
+ {
+ if (params.length != 2)
+ throw new IllegalArgumentException("Wrong number of parameters for " + actionName);
+ MessageEndpointFactory messageEndpointFactory = (MessageEndpointFactory) params[0];
+ ActivationSpec activationSpec = (ActivationSpec) params[1];
+ endpointDeactivation(messageEndpointFactory, activationSpec);
+ return null;
+ }
+ return super.internalInvoke(actionName, params, signature);
+ }
+
+ @SuppressWarnings("unchecked")
+ protected ActivationSpec createActivationSpec(Class messagingType, Collection activationConfig) throws MBeanException
+ {
+ boolean trace = log.isTraceEnabled();
+ if (trace)
+ log.trace("CreateActivateSpec rar=" + getServiceName() + " messagingType=" + messagingType.getName() + " activationConfig=" + activationConfig);
+
+ try
+ {
+ // Find the meta data
+ MessageListenerMetaData mlmd = cmd.getMessageListener(messagingType.getName());
+ if (mlmd == null)
+ throw new DeploymentException("MessagingType '" + messagingType.getName() + "' not found in resource deployment " + getServiceName());
+
+ return ActivationSpecFactory.createActivationSpec(getServiceName(), messagingType.getName(), activationConfig, mlmd);
+ }
+ catch (Exception e)
+ {
+ throw new MBeanException(e, "Error in create activation spec " + getServiceName());
+ }
+ }
+
+ protected void endpointActivation(MessageEndpointFactory messageEndpointFactory, ActivationSpec activationSpec) throws MBeanException
+ {
+ boolean trace = log.isTraceEnabled();
+ if (trace)
+ log.trace("EndpointActivation rar=" + getServiceName() + " messagingEndpointFactory=" + messageEndpointFactory + " activationSpec=" + activationSpec);
+
+ try
+ {
+ activationSpec.setResourceAdapter(resourceAdapter);
+ resourceAdapter.endpointActivation(messageEndpointFactory, activationSpec);
+ }
+ catch (Exception e)
+ {
+ throw new MBeanException(e, "Error in endpoint activation " + getServiceName());
+ }
+ }
+
+ protected void endpointDeactivation(MessageEndpointFactory messageEndpointFactory, ActivationSpec activationSpec) throws MBeanException
+ {
+ boolean trace = log.isTraceEnabled();
+ if (trace)
+ log.trace("EndpointDeactivation rar=" + getServiceName() + " messagingEndpointFactory=" + messageEndpointFactory + " activationSpec=" + activationSpec);
+
+ try
+ {
+ resourceAdapter.endpointDeactivation(messageEndpointFactory, activationSpec);
+ }
+ catch (Exception e)
+ {
+ throw new MBeanException(e, "Error in endpoint deactivation " + getServiceName());
+ }
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/deployers/RARParserDeployer.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/deployers/RARParserDeployer.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/deployers/RARParserDeployer.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,123 +1,123 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.deployers;
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.jboss.deployers.vfs.spi.deployer.MultipleObjectModelFactoryDeployer;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.resource.deployment.JBossRAObjectModelFactory;
-import org.jboss.resource.deployment.ResourceAdapterObjectModelFactory;
-import org.jboss.resource.metadata.ConnectorMetaData;
-import org.jboss.resource.metadata.JBossRAMetaData;
-import org.jboss.resource.metadata.RARDeploymentMetaData;
-import org.jboss.resource.metadata.repository.JCAMetaDataRepository;
-import org.jboss.virtual.VirtualFile;
-import org.jboss.xb.binding.ObjectModelFactory;
-
-/**
- * RARParserDeployer.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @author <a href="vicky.kak at jboss.com">Vicky Kak</a>
- * @author <a href="ales.justin at jboss.com">Ales Justin</a>
- * @version $Revision: 1.1 $
- */
-public class RARParserDeployer extends MultipleObjectModelFactoryDeployer<RARDeploymentMetaData>
-{
- /** The metadata repsoitory */
- private JCAMetaDataRepository metaDataRepository;
-
- /** JEE specific RAR DD name */
- private static String jeeSpecRarDD = "ra.xml";
-
- /** Jboss specific RAR DD name */
- private static String jbossRarDD = "jboss-ra.xml";
-
- private static Map<String, Class<?>> getCustomMappings()
- {
- Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
- mappings.put(jeeSpecRarDD, ConnectorMetaData.class);
- mappings.put(jbossRarDD, JBossRAMetaData.class);
- return mappings;
- }
-
- /**
- * Create a new RARParserDeployer.
- */
- public RARParserDeployer()
- {
- super(RARDeploymentMetaData.class, getCustomMappings());
- }
-
- protected <U> ObjectModelFactory getObjectModelFactory(Class<U> expectedType, String fileName, U root)
- {
- if (ConnectorMetaData.class.equals(expectedType))
- {
- return new ResourceAdapterObjectModelFactory();
- }
- else if (JBossRAMetaData.class.equals(expectedType))
- {
- return new JBossRAObjectModelFactory();
- }
- else
- {
- throw new IllegalArgumentException("Cannot match arguments: expectedClass=" + expectedType + ", fileName=" + fileName);
- }
- }
-
- protected RARDeploymentMetaData mergeMetaData(VFSDeploymentUnit unit, Map<Class<?>, List<Object>> metadata) throws Exception
- {
- RARDeploymentMetaData deployment = new RARDeploymentMetaData();
-
- ConnectorMetaData cmd = getInstance(metadata, ConnectorMetaData.class);
- if (cmd != null)
- deployment.setConnectorMetaData(cmd);
-
- JBossRAMetaData jrmd = getInstance(metadata, JBossRAMetaData.class);
- if (jrmd != null)
- deployment.setRaXmlMetaData(jrmd);
-
- VFSDeploymentUnit parent = unit.getParent();
- String name = unit.getSimpleName();
- if (parent != null)
- name = parent.getSimpleName() + "#" + name;
-
- VirtualFile file = unit.getMetaDataFile(jeeSpecRarDD);
- deployment.getConnectorMetaData().setURL(file.toURL());
- metaDataRepository.addConnectorMetaData(name, deployment.getConnectorMetaData());
-
- return deployment;
- }
-
- public JCAMetaDataRepository getMetaDataRepository()
- {
- return metaDataRepository;
- }
-
- public void setMetaDataRepository(JCAMetaDataRepository metaDataRepository)
- {
- this.metaDataRepository = metaDataRepository;
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.deployers;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.jboss.deployers.vfs.spi.deployer.MultipleObjectModelFactoryDeployer;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.resource.deployment.JBossRAObjectModelFactory;
+import org.jboss.resource.deployment.ResourceAdapterObjectModelFactory;
+import org.jboss.resource.metadata.ConnectorMetaData;
+import org.jboss.resource.metadata.JBossRAMetaData;
+import org.jboss.resource.metadata.RARDeploymentMetaData;
+import org.jboss.resource.metadata.repository.JCAMetaDataRepository;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.xb.binding.ObjectModelFactory;
+
+/**
+ * RARParserDeployer.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @author <a href="vicky.kak at jboss.com">Vicky Kak</a>
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ * @version $Revision: 1.1 $
+ */
+public class RARParserDeployer extends MultipleObjectModelFactoryDeployer<RARDeploymentMetaData>
+{
+ /** The metadata repsoitory */
+ private JCAMetaDataRepository metaDataRepository;
+
+ /** JEE specific RAR DD name */
+ private static String jeeSpecRarDD = "ra.xml";
+
+ /** Jboss specific RAR DD name */
+ private static String jbossRarDD = "jboss-ra.xml";
+
+ private static Map<String, Class<?>> getCustomMappings()
+ {
+ Map<String, Class<?>> mappings = new HashMap<String, Class<?>>();
+ mappings.put(jeeSpecRarDD, ConnectorMetaData.class);
+ mappings.put(jbossRarDD, JBossRAMetaData.class);
+ return mappings;
+ }
+
+ /**
+ * Create a new RARParserDeployer.
+ */
+ public RARParserDeployer()
+ {
+ super(RARDeploymentMetaData.class, getCustomMappings());
+ }
+
+ protected <U> ObjectModelFactory getObjectModelFactory(Class<U> expectedType, String fileName, U root)
+ {
+ if (ConnectorMetaData.class.equals(expectedType))
+ {
+ return new ResourceAdapterObjectModelFactory();
+ }
+ else if (JBossRAMetaData.class.equals(expectedType))
+ {
+ return new JBossRAObjectModelFactory();
+ }
+ else
+ {
+ throw new IllegalArgumentException("Cannot match arguments: expectedClass=" + expectedType + ", fileName=" + fileName);
+ }
+ }
+
+ protected RARDeploymentMetaData mergeMetaData(VFSDeploymentUnit unit, Map<Class<?>, List<Object>> metadata) throws Exception
+ {
+ RARDeploymentMetaData deployment = new RARDeploymentMetaData();
+
+ ConnectorMetaData cmd = getInstance(metadata, ConnectorMetaData.class);
+ if (cmd != null)
+ deployment.setConnectorMetaData(cmd);
+
+ JBossRAMetaData jrmd = getInstance(metadata, JBossRAMetaData.class);
+ if (jrmd != null)
+ deployment.setRaXmlMetaData(jrmd);
+
+ VFSDeploymentUnit parent = unit.getParent();
+ String name = unit.getSimpleName();
+ if (parent != null)
+ name = parent.getSimpleName() + "#" + name;
+
+ VirtualFile file = unit.getMetaDataFile(jeeSpecRarDD);
+ deployment.getConnectorMetaData().setURL(file.toURL());
+ metaDataRepository.addConnectorMetaData(name, deployment.getConnectorMetaData());
+
+ return deployment;
+ }
+
+ public JCAMetaDataRepository getMetaDataRepository()
+ {
+ return metaDataRepository;
+ }
+
+ public void setMetaDataRepository(JCAMetaDataRepository metaDataRepository)
+ {
+ this.metaDataRepository = metaDataRepository;
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/deployers/builder/AbstractBuilder.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/deployers/builder/AbstractBuilder.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/deployers/builder/AbstractBuilder.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,125 +1,125 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.deployers.builder;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.management.ObjectName;
-
-import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData;
-import org.jboss.system.metadata.ServiceAttributeMetaData;
-import org.jboss.system.metadata.ServiceConstructorMetaData;
-import org.jboss.system.metadata.ServiceDependencyMetaData;
-import org.jboss.system.metadata.ServiceDependencyValueMetaData;
-import org.jboss.system.metadata.ServiceMetaData;
-import org.jboss.system.metadata.ServiceTextValueMetaData;
-
-/**
- * A AbstractBuilder.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @version $Revision: 1.1 $
- */
-public abstract class AbstractBuilder
-{
- //TODO make this simple string in anticipation of move to MC
- public abstract ObjectName buildObjectName(ManagedConnectionFactoryDeploymentMetaData md);
- public abstract String getCode(ManagedConnectionFactoryDeploymentMetaData md);
-
- public ServiceMetaData buildService(ManagedConnectionFactoryDeploymentMetaData mcfmd)
- {
- ServiceMetaData md = new ServiceMetaData();
- ObjectName on = buildObjectName(mcfmd);
- md.setObjectName(on);
- String code = getCode(mcfmd);
- md.setCode(code);
- ServiceConstructorMetaData cmd = buildConstructor(mcfmd);
- md.setConstructor(cmd);
- return md;
-
- }
-
-
- public ServiceMetaData build(ManagedConnectionFactoryDeploymentMetaData mcfmd)
- {
- ServiceMetaData md = buildService(mcfmd);
- List<ServiceAttributeMetaData> attributes = buildAttributes(mcfmd);
- md.setAttributes(attributes);
- List<ServiceDependencyMetaData> dependencies = buildDependencies(mcfmd);
- md.setDependencies(dependencies);
-
- return md;
-
- }
-
- public abstract List<ServiceAttributeMetaData> buildAttributes(ManagedConnectionFactoryDeploymentMetaData md);
-
- public ServiceConstructorMetaData buildConstructor(ManagedConnectionFactoryDeploymentMetaData mcfmd)
- {
- ServiceConstructorMetaData constructor = new ServiceConstructorMetaData();
- constructor.setParameters(new Object[]{});
- constructor.setParams(new String[]{});
- return constructor;
-
- }
-
-
- public ServiceAttributeMetaData buildSimpleAttribute(String name, String value)
- {
- ServiceAttributeMetaData att = new ServiceAttributeMetaData();
- att.setName(name);
- ServiceTextValueMetaData dep = new ServiceTextValueMetaData(value);
- att.setValue(dep);
- return att;
-
- }
-
- public ServiceDependencyMetaData buildDependency(String dependencyName)
- {
- ServiceDependencyMetaData dependency = new ServiceDependencyMetaData();
- dependency.setIDependOn(dependencyName);
- return dependency;
-
- }
-
- public List<ServiceDependencyMetaData> buildDependencies(ManagedConnectionFactoryDeploymentMetaData md)
- {
- return new ArrayList<ServiceDependencyMetaData>();
- }
-
- public ServiceAttributeMetaData buildDependencyAttribute(String name, String dependency)
- {
- ServiceAttributeMetaData att = new ServiceAttributeMetaData();
- ServiceDependencyValueMetaData dep = new ServiceDependencyValueMetaData();
- dep.setDependency(dependency);
-
- if(name != null)
- att.setName(name);
-
- att.setValue(dep);
- return att;
-
- }
-
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.deployers.builder;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.management.ObjectName;
+
+import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData;
+import org.jboss.system.metadata.ServiceAttributeMetaData;
+import org.jboss.system.metadata.ServiceConstructorMetaData;
+import org.jboss.system.metadata.ServiceDependencyMetaData;
+import org.jboss.system.metadata.ServiceDependencyValueMetaData;
+import org.jboss.system.metadata.ServiceMetaData;
+import org.jboss.system.metadata.ServiceTextValueMetaData;
+
+/**
+ * A AbstractBuilder.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class AbstractBuilder
+{
+ //TODO make this simple string in anticipation of move to MC
+ public abstract ObjectName buildObjectName(ManagedConnectionFactoryDeploymentMetaData md);
+ public abstract String getCode(ManagedConnectionFactoryDeploymentMetaData md);
+
+ public ServiceMetaData buildService(ManagedConnectionFactoryDeploymentMetaData mcfmd)
+ {
+ ServiceMetaData md = new ServiceMetaData();
+ ObjectName on = buildObjectName(mcfmd);
+ md.setObjectName(on);
+ String code = getCode(mcfmd);
+ md.setCode(code);
+ ServiceConstructorMetaData cmd = buildConstructor(mcfmd);
+ md.setConstructor(cmd);
+ return md;
+
+ }
+
+
+ public ServiceMetaData build(ManagedConnectionFactoryDeploymentMetaData mcfmd)
+ {
+ ServiceMetaData md = buildService(mcfmd);
+ List<ServiceAttributeMetaData> attributes = buildAttributes(mcfmd);
+ md.setAttributes(attributes);
+ List<ServiceDependencyMetaData> dependencies = buildDependencies(mcfmd);
+ md.setDependencies(dependencies);
+
+ return md;
+
+ }
+
+ public abstract List<ServiceAttributeMetaData> buildAttributes(ManagedConnectionFactoryDeploymentMetaData md);
+
+ public ServiceConstructorMetaData buildConstructor(ManagedConnectionFactoryDeploymentMetaData mcfmd)
+ {
+ ServiceConstructorMetaData constructor = new ServiceConstructorMetaData();
+ constructor.setParameters(new Object[]{});
+ constructor.setParams(new String[]{});
+ return constructor;
+
+ }
+
+
+ public ServiceAttributeMetaData buildSimpleAttribute(String name, String value)
+ {
+ ServiceAttributeMetaData att = new ServiceAttributeMetaData();
+ att.setName(name);
+ ServiceTextValueMetaData dep = new ServiceTextValueMetaData(value);
+ att.setValue(dep);
+ return att;
+
+ }
+
+ public ServiceDependencyMetaData buildDependency(String dependencyName)
+ {
+ ServiceDependencyMetaData dependency = new ServiceDependencyMetaData();
+ dependency.setIDependOn(dependencyName);
+ return dependency;
+
+ }
+
+ public List<ServiceDependencyMetaData> buildDependencies(ManagedConnectionFactoryDeploymentMetaData md)
+ {
+ return new ArrayList<ServiceDependencyMetaData>();
+ }
+
+ public ServiceAttributeMetaData buildDependencyAttribute(String name, String dependency)
+ {
+ ServiceAttributeMetaData att = new ServiceAttributeMetaData();
+ ServiceDependencyValueMetaData dep = new ServiceDependencyValueMetaData();
+ dep.setDependency(dependency);
+
+ if(name != null)
+ att.setName(name);
+
+ att.setValue(dep);
+ return att;
+
+ }
+
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/deployers/builder/ConnectionFactoryBindingBuilder.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/deployers/builder/ConnectionFactoryBindingBuilder.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/deployers/builder/ConnectionFactoryBindingBuilder.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,137 +1,137 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.deployers.builder;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.management.ObjectName;
-
-import org.jboss.mx.util.ObjectNameFactory;
-import org.jboss.resource.metadata.mcf.DataSourceDeploymentMetaData;
-import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData;
-import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryTransactionSupportMetaData;
-import org.jboss.system.metadata.ServiceAttributeMetaData;
-import org.jboss.system.metadata.ServiceTextValueMetaData;
-
-/**
- * A ConnectionFactoryBindingBuilder.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @version $Revision: 1.1 $
- */
-public class ConnectionFactoryBindingBuilder extends AbstractBuilder
-{
- private static final String DATASOURCE = "org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService";
- private static final String CONNECTION_FACTORY = "org.jboss.resource.connectionmanager.ConnectionFactoryBindingService";
- private static final String DATASOURCE_JMX = "jboss.jca:service=DataSourceBinding,name=";
- private static final String CONNNECTION_FACTORY_JMX = "jboss.jca:service=ConnectionFactoryBinding,name=";
-
- @Override
- public List<ServiceAttributeMetaData> buildAttributes(ManagedConnectionFactoryDeploymentMetaData md)
- {
- List<ServiceAttributeMetaData> attributes = new ArrayList<ServiceAttributeMetaData>();
- ServiceAttributeMetaData attribute = new ServiceAttributeMetaData();
-
- attribute = buildSimpleAttribute("JndiName", md.getJndiName());
- attributes.add(attribute);
-
- attribute = buildSimpleAttribute("UseJavaContext", String.valueOf(md.isUseJavaContext()));
- attributes.add(attribute);
-
- if(!md.isUseJavaContext() && md instanceof DataSourceDeploymentMetaData)
- {
- attribute = buildDependencyAttribute("JMXInvokerName", md.getJmxInvokerName());
- attributes.add(attribute);
- }
-
- attribute = buildDependencyAttribute("ConnectionManager", buildCMName(md));
- attributes.add(attribute);
- return attributes;
- }
-
- @Override
- public ObjectName buildObjectName(ManagedConnectionFactoryDeploymentMetaData md)
- {
-
- ObjectName on = null;
-
- if(md instanceof DataSourceDeploymentMetaData)
- {
- on = ObjectNameFactory.create(DATASOURCE_JMX + md.getJndiName());
- }
- else
- {
- on = ObjectNameFactory.create(CONNNECTION_FACTORY_JMX + md.getJndiName());
-
- }
- return on;
- }
-
- @Override
- public String getCode(ManagedConnectionFactoryDeploymentMetaData md)
- {
-
- return (md instanceof DataSourceDeploymentMetaData) ? DATASOURCE : CONNECTION_FACTORY;
-
- }
-
- private String buildCMName(ManagedConnectionFactoryDeploymentMetaData md)
- {
- //THIS IS A HACK!
- String cmType = "jboss.jca:service=";
- String jndiName = md.getJndiName();
-
- if(md.getTransactionSupportMetaData().equals(ManagedConnectionFactoryTransactionSupportMetaData.NONE))
- {
- cmType += "NoTxCM,name=" + jndiName;
-
- }
- else if(md.getTransactionSupportMetaData().equals(ManagedConnectionFactoryTransactionSupportMetaData.LOCAL))
- {
- if(md instanceof DataSourceDeploymentMetaData)
- {
- cmType += "LocalTxCM,name=" + jndiName;
- }
- else
- {
- cmType += "TxCM,name=" + jndiName;
-
- }
-
- }else
- {
- if(md instanceof DataSourceDeploymentMetaData)
- {
- cmType += "XATxCM,name=" + jndiName;
-
- }
- else
- {
- cmType += "TxCM,name=" + jndiName;
-
- }
- }
-
- return cmType;
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.deployers.builder;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.management.ObjectName;
+
+import org.jboss.mx.util.ObjectNameFactory;
+import org.jboss.resource.metadata.mcf.DataSourceDeploymentMetaData;
+import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData;
+import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryTransactionSupportMetaData;
+import org.jboss.system.metadata.ServiceAttributeMetaData;
+import org.jboss.system.metadata.ServiceTextValueMetaData;
+
+/**
+ * A ConnectionFactoryBindingBuilder.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public class ConnectionFactoryBindingBuilder extends AbstractBuilder
+{
+ private static final String DATASOURCE = "org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService";
+ private static final String CONNECTION_FACTORY = "org.jboss.resource.connectionmanager.ConnectionFactoryBindingService";
+ private static final String DATASOURCE_JMX = "jboss.jca:service=DataSourceBinding,name=";
+ private static final String CONNNECTION_FACTORY_JMX = "jboss.jca:service=ConnectionFactoryBinding,name=";
+
+ @Override
+ public List<ServiceAttributeMetaData> buildAttributes(ManagedConnectionFactoryDeploymentMetaData md)
+ {
+ List<ServiceAttributeMetaData> attributes = new ArrayList<ServiceAttributeMetaData>();
+ ServiceAttributeMetaData attribute = new ServiceAttributeMetaData();
+
+ attribute = buildSimpleAttribute("JndiName", md.getJndiName());
+ attributes.add(attribute);
+
+ attribute = buildSimpleAttribute("UseJavaContext", String.valueOf(md.isUseJavaContext()));
+ attributes.add(attribute);
+
+ if(!md.isUseJavaContext() && md instanceof DataSourceDeploymentMetaData)
+ {
+ attribute = buildDependencyAttribute("JMXInvokerName", md.getJmxInvokerName());
+ attributes.add(attribute);
+ }
+
+ attribute = buildDependencyAttribute("ConnectionManager", buildCMName(md));
+ attributes.add(attribute);
+ return attributes;
+ }
+
+ @Override
+ public ObjectName buildObjectName(ManagedConnectionFactoryDeploymentMetaData md)
+ {
+
+ ObjectName on = null;
+
+ if(md instanceof DataSourceDeploymentMetaData)
+ {
+ on = ObjectNameFactory.create(DATASOURCE_JMX + md.getJndiName());
+ }
+ else
+ {
+ on = ObjectNameFactory.create(CONNNECTION_FACTORY_JMX + md.getJndiName());
+
+ }
+ return on;
+ }
+
+ @Override
+ public String getCode(ManagedConnectionFactoryDeploymentMetaData md)
+ {
+
+ return (md instanceof DataSourceDeploymentMetaData) ? DATASOURCE : CONNECTION_FACTORY;
+
+ }
+
+ private String buildCMName(ManagedConnectionFactoryDeploymentMetaData md)
+ {
+ //THIS IS A HACK!
+ String cmType = "jboss.jca:service=";
+ String jndiName = md.getJndiName();
+
+ if(md.getTransactionSupportMetaData().equals(ManagedConnectionFactoryTransactionSupportMetaData.NONE))
+ {
+ cmType += "NoTxCM,name=" + jndiName;
+
+ }
+ else if(md.getTransactionSupportMetaData().equals(ManagedConnectionFactoryTransactionSupportMetaData.LOCAL))
+ {
+ if(md instanceof DataSourceDeploymentMetaData)
+ {
+ cmType += "LocalTxCM,name=" + jndiName;
+ }
+ else
+ {
+ cmType += "TxCM,name=" + jndiName;
+
+ }
+
+ }else
+ {
+ if(md instanceof DataSourceDeploymentMetaData)
+ {
+ cmType += "XATxCM,name=" + jndiName;
+
+ }
+ else
+ {
+ cmType += "TxCM,name=" + jndiName;
+
+ }
+ }
+
+ return cmType;
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/deployers/builder/ConnectionManagerBuilder.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/deployers/builder/ConnectionManagerBuilder.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/deployers/builder/ConnectionManagerBuilder.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,252 +1,252 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.deployers.builder;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.management.ObjectName;
-
-import org.jboss.mx.util.ObjectNameFactory;
-import org.jboss.resource.connectionmanager.NoTxConnectionManager;
-import org.jboss.resource.connectionmanager.TxConnectionManager;
-import org.jboss.resource.metadata.mcf.DataSourceDeploymentMetaData;
-import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData;
-import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryTransactionSupportMetaData;
-import org.jboss.system.metadata.ServiceAttributeMetaData;
-import org.jboss.system.metadata.ServiceDependencyMetaData;
-import org.jboss.system.metadata.ServiceInjectionValueMetaData;
-
-/**
- * A ConnectionManagerBuilder.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @version $Revision: 1.1 $
- */
-public class ConnectionManagerBuilder extends AbstractBuilder
-{
- private static final String CCM_JMX = "jboss.jca:service=CachedConnectionManager";
- private static final String JAAS_JMX = "jboss.security:service=JaasSecurityManager";
- private static final String TM_JMX = "jboss:service=TransactionManager";
- private static final String POOL_JMX = "jboss.jca:service=ManagedConnectionPool,name=";
-
- private static final String SUBJECT_FACTORY_NAME = "JBossSecuritySubjectFactory";
-
- private String ccmJMXName = CCM_JMX;
- private String jaasJMXName = JAAS_JMX;
- private String jaasJndiBeanName = "JBossSecurityJNDIContextEstablishment";
- private String subjectFactoryName = SUBJECT_FACTORY_NAME;
- private String tmJMXName = TM_JMX;
- private String poolJMXPrefix = POOL_JMX;
-
-
- public String getCcmJMXName()
- {
- return ccmJMXName;
- }
- public void setCcmJMXName(String ccmJMXName)
- {
- this.ccmJMXName = ccmJMXName;
- }
-
- public String getJaasJMXName()
- {
- return jaasJMXName;
- }
- public void setJaasJMXName(String jaasJMXName)
- {
- this.jaasJMXName = jaasJMXName;
- }
-
- public String getJaasJndiBeanName()
- {
- return jaasJndiBeanName;
- }
- public void setJaasJndiBeanName(String jaasJndiBeanName)
- {
- this.jaasJndiBeanName = jaasJndiBeanName;
- }
-
- /**
- * Get the Security Subject Factory Name
- * @return
- */
- public String getSubjectFactoryName()
- {
- return subjectFactoryName;
- }
-
- /**
- * Set the Security Subject Factory Name
- * @param subjectFactoryName
- */
- public void setSubjectFactoryName(String subjectFactoryName)
- {
- this.subjectFactoryName = subjectFactoryName;
- }
-
- public String getTmJMXName()
- {
- return tmJMXName;
- }
- public void setTmJMXName(String tmJMXName)
- {
- this.tmJMXName = tmJMXName;
- }
-
- public String getPoolJMXPrefix()
- {
- return poolJMXPrefix;
- }
- public void setPoolJMXPrefix(String poolJMXPrefix)
- {
- this.poolJMXPrefix = poolJMXPrefix;
- }
-
- @Override
- public List<ServiceAttributeMetaData> buildAttributes(ManagedConnectionFactoryDeploymentMetaData md)
- {
- List<ServiceAttributeMetaData> attributes = new ArrayList<ServiceAttributeMetaData>();
- ServiceAttributeMetaData attribute = null;
-
- attribute = buildSimpleAttribute("JndiName", md.getJndiName());
- attributes.add(attribute);
-
- if (md.getSecurityMetaData() != null &&
- md.getSecurityMetaData().getDomain() != null &&
- !md.getSecurityMetaData().getDomain().equals(""))
- {
- attribute = buildSimpleAttribute("SecurityDomainJndiName", md.getSecurityMetaData().getDomain());
- attributes.add(attribute);
- }
-
- attribute = new ServiceAttributeMetaData();
- attribute.setName("SubjectFactory");
- ServiceInjectionValueMetaData injectionValue = new ServiceInjectionValueMetaData(subjectFactoryName);
- attribute.setValue(injectionValue);
- attributes.add(attribute);
-
-
- attribute = buildDependencyAttribute("CachedConnectionManager", ccmJMXName);
- attributes.add(attribute);
-
- attribute = buildDependencyAttribute("JaasSecurityManagerService", jaasJMXName);
- attributes.add(attribute);
-
- attribute = buildDependencyAttribute("ManagedConnectionPool", poolJMXPrefix + md.getJndiName());
- attributes.add(attribute);
-
- if(!md.getTransactionSupportMetaData().equals(ManagedConnectionFactoryTransactionSupportMetaData.NONE))
- {
- attribute = buildDependencyAttribute("TransactionManagerService", tmJMXName);
- attributes.add(attribute);
-
- attribute = buildSimpleAttribute("LocalTransactions", String.valueOf(md.getLocalTransactions()));
- attributes.add(attribute);
-
- //attribute = buildSimpleAttribute("TrackConnectionByTx", String.valueOf(md.getTrackConnectionByTransaction()));
- //attributes.add(attribute);
-
- attribute = buildSimpleAttribute("Interleaving", String.valueOf(md.isInterleaving()));
- attributes.add(attribute);
-
- if(md.getTransactionSupportMetaData().equals(ManagedConnectionFactoryTransactionSupportMetaData.XA))
- {
-// attribute = buildSimpleAttribute("XAResourceTransactionTimeout", String.valueOf(md.getX))
- }
- }
-
-
- return attributes;
- }
-
- @Override
- public List<ServiceDependencyMetaData> buildDependencies(ManagedConnectionFactoryDeploymentMetaData md)
- {
- List<ServiceDependencyMetaData> dependencies = super.buildDependencies(md);
- // Add the jaasJndiBeanName dependency
- ServiceDependencyMetaData serviceDependencyMetaData = new ServiceDependencyMetaData();
- serviceDependencyMetaData.setIDependOn(jaasJndiBeanName);
- dependencies.add(serviceDependencyMetaData);
- return dependencies;
- }
-
- @Override
- public ObjectName buildObjectName(ManagedConnectionFactoryDeploymentMetaData md)
- {
- String cmType = "jboss.jca:service=";
- String jndiName = md.getJndiName();
-
- if(md.getTransactionSupportMetaData().equals(ManagedConnectionFactoryTransactionSupportMetaData.NONE))
- {
- cmType += "NoTxCM,name=" + jndiName;
-
- }
- else if(md.getTransactionSupportMetaData().equals(ManagedConnectionFactoryTransactionSupportMetaData.LOCAL))
- {
- if(md instanceof DataSourceDeploymentMetaData)
- {
- cmType += "LocalTxCM,name=" + jndiName;
- }
- else
- {
- cmType += "TxCM,name=" + jndiName;
-
- }
-
- }else
- {
- if(md instanceof DataSourceDeploymentMetaData)
- {
- cmType += "XATxCM,name=" + jndiName;
-
- }
- else
- {
- cmType += "TxCM,name=" + jndiName;
-
- }
- }
-
- return ObjectNameFactory.create(cmType);
- }
-
- @Override
- public String getCode(ManagedConnectionFactoryDeploymentMetaData md)
- {
-
- String code = null;
-
- if(md.getTransactionSupportMetaData().equals(ManagedConnectionFactoryTransactionSupportMetaData.NONE))
- {
- code = NoTxConnectionManager.class.getName();
- }
- else
- {
- code = TxConnectionManager.class.getName();
- }
-
- return code;
- }
-
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.deployers.builder;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.management.ObjectName;
+
+import org.jboss.mx.util.ObjectNameFactory;
+import org.jboss.resource.connectionmanager.NoTxConnectionManager;
+import org.jboss.resource.connectionmanager.TxConnectionManager;
+import org.jboss.resource.metadata.mcf.DataSourceDeploymentMetaData;
+import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData;
+import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryTransactionSupportMetaData;
+import org.jboss.system.metadata.ServiceAttributeMetaData;
+import org.jboss.system.metadata.ServiceDependencyMetaData;
+import org.jboss.system.metadata.ServiceInjectionValueMetaData;
+
+/**
+ * A ConnectionManagerBuilder.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public class ConnectionManagerBuilder extends AbstractBuilder
+{
+ private static final String CCM_JMX = "jboss.jca:service=CachedConnectionManager";
+ private static final String JAAS_JMX = "jboss.security:service=JaasSecurityManager";
+ private static final String TM_JMX = "jboss:service=TransactionManager";
+ private static final String POOL_JMX = "jboss.jca:service=ManagedConnectionPool,name=";
+
+ private static final String SUBJECT_FACTORY_NAME = "JBossSecuritySubjectFactory";
+
+ private String ccmJMXName = CCM_JMX;
+ private String jaasJMXName = JAAS_JMX;
+ private String jaasJndiBeanName = "JBossSecurityJNDIContextEstablishment";
+ private String subjectFactoryName = SUBJECT_FACTORY_NAME;
+ private String tmJMXName = TM_JMX;
+ private String poolJMXPrefix = POOL_JMX;
+
+
+ public String getCcmJMXName()
+ {
+ return ccmJMXName;
+ }
+ public void setCcmJMXName(String ccmJMXName)
+ {
+ this.ccmJMXName = ccmJMXName;
+ }
+
+ public String getJaasJMXName()
+ {
+ return jaasJMXName;
+ }
+ public void setJaasJMXName(String jaasJMXName)
+ {
+ this.jaasJMXName = jaasJMXName;
+ }
+
+ public String getJaasJndiBeanName()
+ {
+ return jaasJndiBeanName;
+ }
+ public void setJaasJndiBeanName(String jaasJndiBeanName)
+ {
+ this.jaasJndiBeanName = jaasJndiBeanName;
+ }
+
+ /**
+ * Get the Security Subject Factory Name
+ * @return
+ */
+ public String getSubjectFactoryName()
+ {
+ return subjectFactoryName;
+ }
+
+ /**
+ * Set the Security Subject Factory Name
+ * @param subjectFactoryName
+ */
+ public void setSubjectFactoryName(String subjectFactoryName)
+ {
+ this.subjectFactoryName = subjectFactoryName;
+ }
+
+ public String getTmJMXName()
+ {
+ return tmJMXName;
+ }
+ public void setTmJMXName(String tmJMXName)
+ {
+ this.tmJMXName = tmJMXName;
+ }
+
+ public String getPoolJMXPrefix()
+ {
+ return poolJMXPrefix;
+ }
+ public void setPoolJMXPrefix(String poolJMXPrefix)
+ {
+ this.poolJMXPrefix = poolJMXPrefix;
+ }
+
+ @Override
+ public List<ServiceAttributeMetaData> buildAttributes(ManagedConnectionFactoryDeploymentMetaData md)
+ {
+ List<ServiceAttributeMetaData> attributes = new ArrayList<ServiceAttributeMetaData>();
+ ServiceAttributeMetaData attribute = null;
+
+ attribute = buildSimpleAttribute("JndiName", md.getJndiName());
+ attributes.add(attribute);
+
+ if (md.getSecurityMetaData() != null &&
+ md.getSecurityMetaData().getDomain() != null &&
+ !md.getSecurityMetaData().getDomain().equals(""))
+ {
+ attribute = buildSimpleAttribute("SecurityDomainJndiName", md.getSecurityMetaData().getDomain());
+ attributes.add(attribute);
+ }
+
+ attribute = new ServiceAttributeMetaData();
+ attribute.setName("SubjectFactory");
+ ServiceInjectionValueMetaData injectionValue = new ServiceInjectionValueMetaData(subjectFactoryName);
+ attribute.setValue(injectionValue);
+ attributes.add(attribute);
+
+
+ attribute = buildDependencyAttribute("CachedConnectionManager", ccmJMXName);
+ attributes.add(attribute);
+
+ attribute = buildDependencyAttribute("JaasSecurityManagerService", jaasJMXName);
+ attributes.add(attribute);
+
+ attribute = buildDependencyAttribute("ManagedConnectionPool", poolJMXPrefix + md.getJndiName());
+ attributes.add(attribute);
+
+ if(!md.getTransactionSupportMetaData().equals(ManagedConnectionFactoryTransactionSupportMetaData.NONE))
+ {
+ attribute = buildDependencyAttribute("TransactionManagerService", tmJMXName);
+ attributes.add(attribute);
+
+ attribute = buildSimpleAttribute("LocalTransactions", String.valueOf(md.getLocalTransactions()));
+ attributes.add(attribute);
+
+ //attribute = buildSimpleAttribute("TrackConnectionByTx", String.valueOf(md.getTrackConnectionByTransaction()));
+ //attributes.add(attribute);
+
+ attribute = buildSimpleAttribute("Interleaving", String.valueOf(md.isInterleaving()));
+ attributes.add(attribute);
+
+ if(md.getTransactionSupportMetaData().equals(ManagedConnectionFactoryTransactionSupportMetaData.XA))
+ {
+// attribute = buildSimpleAttribute("XAResourceTransactionTimeout", String.valueOf(md.getX))
+ }
+ }
+
+
+ return attributes;
+ }
+
+ @Override
+ public List<ServiceDependencyMetaData> buildDependencies(ManagedConnectionFactoryDeploymentMetaData md)
+ {
+ List<ServiceDependencyMetaData> dependencies = super.buildDependencies(md);
+ // Add the jaasJndiBeanName dependency
+ ServiceDependencyMetaData serviceDependencyMetaData = new ServiceDependencyMetaData();
+ serviceDependencyMetaData.setIDependOn(jaasJndiBeanName);
+ dependencies.add(serviceDependencyMetaData);
+ return dependencies;
+ }
+
+ @Override
+ public ObjectName buildObjectName(ManagedConnectionFactoryDeploymentMetaData md)
+ {
+ String cmType = "jboss.jca:service=";
+ String jndiName = md.getJndiName();
+
+ if(md.getTransactionSupportMetaData().equals(ManagedConnectionFactoryTransactionSupportMetaData.NONE))
+ {
+ cmType += "NoTxCM,name=" + jndiName;
+
+ }
+ else if(md.getTransactionSupportMetaData().equals(ManagedConnectionFactoryTransactionSupportMetaData.LOCAL))
+ {
+ if(md instanceof DataSourceDeploymentMetaData)
+ {
+ cmType += "LocalTxCM,name=" + jndiName;
+ }
+ else
+ {
+ cmType += "TxCM,name=" + jndiName;
+
+ }
+
+ }else
+ {
+ if(md instanceof DataSourceDeploymentMetaData)
+ {
+ cmType += "XATxCM,name=" + jndiName;
+
+ }
+ else
+ {
+ cmType += "TxCM,name=" + jndiName;
+
+ }
+ }
+
+ return ObjectNameFactory.create(cmType);
+ }
+
+ @Override
+ public String getCode(ManagedConnectionFactoryDeploymentMetaData md)
+ {
+
+ String code = null;
+
+ if(md.getTransactionSupportMetaData().equals(ManagedConnectionFactoryTransactionSupportMetaData.NONE))
+ {
+ code = NoTxConnectionManager.class.getName();
+ }
+ else
+ {
+ code = TxConnectionManager.class.getName();
+ }
+
+ return code;
+ }
+
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/deployers/builder/ManagedConnectionFactoryBuilder.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/deployers/builder/ManagedConnectionFactoryBuilder.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/deployers/builder/ManagedConnectionFactoryBuilder.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,111 +1,111 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.deployers.builder;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.management.ObjectName;
-
-import org.jboss.mx.util.ObjectNameFactory;
-import org.jboss.resource.metadata.ConnectorMetaData;
-import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData;
-import org.jboss.resource.metadata.repository.DefaultJCAMetaDataRepository;
-import org.jboss.system.metadata.ServiceAttributeMetaData;
-import org.jboss.system.metadata.ServiceConstructorMetaData;
-import org.jboss.system.metadata.ServiceDependencyMetaData;
-
-/**
- * A ManagedConnectionFactoryBuilder.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @version $Revision: 1.1 $
- */
-public class ManagedConnectionFactoryBuilder extends AbstractBuilder
-{
-
- private static final String MCF = "org.jboss.resource.connectionmanager.ManagedConnectionFactoryDeployment";
- private static final String RAR_JMX = "jboss.jca:service=RARDeployment,name='";
- private static final String MCF_JMX = "jboss.jca:service=ManagedConnectionFactory,name=";
-
- private DefaultJCAMetaDataRepository repository;
-
- public DefaultJCAMetaDataRepository getMetaDataRepository()
- {
- return this.repository;
- }
- public void setMetaDataRepository(DefaultJCAMetaDataRepository repository)
- {
- this.repository = repository;
- }
-
- @Override
- public ObjectName buildObjectName(ManagedConnectionFactoryDeploymentMetaData md)
- {
- return ObjectNameFactory.create(MCF_JMX + md.getJndiName());
- }
-
- @Override
- public List<ServiceAttributeMetaData> buildAttributes(ManagedConnectionFactoryDeploymentMetaData deployment)
- {
- List<ServiceAttributeMetaData> attributes = new ArrayList<ServiceAttributeMetaData>();
- ServiceAttributeMetaData attribute = buildDependencyAttribute("OldRarDeployment", RAR_JMX + deployment.getRarName() + "'");
- attributes.add(attribute);
- return attributes;
- }
-
- @Override
- public ServiceConstructorMetaData buildConstructor(ManagedConnectionFactoryDeploymentMetaData mcfmd)
- {
- ServiceConstructorMetaData constructor = new ServiceConstructorMetaData();
-
- ConnectorMetaData md = repository.getConnectorMetaData(mcfmd.getRarName());
- if( md == null )
- throw new IllegalStateException("No ConnectorMetaData found for mdf rarName: "+mcfmd.getRarName());
- constructor.setParameters(new Object[]{md, mcfmd});
- constructor.setSignature(new String[]{md.getClass().getName(), ManagedConnectionFactoryDeploymentMetaData.class.getName()});
- return constructor;
- }
-
- @Override
- public List<ServiceDependencyMetaData> buildDependencies(ManagedConnectionFactoryDeploymentMetaData md)
- {
- List<String> dependsNames = md.getDependsNames();
- List<ServiceDependencyMetaData> dependencies = new ArrayList<ServiceDependencyMetaData>();
-
- for (String string : dependsNames)
- {
- ServiceDependencyMetaData depends = buildDependency(string);
- dependencies.add(depends);
- }
-
- return dependencies;
-
- }
-
- @Override
- public String getCode(ManagedConnectionFactoryDeploymentMetaData md)
- {
- return MCF;
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.deployers.builder;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.management.ObjectName;
+
+import org.jboss.mx.util.ObjectNameFactory;
+import org.jboss.resource.metadata.ConnectorMetaData;
+import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData;
+import org.jboss.resource.metadata.repository.DefaultJCAMetaDataRepository;
+import org.jboss.system.metadata.ServiceAttributeMetaData;
+import org.jboss.system.metadata.ServiceConstructorMetaData;
+import org.jboss.system.metadata.ServiceDependencyMetaData;
+
+/**
+ * A ManagedConnectionFactoryBuilder.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public class ManagedConnectionFactoryBuilder extends AbstractBuilder
+{
+
+ private static final String MCF = "org.jboss.resource.connectionmanager.ManagedConnectionFactoryDeployment";
+ private static final String RAR_JMX = "jboss.jca:service=RARDeployment,name='";
+ private static final String MCF_JMX = "jboss.jca:service=ManagedConnectionFactory,name=";
+
+ private DefaultJCAMetaDataRepository repository;
+
+ public DefaultJCAMetaDataRepository getMetaDataRepository()
+ {
+ return this.repository;
+ }
+ public void setMetaDataRepository(DefaultJCAMetaDataRepository repository)
+ {
+ this.repository = repository;
+ }
+
+ @Override
+ public ObjectName buildObjectName(ManagedConnectionFactoryDeploymentMetaData md)
+ {
+ return ObjectNameFactory.create(MCF_JMX + md.getJndiName());
+ }
+
+ @Override
+ public List<ServiceAttributeMetaData> buildAttributes(ManagedConnectionFactoryDeploymentMetaData deployment)
+ {
+ List<ServiceAttributeMetaData> attributes = new ArrayList<ServiceAttributeMetaData>();
+ ServiceAttributeMetaData attribute = buildDependencyAttribute("OldRarDeployment", RAR_JMX + deployment.getRarName() + "'");
+ attributes.add(attribute);
+ return attributes;
+ }
+
+ @Override
+ public ServiceConstructorMetaData buildConstructor(ManagedConnectionFactoryDeploymentMetaData mcfmd)
+ {
+ ServiceConstructorMetaData constructor = new ServiceConstructorMetaData();
+
+ ConnectorMetaData md = repository.getConnectorMetaData(mcfmd.getRarName());
+ if( md == null )
+ throw new IllegalStateException("No ConnectorMetaData found for mdf rarName: "+mcfmd.getRarName());
+ constructor.setParameters(new Object[]{md, mcfmd});
+ constructor.setSignature(new String[]{md.getClass().getName(), ManagedConnectionFactoryDeploymentMetaData.class.getName()});
+ return constructor;
+ }
+
+ @Override
+ public List<ServiceDependencyMetaData> buildDependencies(ManagedConnectionFactoryDeploymentMetaData md)
+ {
+ List<String> dependsNames = md.getDependsNames();
+ List<ServiceDependencyMetaData> dependencies = new ArrayList<ServiceDependencyMetaData>();
+
+ for (String string : dependsNames)
+ {
+ ServiceDependencyMetaData depends = buildDependency(string);
+ dependencies.add(depends);
+ }
+
+ return dependencies;
+
+ }
+
+ @Override
+ public String getCode(ManagedConnectionFactoryDeploymentMetaData md)
+ {
+ return MCF;
+ }
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/deployers/builder/ManagedConnectionPoolBuilder.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/deployers/builder/ManagedConnectionPoolBuilder.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/deployers/builder/ManagedConnectionPoolBuilder.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,125 +1,125 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.deployers.builder;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.management.ObjectName;
-
-import org.jboss.mx.util.ObjectNameFactory;
-import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData;
-import org.jboss.resource.metadata.mcf.SecurityDeploymentType;
-import org.jboss.system.metadata.ServiceAttributeMetaData;
-
-/**
- * A ManagedConnectionPoolBuilder.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @version $Revision: 1.1 $
- */
-public class ManagedConnectionPoolBuilder extends AbstractBuilder
-{
- private static final String POOL = "org.jboss.resource.connectionmanager.JBossManagedConnectionPool";
- private static final Map<SecurityDeploymentType, String> securityTypeMap = new HashMap<SecurityDeploymentType, String>();
- private static final String MCF_JMX = "jboss.jca:service=ManagedConnectionFactory,name=";
-
- static
- {
- securityTypeMap.put(SecurityDeploymentType.NONE, "ByNothing");
- securityTypeMap.put(SecurityDeploymentType.APPLICATION, "ByApplication");
- securityTypeMap.put(SecurityDeploymentType.DOMAIN, "ByContainer");
- securityTypeMap.put(SecurityDeploymentType.DOMAIN_AND_APPLICATION, "ByContainerAndApplication");
- }
-
- @Override
- public ObjectName buildObjectName(ManagedConnectionFactoryDeploymentMetaData md)
- {
- return ObjectNameFactory.create("jboss.jca:service=ManagedConnectionPool,name=" + md.getJndiName());
- }
-
- @Override
- public String getCode(ManagedConnectionFactoryDeploymentMetaData md)
- {
- return POOL;
- }
-
- @Override
- public List<ServiceAttributeMetaData> buildAttributes(ManagedConnectionFactoryDeploymentMetaData md)
- {
- List<ServiceAttributeMetaData> poolAttributes = new ArrayList<ServiceAttributeMetaData>();
- ServiceAttributeMetaData poolAttribute = null;
-
- poolAttribute = buildSimpleAttribute("PoolJndiName", md.getJndiName());
- poolAttributes.add(poolAttribute);
-
- poolAttribute = buildSimpleAttribute("MinSize", String.valueOf(md.getMinSize()));
- poolAttributes.add(poolAttribute);
-
- poolAttribute = buildSimpleAttribute("MaxSize", String.valueOf(md.getMaxSize()));
- poolAttributes.add(poolAttribute);
-
- poolAttribute = buildSimpleAttribute("BlockingTimeoutMillis", String.valueOf(md.getBlockingTimeoutMilliSeconds()));
- poolAttributes.add(poolAttribute);
-
- poolAttribute = buildSimpleAttribute("IdleTimeoutMinutes", String.valueOf(md.getIdleTimeoutMinutes()));
- poolAttributes.add(poolAttribute);
-
- poolAttribute = buildSimpleAttribute("BackGroundValidationMillis", String.valueOf(md.getBackgroundValidationMillis()));
- poolAttributes.add(poolAttribute);
-
- poolAttribute = buildSimpleAttribute("PreFill", String.valueOf(md.getPrefill()));
- poolAttributes.add(poolAttribute);
-
- poolAttribute = buildSimpleAttribute("StrictMin", String.valueOf(md.getUseStrictMin()));
- poolAttributes.add(poolAttribute);
-
- poolAttribute = buildSimpleAttribute("StatisticsFormatter", md.getStatisticsFormatter());
- poolAttributes.add(poolAttribute);
-
- //Temp fix for JAXB marshalling issue
- if(md.getSecurityMetaData() == null)
- {
- poolAttribute = buildSimpleAttribute("Criteria", "ByNothing");
- }
- else
- {
- poolAttribute = buildSimpleAttribute("Criteria", String.valueOf(getCriteria(md.getSecurityMetaData().getSecurityDeploymentType())));
- }
-
- poolAttributes.add(poolAttribute);
-
- poolAttribute = buildDependencyAttribute("ManagedConnectionFactoryName", MCF_JMX + md.getJndiName());
- poolAttributes.add(poolAttribute);
-
- return poolAttributes;
-
- }
-
- private String getCriteria(SecurityDeploymentType type)
- {
- return securityTypeMap.get(type);
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.deployers.builder;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.management.ObjectName;
+
+import org.jboss.mx.util.ObjectNameFactory;
+import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData;
+import org.jboss.resource.metadata.mcf.SecurityDeploymentType;
+import org.jboss.system.metadata.ServiceAttributeMetaData;
+
+/**
+ * A ManagedConnectionPoolBuilder.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public class ManagedConnectionPoolBuilder extends AbstractBuilder
+{
+ private static final String POOL = "org.jboss.resource.connectionmanager.JBossManagedConnectionPool";
+ private static final Map<SecurityDeploymentType, String> securityTypeMap = new HashMap<SecurityDeploymentType, String>();
+ private static final String MCF_JMX = "jboss.jca:service=ManagedConnectionFactory,name=";
+
+ static
+ {
+ securityTypeMap.put(SecurityDeploymentType.NONE, "ByNothing");
+ securityTypeMap.put(SecurityDeploymentType.APPLICATION, "ByApplication");
+ securityTypeMap.put(SecurityDeploymentType.DOMAIN, "ByContainer");
+ securityTypeMap.put(SecurityDeploymentType.DOMAIN_AND_APPLICATION, "ByContainerAndApplication");
+ }
+
+ @Override
+ public ObjectName buildObjectName(ManagedConnectionFactoryDeploymentMetaData md)
+ {
+ return ObjectNameFactory.create("jboss.jca:service=ManagedConnectionPool,name=" + md.getJndiName());
+ }
+
+ @Override
+ public String getCode(ManagedConnectionFactoryDeploymentMetaData md)
+ {
+ return POOL;
+ }
+
+ @Override
+ public List<ServiceAttributeMetaData> buildAttributes(ManagedConnectionFactoryDeploymentMetaData md)
+ {
+ List<ServiceAttributeMetaData> poolAttributes = new ArrayList<ServiceAttributeMetaData>();
+ ServiceAttributeMetaData poolAttribute = null;
+
+ poolAttribute = buildSimpleAttribute("PoolJndiName", md.getJndiName());
+ poolAttributes.add(poolAttribute);
+
+ poolAttribute = buildSimpleAttribute("MinSize", String.valueOf(md.getMinSize()));
+ poolAttributes.add(poolAttribute);
+
+ poolAttribute = buildSimpleAttribute("MaxSize", String.valueOf(md.getMaxSize()));
+ poolAttributes.add(poolAttribute);
+
+ poolAttribute = buildSimpleAttribute("BlockingTimeoutMillis", String.valueOf(md.getBlockingTimeoutMilliSeconds()));
+ poolAttributes.add(poolAttribute);
+
+ poolAttribute = buildSimpleAttribute("IdleTimeoutMinutes", String.valueOf(md.getIdleTimeoutMinutes()));
+ poolAttributes.add(poolAttribute);
+
+ poolAttribute = buildSimpleAttribute("BackGroundValidationMillis", String.valueOf(md.getBackgroundValidationMillis()));
+ poolAttributes.add(poolAttribute);
+
+ poolAttribute = buildSimpleAttribute("PreFill", String.valueOf(md.getPrefill()));
+ poolAttributes.add(poolAttribute);
+
+ poolAttribute = buildSimpleAttribute("StrictMin", String.valueOf(md.getUseStrictMin()));
+ poolAttributes.add(poolAttribute);
+
+ poolAttribute = buildSimpleAttribute("StatisticsFormatter", md.getStatisticsFormatter());
+ poolAttributes.add(poolAttribute);
+
+ //Temp fix for JAXB marshalling issue
+ if(md.getSecurityMetaData() == null)
+ {
+ poolAttribute = buildSimpleAttribute("Criteria", "ByNothing");
+ }
+ else
+ {
+ poolAttribute = buildSimpleAttribute("Criteria", String.valueOf(getCriteria(md.getSecurityMetaData().getSecurityDeploymentType())));
+ }
+
+ poolAttributes.add(poolAttribute);
+
+ poolAttribute = buildDependencyAttribute("ManagedConnectionFactoryName", MCF_JMX + md.getJndiName());
+ poolAttributes.add(poolAttribute);
+
+ return poolAttributes;
+
+ }
+
+ private String getCriteria(SecurityDeploymentType type)
+ {
+ return securityTypeMap.get(type);
+ }
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/deployers/builder/MetaDataTypeMappingBuilder.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/deployers/builder/MetaDataTypeMappingBuilder.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/deployers/builder/MetaDataTypeMappingBuilder.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,111 +1,111 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.deployers.builder;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.management.ObjectName;
-
-import org.jboss.mx.util.ObjectNameFactory;
-import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData;
-import org.jboss.system.metadata.ServiceAttributeMetaData;
-import org.jboss.system.metadata.ServiceMetaData;
-
-/**
- * A MetaDataTypeMappingBuilder.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @version $Revision: 1.1 $
- */
-public class MetaDataTypeMappingBuilder extends AbstractBuilder
-{
- private static final String BINDING_JMX = "jboss.jdbc:service=metadata,datasource=";
- private static final String BINDING = "org.jboss.ejb.plugins.cmp.jdbc.metadata.DataSourceMetaData";
-
- @Override
- public List<ServiceAttributeMetaData> buildAttributes(ManagedConnectionFactoryDeploymentMetaData md)
- {
-
- List<ServiceAttributeMetaData> attributes = new ArrayList<ServiceAttributeMetaData>();
- ServiceAttributeMetaData attribute = null;
-
- attribute = buildDependencyAttribute("MetadataLibrary", "jboss.jdbc:service=metadata");
- attributes.add(attribute);
-
- String typeMapping = null;
-
- if(md.getDBMSMetaData() != null)
- {
- if(md.getDBMSMetaData().getTypeMapping() != null)
- {
- typeMapping = md.getDBMSMetaData().getTypeMapping();
- }
-
- }else if(md.getTypeMapping() != null)
- {
- typeMapping = md.getTypeMapping();
- }
-
-
- attribute = buildSimpleAttribute("TypeMapping", typeMapping);
- attributes.add(attribute);
-
- return attributes;
- }
-
- @Override
- public ServiceMetaData build(ManagedConnectionFactoryDeploymentMetaData mcfmd)
- {
- ServiceMetaData md = null;
-
- if(mcfmd.getTypeMapping() != null || mcfmd.getDBMSMetaData() != null)
- {
- md = super.build(mcfmd);
-
- }
-
- return md;
-
- }
-
- @Override
- public ObjectName buildObjectName(ManagedConnectionFactoryDeploymentMetaData md)
- {
- ObjectName on = null;
-
- if(md.getTypeMapping() != null || md.getDBMSMetaData() != null)
- {
- on = ObjectNameFactory.create(BINDING_JMX + md.getJndiName());
-
- }
-
- return on;
- }
-
- @Override
- public String getCode(ManagedConnectionFactoryDeploymentMetaData md)
- {
- return BINDING;
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.deployers.builder;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.management.ObjectName;
+
+import org.jboss.mx.util.ObjectNameFactory;
+import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData;
+import org.jboss.system.metadata.ServiceAttributeMetaData;
+import org.jboss.system.metadata.ServiceMetaData;
+
+/**
+ * A MetaDataTypeMappingBuilder.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public class MetaDataTypeMappingBuilder extends AbstractBuilder
+{
+ private static final String BINDING_JMX = "jboss.jdbc:service=metadata,datasource=";
+ private static final String BINDING = "org.jboss.ejb.plugins.cmp.jdbc.metadata.DataSourceMetaData";
+
+ @Override
+ public List<ServiceAttributeMetaData> buildAttributes(ManagedConnectionFactoryDeploymentMetaData md)
+ {
+
+ List<ServiceAttributeMetaData> attributes = new ArrayList<ServiceAttributeMetaData>();
+ ServiceAttributeMetaData attribute = null;
+
+ attribute = buildDependencyAttribute("MetadataLibrary", "jboss.jdbc:service=metadata");
+ attributes.add(attribute);
+
+ String typeMapping = null;
+
+ if(md.getDBMSMetaData() != null)
+ {
+ if(md.getDBMSMetaData().getTypeMapping() != null)
+ {
+ typeMapping = md.getDBMSMetaData().getTypeMapping();
+ }
+
+ }else if(md.getTypeMapping() != null)
+ {
+ typeMapping = md.getTypeMapping();
+ }
+
+
+ attribute = buildSimpleAttribute("TypeMapping", typeMapping);
+ attributes.add(attribute);
+
+ return attributes;
+ }
+
+ @Override
+ public ServiceMetaData build(ManagedConnectionFactoryDeploymentMetaData mcfmd)
+ {
+ ServiceMetaData md = null;
+
+ if(mcfmd.getTypeMapping() != null || mcfmd.getDBMSMetaData() != null)
+ {
+ md = super.build(mcfmd);
+
+ }
+
+ return md;
+
+ }
+
+ @Override
+ public ObjectName buildObjectName(ManagedConnectionFactoryDeploymentMetaData md)
+ {
+ ObjectName on = null;
+
+ if(md.getTypeMapping() != null || md.getDBMSMetaData() != null)
+ {
+ on = ObjectNameFactory.create(BINDING_JMX + md.getJndiName());
+
+ }
+
+ return on;
+ }
+
+ @Override
+ public String getCode(ManagedConnectionFactoryDeploymentMetaData md)
+ {
+ return BINDING;
+ }
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/deployers/management/XAConnectionFactoryProperty.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/deployers/management/XAConnectionFactoryProperty.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/deployers/management/XAConnectionFactoryProperty.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,150 +1,150 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.deployers.management;
-
-import java.lang.reflect.Type;
-import java.util.Map;
-import java.util.List;
-import java.util.ArrayList;
-import java.io.Serializable;
-import java.io.ObjectStreamException;
-import org.jboss.managed.plugins.WritethroughManagedPropertyImpl;
-import org.jboss.managed.plugins.ManagedPropertyImpl;
-import org.jboss.managed.plugins.factory.ManagedObjectFactoryBuilder;
-import org.jboss.managed.api.Fields;
-import org.jboss.managed.api.ManagedObject;
-import org.jboss.managed.api.factory.ManagedObjectFactory;
-import org.jboss.managed.spi.factory.InstanceClassFactory;
-import org.jboss.metatype.api.types.MapCompositeMetaType;
-import org.jboss.metatype.api.types.MetaType;
-import org.jboss.metatype.api.types.MetaTypeFactory;
-import org.jboss.metatype.api.types.SimpleMetaType;
-import org.jboss.metatype.api.values.MetaValueFactory;
-import org.jboss.metatype.api.values.MetaValue;
-import org.jboss.beans.info.spi.PropertyInfo;
-import org.jboss.beans.info.spi.BeanInfo;
-import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryPropertyMetaData;
-import org.jboss.resource.metadata.mcf.XAConnectionPropertyMetaData;
-
-/**
- * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
- * @version <tt>$Revision: $</tt>
- */
-public class XAConnectionFactoryProperty
- extends ManagedPropertyImpl
-{
- private static final long serialVersionUID = 1;
-
- private MetaValueFactory metaValueFactory;
- private ManagedObjectFactory moFactory;
- private MapCompositeMetaType type;
-
-
- public XAConnectionFactoryProperty(String s)
- {
- super(s);
- type = new MapCompositeMetaType(SimpleMetaType.STRING);
- setField(Fields.META_TYPE, null);
- }
-
- public XAConnectionFactoryProperty(Fields fields)
- {
- super(fields);
- type = new MapCompositeMetaType(SimpleMetaType.STRING);
- setField(Fields.META_TYPE, null);
- }
-
- public XAConnectionFactoryProperty(ManagedObject managedObject, Fields fields)
- {
- super(managedObject, fields);
- type = new MapCompositeMetaType(SimpleMetaType.STRING);
- setField(Fields.META_TYPE, null);
- }
-
-
- public MetaType getMetaType()
- {
- return type;
- }
-
- public void setField(String fieldName, Serializable value)
- {
- if(Fields.META_TYPE.equals(fieldName))
- value = type;
- super.setField(fieldName, value);
- }
-
- /**
- * Write the value back to the attachment if there is a PropertyInfo
- * in the Fields.PROPERTY_INFO field.
- */
- @Override
- @SuppressWarnings("unchecked")
- public void setValue(Serializable value)
- {
- super.setValue(value);
-
- PropertyInfo propertyInfo = getField(Fields.PROPERTY_INFO, PropertyInfo.class);
- if (propertyInfo != null)
- {
- Object attachment = getManagedObject().getAttachment();
- if (attachment != null)
- {
- if (value instanceof MetaValue)
- {
- MetaValue metaValue = (MetaValue) value;
- InstanceClassFactory icf = getMOFactory().getInstanceClassFactory(attachment.getClass());
- BeanInfo beanInfo = propertyInfo.getBeanInfo();
- icf.setValue(beanInfo, this, attachment, metaValue);
- }
- }
- }
- }
-
- private ManagedObjectFactory getMOFactory()
- {
- if(moFactory == null)
- moFactory = ManagedObjectFactoryBuilder.create();
- return moFactory;
- }
-
- private MetaValueFactory getMetaValueFactory()
- {
- if(metaValueFactory == null)
- metaValueFactory = MetaValueFactory.getInstance();
- return metaValueFactory;
- }
-
- /**
- * Expose only plain ManangedPropertyImpl.
- *
- * @return simpler ManagedPropertyImpl
- * @throws java.io.ObjectStreamException for any error
- */
- private Object writeReplace() throws ObjectStreamException
- {
- ManagedPropertyImpl managedProperty = new ManagedPropertyImpl(getManagedObject(), getFields());
- managedProperty.setTargetManagedObject(getTargetManagedObject());
- return managedProperty;
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.deployers.management;
+
+import java.lang.reflect.Type;
+import java.util.Map;
+import java.util.List;
+import java.util.ArrayList;
+import java.io.Serializable;
+import java.io.ObjectStreamException;
+import org.jboss.managed.plugins.WritethroughManagedPropertyImpl;
+import org.jboss.managed.plugins.ManagedPropertyImpl;
+import org.jboss.managed.plugins.factory.ManagedObjectFactoryBuilder;
+import org.jboss.managed.api.Fields;
+import org.jboss.managed.api.ManagedObject;
+import org.jboss.managed.api.factory.ManagedObjectFactory;
+import org.jboss.managed.spi.factory.InstanceClassFactory;
+import org.jboss.metatype.api.types.MapCompositeMetaType;
+import org.jboss.metatype.api.types.MetaType;
+import org.jboss.metatype.api.types.MetaTypeFactory;
+import org.jboss.metatype.api.types.SimpleMetaType;
+import org.jboss.metatype.api.values.MetaValueFactory;
+import org.jboss.metatype.api.values.MetaValue;
+import org.jboss.beans.info.spi.PropertyInfo;
+import org.jboss.beans.info.spi.BeanInfo;
+import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryPropertyMetaData;
+import org.jboss.resource.metadata.mcf.XAConnectionPropertyMetaData;
+
+/**
+ * @author <a href="mailto:alex at jboss.org">Alexey Loubyansky</a>
+ * @version <tt>$Revision: $</tt>
+ */
+public class XAConnectionFactoryProperty
+ extends ManagedPropertyImpl
+{
+ private static final long serialVersionUID = 1;
+
+ private MetaValueFactory metaValueFactory;
+ private ManagedObjectFactory moFactory;
+ private MapCompositeMetaType type;
+
+
+ public XAConnectionFactoryProperty(String s)
+ {
+ super(s);
+ type = new MapCompositeMetaType(SimpleMetaType.STRING);
+ setField(Fields.META_TYPE, null);
+ }
+
+ public XAConnectionFactoryProperty(Fields fields)
+ {
+ super(fields);
+ type = new MapCompositeMetaType(SimpleMetaType.STRING);
+ setField(Fields.META_TYPE, null);
+ }
+
+ public XAConnectionFactoryProperty(ManagedObject managedObject, Fields fields)
+ {
+ super(managedObject, fields);
+ type = new MapCompositeMetaType(SimpleMetaType.STRING);
+ setField(Fields.META_TYPE, null);
+ }
+
+
+ public MetaType getMetaType()
+ {
+ return type;
+ }
+
+ public void setField(String fieldName, Serializable value)
+ {
+ if(Fields.META_TYPE.equals(fieldName))
+ value = type;
+ super.setField(fieldName, value);
+ }
+
+ /**
+ * Write the value back to the attachment if there is a PropertyInfo
+ * in the Fields.PROPERTY_INFO field.
+ */
+ @Override
+ @SuppressWarnings("unchecked")
+ public void setValue(Serializable value)
+ {
+ super.setValue(value);
+
+ PropertyInfo propertyInfo = getField(Fields.PROPERTY_INFO, PropertyInfo.class);
+ if (propertyInfo != null)
+ {
+ Object attachment = getManagedObject().getAttachment();
+ if (attachment != null)
+ {
+ if (value instanceof MetaValue)
+ {
+ MetaValue metaValue = (MetaValue) value;
+ InstanceClassFactory icf = getMOFactory().getInstanceClassFactory(attachment.getClass());
+ BeanInfo beanInfo = propertyInfo.getBeanInfo();
+ icf.setValue(beanInfo, this, attachment, metaValue);
+ }
+ }
+ }
+ }
+
+ private ManagedObjectFactory getMOFactory()
+ {
+ if(moFactory == null)
+ moFactory = ManagedObjectFactoryBuilder.create();
+ return moFactory;
+ }
+
+ private MetaValueFactory getMetaValueFactory()
+ {
+ if(metaValueFactory == null)
+ metaValueFactory = MetaValueFactory.getInstance();
+ return metaValueFactory;
+ }
+
+ /**
+ * Expose only plain ManangedPropertyImpl.
+ *
+ * @return simpler ManagedPropertyImpl
+ * @throws java.io.ObjectStreamException for any error
+ */
+ private Object writeReplace() throws ObjectStreamException
+ {
+ ManagedPropertyImpl managedProperty = new ManagedPropertyImpl(getManagedObject(), getFields());
+ managedProperty.setTargetManagedObject(getTargetManagedObject());
+ return managedProperty;
+ }
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/DependsMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/DependsMetaData.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/DependsMetaData.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,66 +1,66 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.metadata;
-
-import java.io.Serializable;
-
-/**
- * Depends meta data
- *
- * @author <a href="mailto:vicky.kak at jboss.com">Vicky Kak</a>
- */
-public class DependsMetaData implements Serializable
-{
- private static final long serialVersionUID = -4864068414581654366L;
-
- /** The dependsName */
- private String dependsName;
-
- /**
- * Get the dependsName
- *
- * @return the dependsName
- */
- public String getDependsName()
- {
- return dependsName;
- }
-
- /**
- * Set the dependsName
- *
- * @param dependsName the dependsName
- */
- public void setDependsName(String dependsName)
- {
- this.dependsName = dependsName;
- }
-
- public String toString()
- {
- StringBuffer buffer = new StringBuffer();
- buffer.append("DependsMetaData").append('@');
- buffer.append(Integer.toHexString(System.identityHashCode(this)));
- buffer.append("[dependsName=").append(dependsName).append(']');
- return buffer.toString();
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.metadata;
+
+import java.io.Serializable;
+
+/**
+ * Depends meta data
+ *
+ * @author <a href="mailto:vicky.kak at jboss.com">Vicky Kak</a>
+ */
+public class DependsMetaData implements Serializable
+{
+ private static final long serialVersionUID = -4864068414581654366L;
+
+ /** The dependsName */
+ private String dependsName;
+
+ /**
+ * Get the dependsName
+ *
+ * @return the dependsName
+ */
+ public String getDependsName()
+ {
+ return dependsName;
+ }
+
+ /**
+ * Set the dependsName
+ *
+ * @param dependsName the dependsName
+ */
+ public void setDependsName(String dependsName)
+ {
+ this.dependsName = dependsName;
+ }
+
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("DependsMetaData").append('@');
+ buffer.append(Integer.toHexString(System.identityHashCode(this)));
+ buffer.append("[dependsName=").append(dependsName).append(']');
+ return buffer.toString();
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/ApplicationManagedSecurityMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/ApplicationManagedSecurityMetaData.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/ApplicationManagedSecurityMetaData.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,44 +1,44 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.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;
-
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.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;
+
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/ConnectionPoolMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/ConnectionPoolMetaData.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/ConnectionPoolMetaData.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,55 +1,55 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.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 getPrefill();
-
- public void setBackgroundValidationMillis(long interval);
- public long getBackgroundValidationMillis();
-
- public void setValidateOnMatch(boolean validateOnMatch);
- public boolean isValidateOnMatch();
-
- public void setNoTxSeparatePools(Boolean notxpool);
- public Boolean getNoTxSeparatePools();
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.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 getPrefill();
+
+ public void setBackgroundValidationMillis(long interval);
+ public long getBackgroundValidationMillis();
+
+ public void setValidateOnMatch(boolean validateOnMatch);
+ public boolean isValidateOnMatch();
+
+ public void setNoTxSeparatePools(Boolean notxpool);
+ public Boolean getNoTxSeparatePools();
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/DBMSMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/DBMSMetaData.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/DBMSMetaData.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,58 +1,58 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.metadata.mcf;
-
-import java.io.Serializable;
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-/**
- * A DBMSMetaData.
- *
- * @author <a href="weston.price at jboss.org">Weston M. Price</a>
- * @version $Revision: 1.1 $
- */
- at XmlAccessorType(XmlAccessType.FIELD)
- at XmlType(name="metadata")
-public class DBMSMetaData implements Serializable
-{
- private static final long serialVersionUID = -5511233258559770711L;
-
- @XmlElement(name="type-mapping")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String typeMapping;
-
- public String getTypeMapping()
- {
- return typeMapping;
- }
-
- public void setTypeMapping(String typeMapping)
- {
- this.typeMapping = typeMapping;
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.metadata.mcf;
+
+import java.io.Serializable;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+/**
+ * A DBMSMetaData.
+ *
+ * @author <a href="weston.price at jboss.org">Weston M. Price</a>
+ * @version $Revision: 1.1 $
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name="metadata")
+public class DBMSMetaData implements Serializable
+{
+ private static final long serialVersionUID = -5511233258559770711L;
+
+ @XmlElement(name="type-mapping")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ private String typeMapping;
+
+ public String getTypeMapping()
+ {
+ return typeMapping;
+ }
+
+ public void setTypeMapping(String typeMapping)
+ {
+ this.typeMapping = typeMapping;
+ }
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/DataSourceConnectionPropertyMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/DataSourceConnectionPropertyMetaData.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/DataSourceConnectionPropertyMetaData.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,72 +1,72 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.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;
-
-import org.jboss.managed.api.annotation.ManagementObject;
-import org.jboss.managed.api.annotation.ManagementProperty;
-
-
-/**
- * A DataSourceConnectionPropertyMetaData.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @version $Revision: 1.1 $
- */
- at XmlAccessorType(XmlAccessType.FIELD)
- at ManagementObject
-public class DataSourceConnectionPropertyMetaData
- implements java.io.Serializable
-{
- @XmlAttribute(name="name")
- protected String name;
-
- @XmlValue
- protected String value;
-
- public String getName()
- {
- return name;
- }
- public void setName(String name)
- {
- this.name = name;
- }
-
- public String getValue()
- {
- return value;
- }
- public void setValue(String value)
- {
- this.value = value;
- }
-
- public String toString()
- {
- return "[" + name + "=" + value + "]";
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.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;
+
+import org.jboss.managed.api.annotation.ManagementObject;
+import org.jboss.managed.api.annotation.ManagementProperty;
+
+
+/**
+ * A DataSourceConnectionPropertyMetaData.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at ManagementObject
+public class DataSourceConnectionPropertyMetaData
+ implements java.io.Serializable
+{
+ @XmlAttribute(name="name")
+ protected String name;
+
+ @XmlValue
+ protected String value;
+
+ public String getName()
+ {
+ return name;
+ }
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getValue()
+ {
+ return value;
+ }
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+
+ public String toString()
+ {
+ return "[" + name + "=" + value + "]";
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/DataSourceDeploymentMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/DataSourceDeploymentMetaData.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/DataSourceDeploymentMetaData.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,457 +1,457 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.metadata.mcf;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-import org.jboss.managed.api.annotation.ManagementProperty;
-import org.jboss.resource.deployers.management.ConnectionFactoryProperty;
-
-/**
- * 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")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String transactionIsolation;
-
- @XmlElement(name="user-name")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String userName;
-
- @XmlElement(name="password")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String passWord;
-
- @XmlElement(name="new-connection-sql")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String newConnectionSQL;
-
- @XmlElement(name="check-valid-connection-sql")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String checkValidConnectionSQL;
-
- @XmlElement(name="valid-connection-checker-class-name")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String validConnectionCheckerClassName;
-
- @XmlElement(name="exception-sorter-class-name")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String exceptionSorterClassName;
-
- @XmlElement(name="stale-connection-checker-class-name")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String staleConnectionCheckerClassName;
-
- @XmlElement(name="track-statements")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String trackStatements;
-
- @XmlElement(name="prepared-statement-cache-size")
- private int preparedStatementCacheSize = 0;
-
- @XmlElement(name="share-prepared-statements")
- private boolean sharePreparedStatements;
-
- @XmlElement(name="set-tx-query-timeout")
- private boolean useQueryTimeout;
-
- @XmlElement(name="query-timeout")
- private int queryTimeout;
-
- @XmlElement(name="use-try-lock")
- private long useTryLock;
-
- @XmlElement(name="url-delimiter")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String urlDelimiter;
-
- @XmlElement(name="url-selector-strategy-class-name")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String urlSelectorStrategyClassName;
-
- public DataSourceDeploymentMetaData()
- {
- setConnectionDefinition(CONNECTION_DEFINITION);
- setRarName(RAR_NAME);
-
- }
-
- @ManagementProperty(name="transaction-isolation",
- description="The DataSource transaction isolation level",
- includeInTemplate=true)
- public String getTransactionIsolation()
- {
- return transactionIsolation;
- }
-
- public void setTransactionIsolation(String transactionIsolation)
- {
- this.transactionIsolation = transactionIsolation;
- }
-
- @ManagementProperty(name="password", description="The DataSource password",
- includeInTemplate=true)
- public String getPassWord()
- {
- return passWord;
- }
-
- public void setPassWord(String passWord)
- {
- this.passWord = passWord;
- }
-
- @ManagementProperty(name="user-name", description="The DataSource username",
- includeInTemplate=true)
- public String getUserName()
- {
- return userName;
- }
-
- public void setUserName(String userName)
- {
- this.userName = userName;
- }
-
-
- @ManagementProperty(name="check-valid-connection-sql",
- description="The SQL statement to validate a connection",
- includeInTemplate=true)
- public String getCheckValidConnectionSQL()
- {
- return checkValidConnectionSQL;
- }
-
- public void setCheckValidConnectionSQL(String checkValidConnectionSQL)
- {
- this.checkValidConnectionSQL = checkValidConnectionSQL;
- }
-
- @ManagementProperty(name="exception-sorter-class-name",
- description="The exception sorter class name",
- includeInTemplate=true)
- public String getExceptionSorterClassName()
- {
- return exceptionSorterClassName;
- }
-
- public void setExceptionSorterClassName(String exceptionSorterClassName)
- {
- this.exceptionSorterClassName = exceptionSorterClassName;
- }
-
- @ManagementProperty(name="new-connection-sql", description="The new connection SQL",
- includeInTemplate=true)
- public String getNewConnectionSQL()
- {
- return newConnectionSQL;
- }
-
- public void setNewConnectionSQL(String newConnectionSQL)
- {
- this.newConnectionSQL = newConnectionSQL;
- }
-
- @ManagementProperty(name="valid-connection-checker-class-name",
- description="The DataSource connection checker class name",
- includeInTemplate=true)
- public String getValidConnectionCheckerClassName()
- {
- return validConnectionCheckerClassName;
- }
-
- public void setValidConnectionCheckerClassName(String validConnectionCheckerClassName)
- {
- this.validConnectionCheckerClassName = validConnectionCheckerClassName;
- }
-
- @ManagementProperty(name="stale-connection-checker-class-name",
- description="The DataSource stale connection checker class name",
- includeInTemplate=true)
- public String getStaleConnectionCheckerClassName()
- {
- return staleConnectionCheckerClassName;
- }
-
- public void setStaleConnectionCheckerClassName(String staleConnectionCheckerClassName)
- {
- this.staleConnectionCheckerClassName = staleConnectionCheckerClassName;
- }
-
- @ManagementProperty(name="url-delimiter", description="The DataSource url delimiter",
- includeInTemplate=true)
- public String getURLDelimiter()
- {
- return urlDelimiter;
- }
-
- public void setURLDelimiter(String urlDelimiter)
- {
- this.urlDelimiter = urlDelimiter;
- }
-
- @ManagementProperty(name="url-selector-strategy-class-name",
- description="The DataSource url selector strategy class name",
- includeInTemplate=true)
- public String getURLSelectorStrategyClassName()
- {
- return urlSelectorStrategyClassName;
- }
-
- public void setURLSelectorStrategyClassName(String urlSelectorStrategyClassName)
- {
- this.urlSelectorStrategyClassName = urlSelectorStrategyClassName;
- }
-
- @ManagementProperty(name="prepared-statement-cache-size",
- description="The DataSource prepared statement cache size",
- includeInTemplate=true)
- public int getPreparedStatementCacheSize()
- {
- return preparedStatementCacheSize;
- }
-
- public void setPreparedStatementCacheSize(int preparedStatementCacheSize)
- {
- this.preparedStatementCacheSize = preparedStatementCacheSize;
- }
-
- @ManagementProperty(name="query-timeout", description="The query timeout",
- includeInTemplate=true)
- public int getQueryTimeout()
- {
- return queryTimeout;
- }
-
- public void setQueryTimeout(int queryTimeout)
- {
- this.queryTimeout = queryTimeout;
- }
-
- @ManagementProperty(name="use-try-lock", description="The internal lock timeout",
- includeInTemplate=true)
- public long getUseTryLock()
- {
- return useTryLock;
- }
-
- public void setUseTryLock(long useTryLock)
- {
- this.useTryLock = useTryLock;
- }
-
- @ManagementProperty(name="share-prepared-statements",
- description="Should prepared statements be shared",
- includeInTemplate=true)
- public boolean isSharePreparedStatements()
- {
- return sharePreparedStatements;
- }
-
- public void setSharePreparedStatements(boolean sharePreparedStatements)
- {
- this.sharePreparedStatements = sharePreparedStatements;
- }
-
- @ManagementProperty(name="track-statements", description="The track statements method",
- includeInTemplate=true)
- public String getTrackStatements()
- {
- return trackStatements;
- }
-
- public void setTrackStatements(String trackStatements)
- {
- this.trackStatements = trackStatements;
- }
-
- @ManagementProperty(name="set-tx-query-timeout", description="Should query timeout be enabled",
- includeInTemplate=true)
- public boolean isUseQueryTimeout()
- {
- return useQueryTimeout;
- }
-
- public void setUseQueryTimeout(boolean useQueryTimeout)
- {
- this.useQueryTimeout = useQueryTimeout;
- }
-
- @Override
- @ManagementProperty(name="config-property",
- description="The connection factory property info", managed=true, propertyFactory= ConnectionFactoryProperty.class,
- includeInTemplate=true)
- public List<ManagedConnectionFactoryPropertyMetaData> getManagedConnectionFactoryProperties()
- {
- List<ManagedConnectionFactoryPropertyMetaData> properties = new ArrayList<ManagedConnectionFactoryPropertyMetaData>();
- ManagedConnectionFactoryPropertyMetaData property = null;
-
- if(getUserName() != null)
- {
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("UserName");
- property.setValue(getUserName());
- properties.add(property);
- }
-
- if(getPassWord() != null)
- {
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("Password");
- property.setValue(getPassWord());
- properties.add(property);
-
- }
-
- if(getTransactionIsolation() != null)
- {
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("TransactionIsolation");
- property.setValue(getTransactionIsolation());
- properties.add(property);
-
- }
-
- if(getNewConnectionSQL() != null)
- {
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("NewConnectionSQL");
- property.setValue(getNewConnectionSQL());
- properties.add(property);
-
- }
-
- if(getCheckValidConnectionSQL() != null)
- {
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("CheckValidConnectionSQL");
- property.setValue(getCheckValidConnectionSQL());
- properties.add(property);
-
- }
-
- if(getValidConnectionCheckerClassName() != null)
- {
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("ValidConnectionCheckerClassName");
- property.setValue(getValidConnectionCheckerClassName());
- properties.add(property);
-
- }
-
- if(getExceptionSorterClassName() != null)
- {
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("ExceptionSorterClassName");
- property.setValue(getExceptionSorterClassName());
- properties.add(property);
- }
-
- if(getStaleConnectionCheckerClassName() != null)
- {
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("StaleConnectionCheckerClassName");
- property.setValue(getStaleConnectionCheckerClassName());
- properties.add(property);
- }
-
- if(getURLSelectorStrategyClassName() != null)
- {
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("URLSelectorStrategyClassName");
- property.setValue(getURLSelectorStrategyClassName());
- properties.add(property);
- }
-
- if(getURLDelimiter() != null)
- {
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("URLDelimiter");
- property.setValue(getURLDelimiter());
- properties.add(property);
- }
-
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("PreparedStatementCacheSize");
- property.setType("int");
- property.setValue(String.valueOf(getPreparedStatementCacheSize()));
- properties.add(property);
-
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("SharePreparedStatements");
- property.setType("boolean");
- property.setValue(String.valueOf(isSharePreparedStatements()));
- properties.add(property);
-
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("QueryTimeout");
- property.setType("int");
- property.setValue(String.valueOf(getQueryTimeout()));
- properties.add(property);
-
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("UseTryLock");
- property.setType("long");
- property.setValue(String.valueOf(getUseTryLock()));
- properties.add(property);
-
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("TransactionQueryTimeout");
- property.setType("boolean");
- property.setValue(String.valueOf(isUseQueryTimeout()));
- properties.add(property);
-
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("ValidateOnMatch");
- property.setType("boolean");
- property.setValue(String.valueOf(isValidateOnMatch()));
- properties.add(property);
-
- if (getTrackStatements() != null)
- {
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("TrackStatements");
- property.setType("java.lang.String");
- property.setValue(String.valueOf(getTrackStatements()));
- properties.add(property);
- }
-
- return properties;
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.metadata.mcf;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.managed.api.annotation.ManagementProperty;
+import org.jboss.resource.deployers.management.ConnectionFactoryProperty;
+
+/**
+ * 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")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ private String transactionIsolation;
+
+ @XmlElement(name="user-name")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ private String userName;
+
+ @XmlElement(name="password")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ private String passWord;
+
+ @XmlElement(name="new-connection-sql")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ private String newConnectionSQL;
+
+ @XmlElement(name="check-valid-connection-sql")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ private String checkValidConnectionSQL;
+
+ @XmlElement(name="valid-connection-checker-class-name")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ private String validConnectionCheckerClassName;
+
+ @XmlElement(name="exception-sorter-class-name")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ private String exceptionSorterClassName;
+
+ @XmlElement(name="stale-connection-checker-class-name")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ private String staleConnectionCheckerClassName;
+
+ @XmlElement(name="track-statements")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ private String trackStatements;
+
+ @XmlElement(name="prepared-statement-cache-size")
+ private int preparedStatementCacheSize = 0;
+
+ @XmlElement(name="share-prepared-statements")
+ private boolean sharePreparedStatements;
+
+ @XmlElement(name="set-tx-query-timeout")
+ private boolean useQueryTimeout;
+
+ @XmlElement(name="query-timeout")
+ private int queryTimeout;
+
+ @XmlElement(name="use-try-lock")
+ private long useTryLock;
+
+ @XmlElement(name="url-delimiter")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ private String urlDelimiter;
+
+ @XmlElement(name="url-selector-strategy-class-name")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ private String urlSelectorStrategyClassName;
+
+ public DataSourceDeploymentMetaData()
+ {
+ setConnectionDefinition(CONNECTION_DEFINITION);
+ setRarName(RAR_NAME);
+
+ }
+
+ @ManagementProperty(name="transaction-isolation",
+ description="The DataSource transaction isolation level",
+ includeInTemplate=true)
+ public String getTransactionIsolation()
+ {
+ return transactionIsolation;
+ }
+
+ public void setTransactionIsolation(String transactionIsolation)
+ {
+ this.transactionIsolation = transactionIsolation;
+ }
+
+ @ManagementProperty(name="password", description="The DataSource password",
+ includeInTemplate=true)
+ public String getPassWord()
+ {
+ return passWord;
+ }
+
+ public void setPassWord(String passWord)
+ {
+ this.passWord = passWord;
+ }
+
+ @ManagementProperty(name="user-name", description="The DataSource username",
+ includeInTemplate=true)
+ public String getUserName()
+ {
+ return userName;
+ }
+
+ public void setUserName(String userName)
+ {
+ this.userName = userName;
+ }
+
+
+ @ManagementProperty(name="check-valid-connection-sql",
+ description="The SQL statement to validate a connection",
+ includeInTemplate=true)
+ public String getCheckValidConnectionSQL()
+ {
+ return checkValidConnectionSQL;
+ }
+
+ public void setCheckValidConnectionSQL(String checkValidConnectionSQL)
+ {
+ this.checkValidConnectionSQL = checkValidConnectionSQL;
+ }
+
+ @ManagementProperty(name="exception-sorter-class-name",
+ description="The exception sorter class name",
+ includeInTemplate=true)
+ public String getExceptionSorterClassName()
+ {
+ return exceptionSorterClassName;
+ }
+
+ public void setExceptionSorterClassName(String exceptionSorterClassName)
+ {
+ this.exceptionSorterClassName = exceptionSorterClassName;
+ }
+
+ @ManagementProperty(name="new-connection-sql", description="The new connection SQL",
+ includeInTemplate=true)
+ public String getNewConnectionSQL()
+ {
+ return newConnectionSQL;
+ }
+
+ public void setNewConnectionSQL(String newConnectionSQL)
+ {
+ this.newConnectionSQL = newConnectionSQL;
+ }
+
+ @ManagementProperty(name="valid-connection-checker-class-name",
+ description="The DataSource connection checker class name",
+ includeInTemplate=true)
+ public String getValidConnectionCheckerClassName()
+ {
+ return validConnectionCheckerClassName;
+ }
+
+ public void setValidConnectionCheckerClassName(String validConnectionCheckerClassName)
+ {
+ this.validConnectionCheckerClassName = validConnectionCheckerClassName;
+ }
+
+ @ManagementProperty(name="stale-connection-checker-class-name",
+ description="The DataSource stale connection checker class name",
+ includeInTemplate=true)
+ public String getStaleConnectionCheckerClassName()
+ {
+ return staleConnectionCheckerClassName;
+ }
+
+ public void setStaleConnectionCheckerClassName(String staleConnectionCheckerClassName)
+ {
+ this.staleConnectionCheckerClassName = staleConnectionCheckerClassName;
+ }
+
+ @ManagementProperty(name="url-delimiter", description="The DataSource url delimiter",
+ includeInTemplate=true)
+ public String getURLDelimiter()
+ {
+ return urlDelimiter;
+ }
+
+ public void setURLDelimiter(String urlDelimiter)
+ {
+ this.urlDelimiter = urlDelimiter;
+ }
+
+ @ManagementProperty(name="url-selector-strategy-class-name",
+ description="The DataSource url selector strategy class name",
+ includeInTemplate=true)
+ public String getURLSelectorStrategyClassName()
+ {
+ return urlSelectorStrategyClassName;
+ }
+
+ public void setURLSelectorStrategyClassName(String urlSelectorStrategyClassName)
+ {
+ this.urlSelectorStrategyClassName = urlSelectorStrategyClassName;
+ }
+
+ @ManagementProperty(name="prepared-statement-cache-size",
+ description="The DataSource prepared statement cache size",
+ includeInTemplate=true)
+ public int getPreparedStatementCacheSize()
+ {
+ return preparedStatementCacheSize;
+ }
+
+ public void setPreparedStatementCacheSize(int preparedStatementCacheSize)
+ {
+ this.preparedStatementCacheSize = preparedStatementCacheSize;
+ }
+
+ @ManagementProperty(name="query-timeout", description="The query timeout",
+ includeInTemplate=true)
+ public int getQueryTimeout()
+ {
+ return queryTimeout;
+ }
+
+ public void setQueryTimeout(int queryTimeout)
+ {
+ this.queryTimeout = queryTimeout;
+ }
+
+ @ManagementProperty(name="use-try-lock", description="The internal lock timeout",
+ includeInTemplate=true)
+ public long getUseTryLock()
+ {
+ return useTryLock;
+ }
+
+ public void setUseTryLock(long useTryLock)
+ {
+ this.useTryLock = useTryLock;
+ }
+
+ @ManagementProperty(name="share-prepared-statements",
+ description="Should prepared statements be shared",
+ includeInTemplate=true)
+ public boolean isSharePreparedStatements()
+ {
+ return sharePreparedStatements;
+ }
+
+ public void setSharePreparedStatements(boolean sharePreparedStatements)
+ {
+ this.sharePreparedStatements = sharePreparedStatements;
+ }
+
+ @ManagementProperty(name="track-statements", description="The track statements method",
+ includeInTemplate=true)
+ public String getTrackStatements()
+ {
+ return trackStatements;
+ }
+
+ public void setTrackStatements(String trackStatements)
+ {
+ this.trackStatements = trackStatements;
+ }
+
+ @ManagementProperty(name="set-tx-query-timeout", description="Should query timeout be enabled",
+ includeInTemplate=true)
+ public boolean isUseQueryTimeout()
+ {
+ return useQueryTimeout;
+ }
+
+ public void setUseQueryTimeout(boolean useQueryTimeout)
+ {
+ this.useQueryTimeout = useQueryTimeout;
+ }
+
+ @Override
+ @ManagementProperty(name="config-property",
+ description="The connection factory property info", managed=true, propertyFactory= ConnectionFactoryProperty.class,
+ includeInTemplate=true)
+ public List<ManagedConnectionFactoryPropertyMetaData> getManagedConnectionFactoryProperties()
+ {
+ List<ManagedConnectionFactoryPropertyMetaData> properties = new ArrayList<ManagedConnectionFactoryPropertyMetaData>();
+ ManagedConnectionFactoryPropertyMetaData property = null;
+
+ if(getUserName() != null)
+ {
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("UserName");
+ property.setValue(getUserName());
+ properties.add(property);
+ }
+
+ if(getPassWord() != null)
+ {
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("Password");
+ property.setValue(getPassWord());
+ properties.add(property);
+
+ }
+
+ if(getTransactionIsolation() != null)
+ {
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("TransactionIsolation");
+ property.setValue(getTransactionIsolation());
+ properties.add(property);
+
+ }
+
+ if(getNewConnectionSQL() != null)
+ {
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("NewConnectionSQL");
+ property.setValue(getNewConnectionSQL());
+ properties.add(property);
+
+ }
+
+ if(getCheckValidConnectionSQL() != null)
+ {
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("CheckValidConnectionSQL");
+ property.setValue(getCheckValidConnectionSQL());
+ properties.add(property);
+
+ }
+
+ if(getValidConnectionCheckerClassName() != null)
+ {
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("ValidConnectionCheckerClassName");
+ property.setValue(getValidConnectionCheckerClassName());
+ properties.add(property);
+
+ }
+
+ if(getExceptionSorterClassName() != null)
+ {
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("ExceptionSorterClassName");
+ property.setValue(getExceptionSorterClassName());
+ properties.add(property);
+ }
+
+ if(getStaleConnectionCheckerClassName() != null)
+ {
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("StaleConnectionCheckerClassName");
+ property.setValue(getStaleConnectionCheckerClassName());
+ properties.add(property);
+ }
+
+ if(getURLSelectorStrategyClassName() != null)
+ {
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("URLSelectorStrategyClassName");
+ property.setValue(getURLSelectorStrategyClassName());
+ properties.add(property);
+ }
+
+ if(getURLDelimiter() != null)
+ {
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("URLDelimiter");
+ property.setValue(getURLDelimiter());
+ properties.add(property);
+ }
+
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("PreparedStatementCacheSize");
+ property.setType("int");
+ property.setValue(String.valueOf(getPreparedStatementCacheSize()));
+ properties.add(property);
+
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("SharePreparedStatements");
+ property.setType("boolean");
+ property.setValue(String.valueOf(isSharePreparedStatements()));
+ properties.add(property);
+
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("QueryTimeout");
+ property.setType("int");
+ property.setValue(String.valueOf(getQueryTimeout()));
+ properties.add(property);
+
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("UseTryLock");
+ property.setType("long");
+ property.setValue(String.valueOf(getUseTryLock()));
+ properties.add(property);
+
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("TransactionQueryTimeout");
+ property.setType("boolean");
+ property.setValue(String.valueOf(isUseQueryTimeout()));
+ properties.add(property);
+
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("ValidateOnMatch");
+ property.setType("boolean");
+ property.setValue(String.valueOf(isValidateOnMatch()));
+ properties.add(property);
+
+ if (getTrackStatements() != null)
+ {
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("TrackStatements");
+ property.setType("java.lang.String");
+ property.setValue(String.valueOf(getTrackStatements()));
+ properties.add(property);
+ }
+
+ return properties;
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/JDBCProviderSupport.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/JDBCProviderSupport.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/JDBCProviderSupport.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,57 +1,57 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.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(String trackStatements);
- public String getTrackStatements();
-
- public void setPreparedStatementCacheSize(int cacheSize);
- public int getPreparedStatementCacheSize();
-
- public void setSharePreparedStatements(boolean sharePreparedStatements);
- public boolean isSharePreparedStatements();
-
- public void setUseQueryTimeout(boolean useQueryTimeout);
- public boolean isUseQueryTimeout();
-
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.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(String trackStatements);
+ public String getTrackStatements();
+
+ public void setPreparedStatementCacheSize(int cacheSize);
+ public int getPreparedStatementCacheSize();
+
+ public void setSharePreparedStatements(boolean sharePreparedStatements);
+ public boolean isSharePreparedStatements();
+
+ public void setUseQueryTimeout(boolean useQueryTimeout);
+ public boolean isUseQueryTimeout();
+
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/LoaderRepositoryAdapter.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/LoaderRepositoryAdapter.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/LoaderRepositoryAdapter.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,69 +1,69 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.metadata.mcf;
-
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-import javax.xml.parsers.DocumentBuilderFactory;
-
-import org.jboss.mx.loading.LoaderRepositoryFactory;
-import org.jboss.mx.loading.LoaderRepositoryFactory.LoaderRepositoryConfig;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-/**
- * A ServiceMetaDataAdapter.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
- * @version $Revision: 1.1 $
- */
-public class LoaderRepositoryAdapter extends XmlAdapter<Object, LoaderRepositoryConfig>
-{
-
- @Override
- public LoaderRepositoryConfig unmarshal(Object e) throws Exception
- {
- return LoaderRepositoryFactory.parseRepositoryConfig((Element) e);
- }
-
- @Override
- public Element marshal(LoaderRepositoryConfig config) throws Exception
- {
- if(config == null)
- return null;
-
- // TODO: move this to a separate 'marshaler'
- Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
- // <loader-repository>
- Element loaderRepository = document.createElement("loader-repository");
- loaderRepository.setAttribute("loaderRepositoryClass", config.repositoryClassName);
- loaderRepository.setTextContent(config.repositoryName.getCanonicalName());
- // <loader-repository-config>
- Element loaderRepositoryConfig = document.createElement("loader-repository-config");
- loaderRepositoryConfig.setAttribute("configParserClass", config.configParserClassName);
- loaderRepositoryConfig.setTextContent(config.repositoryConfig);
- // Append <loader-repository-config/>
- loaderRepository.appendChild(loaderRepositoryConfig);
- //
- return loaderRepository;
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.metadata.mcf;
+
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.jboss.mx.loading.LoaderRepositoryFactory;
+import org.jboss.mx.loading.LoaderRepositoryFactory.LoaderRepositoryConfig;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+/**
+ * A ServiceMetaDataAdapter.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision: 1.1 $
+ */
+public class LoaderRepositoryAdapter extends XmlAdapter<Object, LoaderRepositoryConfig>
+{
+
+ @Override
+ public LoaderRepositoryConfig unmarshal(Object e) throws Exception
+ {
+ return LoaderRepositoryFactory.parseRepositoryConfig((Element) e);
+ }
+
+ @Override
+ public Element marshal(LoaderRepositoryConfig config) throws Exception
+ {
+ if(config == null)
+ return null;
+
+ // TODO: move this to a separate 'marshaler'
+ Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
+ // <loader-repository>
+ Element loaderRepository = document.createElement("loader-repository");
+ loaderRepository.setAttribute("loaderRepositoryClass", config.repositoryClassName);
+ loaderRepository.setTextContent(config.repositoryName.getCanonicalName());
+ // <loader-repository-config>
+ Element loaderRepositoryConfig = document.createElement("loader-repository-config");
+ loaderRepositoryConfig.setAttribute("configParserClass", config.configParserClassName);
+ loaderRepositoryConfig.setTextContent(config.repositoryConfig);
+ // Append <loader-repository-config/>
+ loaderRepository.appendChild(loaderRepositoryConfig);
+ //
+ return loaderRepository;
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/LocalDataSourceDeploymentMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/LocalDataSourceDeploymentMetaData.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/LocalDataSourceDeploymentMetaData.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,60 +1,60 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.metadata.mcf;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlType;
-
-import org.jboss.managed.api.annotation.ManagementComponent;
-import org.jboss.managed.api.annotation.ManagementObject;
-import org.jboss.managed.api.annotation.ManagementProperty;
-import org.jboss.managed.api.annotation.ViewUse;
-
-
-/**
- * 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)
- at ManagementObject(componentType=@ManagementComponent(type="DataSource",subtype="LocalTx"))
-public class LocalDataSourceDeploymentMetaData extends NonXADataSourceDeploymentMetaData
-{
- /** The serialVersionUID */
- private static final long serialVersionUID = -1513179292986405426L;
-
- public LocalDataSourceDeploymentMetaData()
- {
- setLocalTransactions(true);
- setTransactionSupportMetaData(ManagedConnectionFactoryTransactionSupportMetaData.LOCAL);
- }
-
- @ManagementProperty(name="local-transaction", use={ViewUse.RUNTIME})
- @Override
- public Boolean getLocalTransactions()
- {
- return Boolean.TRUE;
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.metadata.mcf;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.managed.api.annotation.ManagementComponent;
+import org.jboss.managed.api.annotation.ManagementObject;
+import org.jboss.managed.api.annotation.ManagementProperty;
+import org.jboss.managed.api.annotation.ViewUse;
+
+
+/**
+ * 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)
+ at ManagementObject(componentType=@ManagementComponent(type="DataSource",subtype="LocalTx"))
+public class LocalDataSourceDeploymentMetaData extends NonXADataSourceDeploymentMetaData
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -1513179292986405426L;
+
+ public LocalDataSourceDeploymentMetaData()
+ {
+ setLocalTransactions(true);
+ setTransactionSupportMetaData(ManagedConnectionFactoryTransactionSupportMetaData.LOCAL);
+ }
+
+ @ManagementProperty(name="local-transaction", use={ViewUse.RUNTIME})
+ @Override
+ public Boolean getLocalTransactions()
+ {
+ return Boolean.TRUE;
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionEmptyContentAdapter.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionEmptyContentAdapter.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionEmptyContentAdapter.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,61 +1,61 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.metadata.mcf;
-
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.adapters.XmlAdapter;
-
-
-/**
- * A ManagedConnectionEmptyContentAdapter.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @author <a href="alex at jboss.com">Alexey Loubyansky</a>
- * @version $Revision: 1.1 $
- */
-public class ManagedConnectionEmptyContentAdapter extends XmlAdapter<ManagedConnectionEmptyContentAdapter.EmptyElement, Boolean>
-{
- @XmlType(factoryMethod="instance")
- public static class EmptyElement
- {
- public static EmptyElement INSTANCE = new EmptyElement();
-
- public static EmptyElement instance()
- {
- return INSTANCE;
- }
-
- private EmptyElement(){}
- }
-
- @Override
- public EmptyElement marshal(Boolean v) throws Exception
- {
- return Boolean.TRUE.equals(v) ? EmptyElement.INSTANCE : null;
- }
-
- @Override
- public Boolean unmarshal(EmptyElement v) throws Exception
- {
- return v == null ? Boolean.FALSE : Boolean.TRUE;
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.metadata.mcf;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+
+
+/**
+ * A ManagedConnectionEmptyContentAdapter.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @author <a href="alex at jboss.com">Alexey Loubyansky</a>
+ * @version $Revision: 1.1 $
+ */
+public class ManagedConnectionEmptyContentAdapter extends XmlAdapter<ManagedConnectionEmptyContentAdapter.EmptyElement, Boolean>
+{
+ @XmlType(factoryMethod="instance")
+ public static class EmptyElement
+ {
+ public static EmptyElement INSTANCE = new EmptyElement();
+
+ public static EmptyElement instance()
+ {
+ return INSTANCE;
+ }
+
+ private EmptyElement(){}
+ }
+
+ @Override
+ public EmptyElement marshal(Boolean v) throws Exception
+ {
+ return Boolean.TRUE.equals(v) ? EmptyElement.INSTANCE : null;
+ }
+
+ @Override
+ public Boolean unmarshal(EmptyElement v) throws Exception
+ {
+ return v == null ? Boolean.FALSE : Boolean.TRUE;
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentGroup.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentGroup.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentGroup.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,162 +1,162 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.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.XmlRootElement;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-import org.jboss.managed.api.annotation.ManagementObject;
-import org.jboss.managed.api.annotation.ManagementProperty;
-import org.jboss.mx.loading.LoaderRepositoryFactory.LoaderRepositoryConfig;
-import org.jboss.system.metadata.ServiceMetaData;
-
-/**
- * A ManagedConnectionFactoryDeploymentGroup.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @author Scott.Stark at jboss.org
- * @version $Revision: 1.1 $
- */
- at XmlAccessorType(XmlAccessType.NONE)
- at ManagementObject
- at XmlRootElement
-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>();
-
- /** The loader repository config */
- @XmlElement(name="loader-repository")
- @XmlJavaTypeAdapter(LoaderRepositoryAdapter.class)
- private LoaderRepositoryConfig loaderRepositoryConfig;
-
- public void addManagedConnectionFactoryDeployment(ManagedConnectionFactoryDeploymentMetaData deployment)
- {
- this.deployments.add(deployment);
- }
-
- @ManagementProperty(description="The connection factories", managed=true)
- public List<ManagedConnectionFactoryDeploymentMetaData> getDeployments()
- {
- return Collections.unmodifiableList(deployments);
- }
-
- /**
- * Get the fileUrl.
- *
- * @return the fileUrl.
- */
- @ManagementProperty(description="The ds.xml url", ignored=true)
- 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.
- */
- @ManagementProperty(description="The extra mbeans from the ds.xml", managed=true)
- public List<ServiceMetaData> getServices()
- {
- return services;
- }
-
- /**
- * Set the services.
- *
- * @param services The services to set.
- */
- public void setServices(List<ServiceMetaData> services)
- {
- this.services = services;
- }
-
- /**
- * Get the loaderRepositoryConfig.
- *
- * @return the loaderRepositoryConfig.
- */
- public LoaderRepositoryConfig getLoaderRepositoryConfig()
- {
- return loaderRepositoryConfig;
- }
-
- /**
- * Set the loaderRepositoryConfig.
- *
- * @param loaderRepositoryConfig the loaderRepositoryConfig.
- */
- public void setLoaderRepositoryConfig(LoaderRepositoryConfig loaderRepositoryConfig)
- {
- this.loaderRepositoryConfig = loaderRepositoryConfig;
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.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.XmlRootElement;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.managed.api.annotation.ManagementObject;
+import org.jboss.managed.api.annotation.ManagementProperty;
+import org.jboss.mx.loading.LoaderRepositoryFactory.LoaderRepositoryConfig;
+import org.jboss.system.metadata.ServiceMetaData;
+
+/**
+ * A ManagedConnectionFactoryDeploymentGroup.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @author Scott.Stark at jboss.org
+ * @version $Revision: 1.1 $
+ */
+ at XmlAccessorType(XmlAccessType.NONE)
+ at ManagementObject
+ at XmlRootElement
+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>();
+
+ /** The loader repository config */
+ @XmlElement(name="loader-repository")
+ @XmlJavaTypeAdapter(LoaderRepositoryAdapter.class)
+ private LoaderRepositoryConfig loaderRepositoryConfig;
+
+ public void addManagedConnectionFactoryDeployment(ManagedConnectionFactoryDeploymentMetaData deployment)
+ {
+ this.deployments.add(deployment);
+ }
+
+ @ManagementProperty(description="The connection factories", managed=true)
+ public List<ManagedConnectionFactoryDeploymentMetaData> getDeployments()
+ {
+ return Collections.unmodifiableList(deployments);
+ }
+
+ /**
+ * Get the fileUrl.
+ *
+ * @return the fileUrl.
+ */
+ @ManagementProperty(description="The ds.xml url", ignored=true)
+ 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.
+ */
+ @ManagementProperty(description="The extra mbeans from the ds.xml", managed=true)
+ public List<ServiceMetaData> getServices()
+ {
+ return services;
+ }
+
+ /**
+ * Set the services.
+ *
+ * @param services The services to set.
+ */
+ public void setServices(List<ServiceMetaData> services)
+ {
+ this.services = services;
+ }
+
+ /**
+ * Get the loaderRepositoryConfig.
+ *
+ * @return the loaderRepositoryConfig.
+ */
+ public LoaderRepositoryConfig getLoaderRepositoryConfig()
+ {
+ return loaderRepositoryConfig;
+ }
+
+ /**
+ * Set the loaderRepositoryConfig.
+ *
+ * @param loaderRepositoryConfig the loaderRepositoryConfig.
+ */
+ public void setLoaderRepositoryConfig(LoaderRepositoryConfig loaderRepositoryConfig)
+ {
+ this.loaderRepositoryConfig = loaderRepositoryConfig;
+ }
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentMetaData.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryDeploymentMetaData.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,621 +1,621 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.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 javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-import org.jboss.managed.api.annotation.ManagementObject;
-import org.jboss.managed.api.annotation.ManagementObjectID;
-import org.jboss.managed.api.annotation.ManagementObjectRef;
-import org.jboss.managed.api.annotation.ManagementProperties;
-import org.jboss.managed.api.annotation.ManagementProperty;
-import org.jboss.managed.api.annotation.ViewUse;
-import org.jboss.system.metadata.ServiceMetaData;
-import org.jboss.resource.deployers.management.ConnectionFactoryProperty;
-
-
-/**
- * A ManagedConnectionFactoryDeployment.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @version $Revision: 1.1 $
- */
- at XmlAccessorType(XmlAccessType.FIELD)
- at ManagementObject(properties=ManagementProperties.EXPLICIT)
-public class ManagedConnectionFactoryDeploymentMetaData
- implements Serializable, ConnectionPoolMetaData
-{
- /** The serialVersionUID */
- private static final long serialVersionUID = -4591557831734316580L;
-
- /** The jndiName */
- @XmlElement(name="jndi-name")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String jndiName;
-
- /** The rarName */
- @XmlElement(name="rar-name")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String rarName;
-
- /** The useJavaContext */
- @XmlElement(name="use-java-context")
- private boolean useJavaContext = true;
-
- /** The connectionDefinition */
- @XmlElement(name="connection-definition")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- protected String connectionDefinition;
-
- /** The jmxInvokerName */
- @XmlElement(name="jmx-invoker-name")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String jmxInvokerName = "jboss:service=invoker,type=jrmp";
-
- @XmlElement(name="min-pool-size")
- private int minSize = 0;
-
- @XmlElement(name="max-pool-size")
- private int maxPoolSize = 10;
-
- @XmlElement(name="blocking-timeout-millis")
- private long blockingTimeout = 30000;
-
- @XmlElement(name="idle-timeout-minutes")
- private int idleTimeout = 30;
-
- @XmlElement(name="prefill")
- private Boolean prefill = Boolean.FALSE;
-
- @XmlElement(name="background-validation")
- private boolean backgroundValidation;
-
- @XmlElement(name="background-validation-millis")
- private long backgroundValidationMillis;
-
- @XmlElement(name="validate-on-match")
- private boolean validateOnMatch = true;
-
- @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
- @XmlElement(name="use-strict-min")
- private Boolean useStrictMin = Boolean.FALSE;
-
- @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
- @XmlElement(name="no-tx-separate-pools")
- private Boolean noTxSeparatePools = Boolean.FALSE;
-
- @XmlElement(name="statistics-formatter")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String statisticsFormatter = "org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter";
-
- @XmlElement(name="isSameRM-override-value")
- private Boolean isSameRMOverrideValue = Boolean.FALSE;
-
- // is always true now and left here for the xml binding
- @Deprecated
- @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
- @XmlElement(name="track-connection-by-tx")
- private Boolean trackConnectionByTransaction;
-
- @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
- @XmlElement(name="interleaving")
- private Boolean interleaving;
-
- @XmlElement(name="allocation-retry")
- private int allocationRetry = 0;
-
- @XmlElement(name="allocation-retry-wait-millis")
- private long allocationRetryWaitMillis = 5000;
-
- /** The transactionSupportMetaData */
- @XmlTransient
- private ManagedConnectionFactoryTransactionSupportMetaData transactionSupportMetaData = ManagedConnectionFactoryTransactionSupportMetaData.NONE;
-
- /** The managedConnectionFactoryProperties */
- @XmlElement(name="config-property")
- private List<ManagedConnectionFactoryPropertyMetaData> managedConnectionFactoryProperties = new ArrayList<ManagedConnectionFactoryPropertyMetaData>();
-
- /** The securityMetaData */
- @XmlElements({@XmlElement(name="security-domain", type=SecurityDomainMetaData.class), @XmlElement(name="security-domain-and-application",type=SecurityDomainApplicationManagedMetaData.class), @XmlElement(name="application-managed-security",type=ApplicationManagedSecurityMetaData.class)})
- private SecurityMetaData securityMetaData;
-
- @XmlElement(name="depends")
- private List<String> dependsNames = new ArrayList<String>();
-
- @XmlTransient
- private List<ServiceMetaData> dependsServices = new ArrayList<ServiceMetaData>();
-
- @XmlElement(name="metadata")
- private DBMSMetaData dbmsMetaData;
-
- // todo: this should be wrapped into <metadata> element
- @XmlElement(name="type-mapping")
- String typeMapping;
-
- /** The localTransactions */
- @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
- @XmlElement(name="local-transaction")
- private Boolean localTransactions = Boolean.FALSE;
-
- public ManagedConnectionFactoryDeploymentMetaData()
- {
- this.interleaving = Boolean.FALSE;
- }
-
- /**
- * Get the connectionDefinition.
- *
- * @return the connectionDefinition.
- */
- @ManagementProperty(name="connection-definition",
- includeInTemplate=true)
- public String getConnectionDefinition()
- {
- return connectionDefinition;
- }
-
- /**
- * Set the connectionDefinition.
- *
- * @param connectionDefinition The connectionDefinition to set.
- */
- public void setConnectionDefinition(String connectionDefinition)
- {
- this.connectionDefinition = connectionDefinition;
- }
-
- /**
- * Get the jndiName. This is the id for the DataSource ManagedObject.
- *
- * @return the jndiName.
- */
- @ManagementProperty(name="jndi-name",
- description="The global JNDI name to bind the factory under",
- includeInTemplate=true)
- @ManagementObjectID(type="DataSource")
- 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.
- */
- @ManagementProperty(ignored=true)
- 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.
- */
- @ManagementProperty(name="use-java-context",
- description="Should the jndi name be bound under the java: context",
- includeInTemplate=true)
- 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.
- */
- @ManagementProperty(name="config-property", managed=true, includeInTemplate=true,
- propertyFactory= ConnectionFactoryProperty.class)
- 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.
- */
- @ManagementProperty(name="rar-name")
- 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.
- */
- @ManagementProperty(name="security-domain", managed=true, includeInTemplate=true)
- 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.
- */
- @ManagementProperty(name="type-mapping", includeInTemplate=true)
- 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.
- */
- @ManagementProperty(name="jmx-invoker-name")
- @ManagementObjectRef(type="JMXInvoker")
- public String getJmxInvokerName()
- {
- return jmxInvokerName;
- }
-
- /**
- * Set the jmxInvokerName.
- *
- * @param jmxInvokerName The jmxInvokerName to set.
- */
- public void setJmxInvokerName(String jmxInvokerName)
- {
- this.jmxInvokerName = jmxInvokerName;
- }
-
- /**
- * Get the dependsNames.
- *
- * @return the dependsNames.
- */
- @ManagementProperty(name="depends", ignored=true)
- 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.
- */
- @ManagementProperty(name="services", ignored=true)
- public List<ServiceMetaData> getDependsServices()
- {
- return dependsServices;
- }
-
- /**
- * Set the dependsServices.
- *
- * @param dependsServices The dependsServices to set.
- */
- public void setDependsServices(List<ServiceMetaData> dependsServices)
- {
- this.dependsServices = dependsServices;
- }
-
- @ManagementProperty(name="min-pool-size", includeInTemplate=true)
- public void setMinSize(int minSize)
- {
- this.minSize = minSize;
- }
-
- public int getMinSize()
- {
- return this.minSize;
- }
-
- @ManagementProperty(name="max-pool-size", includeInTemplate=true)
- public void setMaxSize(int maxSize)
- {
- this.maxPoolSize = maxSize;
- }
-
- public int getMaxSize()
- {
- if (this.maxPoolSize >= this.minSize)
- {
- return this.maxPoolSize;
- } else {
- return this.minSize;
- }
- }
-
- @ManagementProperty(name="blocking-timeout-millis", includeInTemplate=true)
- public void setBlockingTimeoutMilliSeconds(long blockTimeout)
- {
- this.blockingTimeout = blockTimeout;
- }
-
- public long getBlockingTimeoutMilliSeconds()
- {
- return this.blockingTimeout;
- }
-
- @ManagementProperty(name="idle-timeout-minutes", includeInTemplate=true)
- public void setIdleTimeoutMinutes(int idleTimeout)
- {
- this.idleTimeout = idleTimeout;
- }
-
- public int getIdleTimeoutMinutes()
- {
- return this.idleTimeout;
- }
-
- @ManagementProperty(name="prefill", includeInTemplate=true)
- public void setPrefill(Boolean prefill)
- {
- this.prefill = prefill;
- }
-
- public Boolean getPrefill()
- {
- return this.prefill;
- }
-
- @ManagementProperty(name="background-validation", includeInTemplate=true)
- public boolean isBackgroundValidation()
- {
- return backgroundValidation;
- }
-
- public void setBackgroundValidation(boolean backgroundValidation)
- {
- this.backgroundValidation = backgroundValidation;
- }
-
- public void setBackgroundValidationMillis(long interval)
- {
- this.backgroundValidationMillis = interval;
- }
-
- @ManagementProperty(name="background-validation-millis", includeInTemplate=true)
- public long getBackgroundValidationMillis()
- {
- return this.backgroundValidationMillis;
- }
-
- public void setValidateOnMatch(boolean validateOnMatch)
- {
- this.validateOnMatch = validateOnMatch;
- }
-
- @ManagementProperty(name="validate-on-match", includeInTemplate=true)
- public boolean isValidateOnMatch()
- {
- return this.validateOnMatch;
- }
-
- @ManagementProperty(name="isSameRM-override-value", includeInTemplate=true)
- public Boolean getIsSameRMOverrideValue()
- {
- return isSameRMOverrideValue;
- }
-
- public void setIsSameRMOverrideValue(Boolean isSameRMOverrideValue)
- {
- this.isSameRMOverrideValue = isSameRMOverrideValue;
- }
-
- @Deprecated
- @ManagementProperty(name="track-connection-by-tx", includeInTemplate=true)
- public Boolean getTrackConnectionByTransaction()
- {
- return !isInterleaving();
- }
-
- @Deprecated
- public void setTrackConnectionByTransaction(Boolean trackConnectionByTransaction)
- {
- if(Boolean.TRUE == getLocalTransactions() && !Boolean.TRUE.equals(trackConnectionByTransaction))
- throw new IllegalStateException("In case of local transactions track-connection-by-tx must always be true");
- setInterleaving(!Boolean.TRUE.equals(trackConnectionByTransaction));
- }
-
- @ManagementProperty(name="interleaving", includeInTemplate=true)
- public Boolean isInterleaving()
- {
- return interleaving == Boolean.TRUE && !Boolean.TRUE.equals(getLocalTransactions());
- }
-
- public void setInterleaving(Boolean interleaving)
- {
- this.interleaving = interleaving;
- }
-
- @ManagementProperty(name="allocation-retry", includeInTemplate=true)
- public int getAllocationRetry()
- {
- return this.allocationRetry;
- }
-
- public void setAllocationRetry(int ar)
- {
- this.allocationRetry = ar;
- }
-
- @ManagementProperty(name="allocation-retry-wait-millis", includeInTemplate=true)
- public long getAllocationRetryWaitMillis()
- {
- return this.allocationRetryWaitMillis;
- }
-
- public void setAllocationRetryWaitMillis(long arwm)
- {
- this.allocationRetryWaitMillis = arwm;
- }
-
- @ManagementProperty(name="local-transaction", use={ViewUse.RUNTIME})
- public Boolean getLocalTransactions()
- {
- return localTransactions;
- }
-
- public void setLocalTransactions(Boolean localTransactions)
- {
- this.localTransactions = localTransactions;
- }
-
- @ManagementProperty(name="use-strict-min", includeInTemplate=true)
- public Boolean getUseStrictMin()
- {
- return useStrictMin;
- }
-
- public void setUseStrictMin(Boolean useStrictMin)
- {
- this.useStrictMin = useStrictMin;
- }
-
- @ManagementProperty(name="statistics-formatter", includeInTemplate=true)
- public String getStatisticsFormatter()
- {
- return statisticsFormatter;
- }
-
- public void setStatisticsFormatter(String statisticsFormatter)
- {
- this.statisticsFormatter = statisticsFormatter;
- }
-
- @ManagementProperty(name="no-tx-separate-pools", includeInTemplate=true)
- public Boolean getNoTxSeparatePools()
- {
- return this.noTxSeparatePools;
- }
-
- public void setNoTxSeparatePools(Boolean notxpool)
- {
- this.noTxSeparatePools = notxpool;
- }
-
- @ManagementProperty(name="metadata", includeInTemplate=true)
- public DBMSMetaData getDBMSMetaData()
- {
- return dbmsMetaData;
- }
-
- public void setDBMSMetaData(DBMSMetaData dbmsMetaData)
- {
- this.dbmsMetaData = dbmsMetaData;
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.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 javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.managed.api.annotation.ManagementObject;
+import org.jboss.managed.api.annotation.ManagementObjectID;
+import org.jboss.managed.api.annotation.ManagementObjectRef;
+import org.jboss.managed.api.annotation.ManagementProperties;
+import org.jboss.managed.api.annotation.ManagementProperty;
+import org.jboss.managed.api.annotation.ViewUse;
+import org.jboss.system.metadata.ServiceMetaData;
+import org.jboss.resource.deployers.management.ConnectionFactoryProperty;
+
+
+/**
+ * A ManagedConnectionFactoryDeployment.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at ManagementObject(properties=ManagementProperties.EXPLICIT)
+public class ManagedConnectionFactoryDeploymentMetaData
+ implements Serializable, ConnectionPoolMetaData
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -4591557831734316580L;
+
+ /** The jndiName */
+ @XmlElement(name="jndi-name")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ private String jndiName;
+
+ /** The rarName */
+ @XmlElement(name="rar-name")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ private String rarName;
+
+ /** The useJavaContext */
+ @XmlElement(name="use-java-context")
+ private boolean useJavaContext = true;
+
+ /** The connectionDefinition */
+ @XmlElement(name="connection-definition")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ protected String connectionDefinition;
+
+ /** The jmxInvokerName */
+ @XmlElement(name="jmx-invoker-name")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ private String jmxInvokerName = "jboss:service=invoker,type=jrmp";
+
+ @XmlElement(name="min-pool-size")
+ private int minSize = 0;
+
+ @XmlElement(name="max-pool-size")
+ private int maxPoolSize = 10;
+
+ @XmlElement(name="blocking-timeout-millis")
+ private long blockingTimeout = 30000;
+
+ @XmlElement(name="idle-timeout-minutes")
+ private int idleTimeout = 30;
+
+ @XmlElement(name="prefill")
+ private Boolean prefill = Boolean.FALSE;
+
+ @XmlElement(name="background-validation")
+ private boolean backgroundValidation;
+
+ @XmlElement(name="background-validation-millis")
+ private long backgroundValidationMillis;
+
+ @XmlElement(name="validate-on-match")
+ private boolean validateOnMatch = true;
+
+ @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
+ @XmlElement(name="use-strict-min")
+ private Boolean useStrictMin = Boolean.FALSE;
+
+ @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
+ @XmlElement(name="no-tx-separate-pools")
+ private Boolean noTxSeparatePools = Boolean.FALSE;
+
+ @XmlElement(name="statistics-formatter")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ private String statisticsFormatter = "org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter";
+
+ @XmlElement(name="isSameRM-override-value")
+ private Boolean isSameRMOverrideValue = Boolean.FALSE;
+
+ // is always true now and left here for the xml binding
+ @Deprecated
+ @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
+ @XmlElement(name="track-connection-by-tx")
+ private Boolean trackConnectionByTransaction;
+
+ @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
+ @XmlElement(name="interleaving")
+ private Boolean interleaving;
+
+ @XmlElement(name="allocation-retry")
+ private int allocationRetry = 0;
+
+ @XmlElement(name="allocation-retry-wait-millis")
+ private long allocationRetryWaitMillis = 5000;
+
+ /** The transactionSupportMetaData */
+ @XmlTransient
+ private ManagedConnectionFactoryTransactionSupportMetaData transactionSupportMetaData = ManagedConnectionFactoryTransactionSupportMetaData.NONE;
+
+ /** The managedConnectionFactoryProperties */
+ @XmlElement(name="config-property")
+ private List<ManagedConnectionFactoryPropertyMetaData> managedConnectionFactoryProperties = new ArrayList<ManagedConnectionFactoryPropertyMetaData>();
+
+ /** The securityMetaData */
+ @XmlElements({@XmlElement(name="security-domain", type=SecurityDomainMetaData.class), @XmlElement(name="security-domain-and-application",type=SecurityDomainApplicationManagedMetaData.class), @XmlElement(name="application-managed-security",type=ApplicationManagedSecurityMetaData.class)})
+ private SecurityMetaData securityMetaData;
+
+ @XmlElement(name="depends")
+ private List<String> dependsNames = new ArrayList<String>();
+
+ @XmlTransient
+ private List<ServiceMetaData> dependsServices = new ArrayList<ServiceMetaData>();
+
+ @XmlElement(name="metadata")
+ private DBMSMetaData dbmsMetaData;
+
+ // todo: this should be wrapped into <metadata> element
+ @XmlElement(name="type-mapping")
+ String typeMapping;
+
+ /** The localTransactions */
+ @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
+ @XmlElement(name="local-transaction")
+ private Boolean localTransactions = Boolean.FALSE;
+
+ public ManagedConnectionFactoryDeploymentMetaData()
+ {
+ this.interleaving = Boolean.FALSE;
+ }
+
+ /**
+ * Get the connectionDefinition.
+ *
+ * @return the connectionDefinition.
+ */
+ @ManagementProperty(name="connection-definition",
+ includeInTemplate=true)
+ public String getConnectionDefinition()
+ {
+ return connectionDefinition;
+ }
+
+ /**
+ * Set the connectionDefinition.
+ *
+ * @param connectionDefinition The connectionDefinition to set.
+ */
+ public void setConnectionDefinition(String connectionDefinition)
+ {
+ this.connectionDefinition = connectionDefinition;
+ }
+
+ /**
+ * Get the jndiName. This is the id for the DataSource ManagedObject.
+ *
+ * @return the jndiName.
+ */
+ @ManagementProperty(name="jndi-name",
+ description="The global JNDI name to bind the factory under",
+ includeInTemplate=true)
+ @ManagementObjectID(type="DataSource")
+ 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.
+ */
+ @ManagementProperty(ignored=true)
+ 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.
+ */
+ @ManagementProperty(name="use-java-context",
+ description="Should the jndi name be bound under the java: context",
+ includeInTemplate=true)
+ 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.
+ */
+ @ManagementProperty(name="config-property", managed=true, includeInTemplate=true,
+ propertyFactory= ConnectionFactoryProperty.class)
+ 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.
+ */
+ @ManagementProperty(name="rar-name")
+ 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.
+ */
+ @ManagementProperty(name="security-domain", managed=true, includeInTemplate=true)
+ 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.
+ */
+ @ManagementProperty(name="type-mapping", includeInTemplate=true)
+ 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.
+ */
+ @ManagementProperty(name="jmx-invoker-name")
+ @ManagementObjectRef(type="JMXInvoker")
+ public String getJmxInvokerName()
+ {
+ return jmxInvokerName;
+ }
+
+ /**
+ * Set the jmxInvokerName.
+ *
+ * @param jmxInvokerName The jmxInvokerName to set.
+ */
+ public void setJmxInvokerName(String jmxInvokerName)
+ {
+ this.jmxInvokerName = jmxInvokerName;
+ }
+
+ /**
+ * Get the dependsNames.
+ *
+ * @return the dependsNames.
+ */
+ @ManagementProperty(name="depends", ignored=true)
+ 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.
+ */
+ @ManagementProperty(name="services", ignored=true)
+ public List<ServiceMetaData> getDependsServices()
+ {
+ return dependsServices;
+ }
+
+ /**
+ * Set the dependsServices.
+ *
+ * @param dependsServices The dependsServices to set.
+ */
+ public void setDependsServices(List<ServiceMetaData> dependsServices)
+ {
+ this.dependsServices = dependsServices;
+ }
+
+ @ManagementProperty(name="min-pool-size", includeInTemplate=true)
+ public void setMinSize(int minSize)
+ {
+ this.minSize = minSize;
+ }
+
+ public int getMinSize()
+ {
+ return this.minSize;
+ }
+
+ @ManagementProperty(name="max-pool-size", includeInTemplate=true)
+ public void setMaxSize(int maxSize)
+ {
+ this.maxPoolSize = maxSize;
+ }
+
+ public int getMaxSize()
+ {
+ if (this.maxPoolSize >= this.minSize)
+ {
+ return this.maxPoolSize;
+ } else {
+ return this.minSize;
+ }
+ }
+
+ @ManagementProperty(name="blocking-timeout-millis", includeInTemplate=true)
+ public void setBlockingTimeoutMilliSeconds(long blockTimeout)
+ {
+ this.blockingTimeout = blockTimeout;
+ }
+
+ public long getBlockingTimeoutMilliSeconds()
+ {
+ return this.blockingTimeout;
+ }
+
+ @ManagementProperty(name="idle-timeout-minutes", includeInTemplate=true)
+ public void setIdleTimeoutMinutes(int idleTimeout)
+ {
+ this.idleTimeout = idleTimeout;
+ }
+
+ public int getIdleTimeoutMinutes()
+ {
+ return this.idleTimeout;
+ }
+
+ @ManagementProperty(name="prefill", includeInTemplate=true)
+ public void setPrefill(Boolean prefill)
+ {
+ this.prefill = prefill;
+ }
+
+ public Boolean getPrefill()
+ {
+ return this.prefill;
+ }
+
+ @ManagementProperty(name="background-validation", includeInTemplate=true)
+ public boolean isBackgroundValidation()
+ {
+ return backgroundValidation;
+ }
+
+ public void setBackgroundValidation(boolean backgroundValidation)
+ {
+ this.backgroundValidation = backgroundValidation;
+ }
+
+ public void setBackgroundValidationMillis(long interval)
+ {
+ this.backgroundValidationMillis = interval;
+ }
+
+ @ManagementProperty(name="background-validation-millis", includeInTemplate=true)
+ public long getBackgroundValidationMillis()
+ {
+ return this.backgroundValidationMillis;
+ }
+
+ public void setValidateOnMatch(boolean validateOnMatch)
+ {
+ this.validateOnMatch = validateOnMatch;
+ }
+
+ @ManagementProperty(name="validate-on-match", includeInTemplate=true)
+ public boolean isValidateOnMatch()
+ {
+ return this.validateOnMatch;
+ }
+
+ @ManagementProperty(name="isSameRM-override-value", includeInTemplate=true)
+ public Boolean getIsSameRMOverrideValue()
+ {
+ return isSameRMOverrideValue;
+ }
+
+ public void setIsSameRMOverrideValue(Boolean isSameRMOverrideValue)
+ {
+ this.isSameRMOverrideValue = isSameRMOverrideValue;
+ }
+
+ @Deprecated
+ @ManagementProperty(name="track-connection-by-tx", includeInTemplate=true)
+ public Boolean getTrackConnectionByTransaction()
+ {
+ return !isInterleaving();
+ }
+
+ @Deprecated
+ public void setTrackConnectionByTransaction(Boolean trackConnectionByTransaction)
+ {
+ if(Boolean.TRUE == getLocalTransactions() && !Boolean.TRUE.equals(trackConnectionByTransaction))
+ throw new IllegalStateException("In case of local transactions track-connection-by-tx must always be true");
+ setInterleaving(!Boolean.TRUE.equals(trackConnectionByTransaction));
+ }
+
+ @ManagementProperty(name="interleaving", includeInTemplate=true)
+ public Boolean isInterleaving()
+ {
+ return interleaving == Boolean.TRUE && !Boolean.TRUE.equals(getLocalTransactions());
+ }
+
+ public void setInterleaving(Boolean interleaving)
+ {
+ this.interleaving = interleaving;
+ }
+
+ @ManagementProperty(name="allocation-retry", includeInTemplate=true)
+ public int getAllocationRetry()
+ {
+ return this.allocationRetry;
+ }
+
+ public void setAllocationRetry(int ar)
+ {
+ this.allocationRetry = ar;
+ }
+
+ @ManagementProperty(name="allocation-retry-wait-millis", includeInTemplate=true)
+ public long getAllocationRetryWaitMillis()
+ {
+ return this.allocationRetryWaitMillis;
+ }
+
+ public void setAllocationRetryWaitMillis(long arwm)
+ {
+ this.allocationRetryWaitMillis = arwm;
+ }
+
+ @ManagementProperty(name="local-transaction", use={ViewUse.RUNTIME})
+ public Boolean getLocalTransactions()
+ {
+ return localTransactions;
+ }
+
+ public void setLocalTransactions(Boolean localTransactions)
+ {
+ this.localTransactions = localTransactions;
+ }
+
+ @ManagementProperty(name="use-strict-min", includeInTemplate=true)
+ public Boolean getUseStrictMin()
+ {
+ return useStrictMin;
+ }
+
+ public void setUseStrictMin(Boolean useStrictMin)
+ {
+ this.useStrictMin = useStrictMin;
+ }
+
+ @ManagementProperty(name="statistics-formatter", includeInTemplate=true)
+ public String getStatisticsFormatter()
+ {
+ return statisticsFormatter;
+ }
+
+ public void setStatisticsFormatter(String statisticsFormatter)
+ {
+ this.statisticsFormatter = statisticsFormatter;
+ }
+
+ @ManagementProperty(name="no-tx-separate-pools", includeInTemplate=true)
+ public Boolean getNoTxSeparatePools()
+ {
+ return this.noTxSeparatePools;
+ }
+
+ public void setNoTxSeparatePools(Boolean notxpool)
+ {
+ this.noTxSeparatePools = notxpool;
+ }
+
+ @ManagementProperty(name="metadata", includeInTemplate=true)
+ public DBMSMetaData getDBMSMetaData()
+ {
+ return dbmsMetaData;
+ }
+
+ public void setDBMSMetaData(DBMSMetaData dbmsMetaData)
+ {
+ this.dbmsMetaData = dbmsMetaData;
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryPropertyMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryPropertyMetaData.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryPropertyMetaData.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,144 +1,144 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.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;
-
-import org.jboss.managed.api.annotation.ManagementObject;
-
-/**
- * A ManagedConnectionFactoryProperty.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @version $Revision: 1.1 $
- */
- at XmlAccessorType(XmlAccessType.FIELD)
- at ManagementObject
-public class ManagedConnectionFactoryPropertyMetaData implements Serializable
-{
- /** The serialVersionUID */
- private static final long serialVersionUID = 4978655092571661074L;
-
- /** The name */
- @XmlAttribute(name="name")
- private String name;
-
- /** The type */
- @XmlAttribute(name="type")
- private String type = "java.lang.String";
-
- @XmlValue
- private String value;
-
- /**
- * Get the name.
- *
- * @return the name.
- */
- public String getName()
- {
- return name;
- }
- /**
- * Set the name.
- *
- * @param name The name to set.
- */
- public void setName(String name)
- {
- this.name = name;
- }
- /**
- * Get the type.
- *
- * @return the type.
- */
- public String getType()
- {
- return type;
- }
- /**
- * Set the type.
- *
- * @param type The type to set.
- */
- public void setType(String type)
- {
- this.type = type;
- }
- /**
- * Get the value.
- *
- * @return the value.
- */
- public String getValue()
- {
- return value;
- }
- /**
- * Set the value.
- *
- * @param value The value to set.
- */
- public void setValue(String value)
- {
- this.value = value;
- }
-
- @Override
- public boolean equals(Object obj)
- {
- if(this == obj)
- return true;
-
- if(!(obj instanceof ManagedConnectionFactoryPropertyMetaData))
- {
- return false;
- }
-
- ManagedConnectionFactoryPropertyMetaData other = (ManagedConnectionFactoryPropertyMetaData)obj;
-
- if(getName() == null)
- return false;
-
- else
- {
- return getName().equals(other.getName());
- }
- }
-
- @Override
- public int hashCode()
- {
- if (getName() == null)
- {
- return 42;
- }
-
- return getName().hashCode();
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.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;
+
+import org.jboss.managed.api.annotation.ManagementObject;
+
+/**
+ * A ManagedConnectionFactoryProperty.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at ManagementObject
+public class ManagedConnectionFactoryPropertyMetaData implements Serializable
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = 4978655092571661074L;
+
+ /** The name */
+ @XmlAttribute(name="name")
+ private String name;
+
+ /** The type */
+ @XmlAttribute(name="type")
+ private String type = "java.lang.String";
+
+ @XmlValue
+ private String value;
+
+ /**
+ * Get the name.
+ *
+ * @return the name.
+ */
+ public String getName()
+ {
+ return name;
+ }
+ /**
+ * Set the name.
+ *
+ * @param name The name to set.
+ */
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+ /**
+ * Get the type.
+ *
+ * @return the type.
+ */
+ public String getType()
+ {
+ return type;
+ }
+ /**
+ * Set the type.
+ *
+ * @param type The type to set.
+ */
+ public void setType(String type)
+ {
+ this.type = type;
+ }
+ /**
+ * Get the value.
+ *
+ * @return the value.
+ */
+ public String getValue()
+ {
+ return value;
+ }
+ /**
+ * Set the value.
+ *
+ * @param value The value to set.
+ */
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if(this == obj)
+ return true;
+
+ if(!(obj instanceof ManagedConnectionFactoryPropertyMetaData))
+ {
+ return false;
+ }
+
+ ManagedConnectionFactoryPropertyMetaData other = (ManagedConnectionFactoryPropertyMetaData)obj;
+
+ if(getName() == null)
+ return false;
+
+ else
+ {
+ return getName().equals(other.getName());
+ }
+ }
+
+ @Override
+ public int hashCode()
+ {
+ if (getName() == null)
+ {
+ return 42;
+ }
+
+ return getName().hashCode();
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryTransactionSupportMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryTransactionSupportMetaData.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/ManagedConnectionFactoryTransactionSupportMetaData.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,33 +1,33 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.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;
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.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;
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/NoTxConnectionFactoryDeploymentMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/NoTxConnectionFactoryDeploymentMetaData.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/NoTxConnectionFactoryDeploymentMetaData.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,53 +1,53 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.metadata.mcf;
-
-import javax.xml.bind.annotation.XmlType;
-
-import org.jboss.managed.api.annotation.ManagementComponent;
-import org.jboss.managed.api.annotation.ManagementObject;
-import org.jboss.managed.api.annotation.ManagementProperty;
-
-
-/**
- * A NoTxConnectionFactoryDeploymentMetaData.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @version $Revision: 1.1 $
- */
- at XmlType(name="no-tx-connection-factory")
- at ManagementObject(componentType=@ManagementComponent(type="ConnectionFactory",subtype="NoTx"))
-public class NoTxConnectionFactoryDeploymentMetaData extends ManagedConnectionFactoryDeploymentMetaData
-{
-
- /** The serialVersionUID */
- private static final long serialVersionUID = -8637168894246737692L;
-
- @Override
- @ManagementProperty(ignored=true)
- public ManagedConnectionFactoryTransactionSupportMetaData getTransactionSupportMetaData()
- {
- return ManagedConnectionFactoryTransactionSupportMetaData.NONE;
-
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.metadata.mcf;
+
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.managed.api.annotation.ManagementComponent;
+import org.jboss.managed.api.annotation.ManagementObject;
+import org.jboss.managed.api.annotation.ManagementProperty;
+
+
+/**
+ * A NoTxConnectionFactoryDeploymentMetaData.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+ at XmlType(name="no-tx-connection-factory")
+ at ManagementObject(componentType=@ManagementComponent(type="ConnectionFactory",subtype="NoTx"))
+public class NoTxConnectionFactoryDeploymentMetaData extends ManagedConnectionFactoryDeploymentMetaData
+{
+
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -8637168894246737692L;
+
+ @Override
+ @ManagementProperty(ignored=true)
+ public ManagedConnectionFactoryTransactionSupportMetaData getTransactionSupportMetaData()
+ {
+ return ManagedConnectionFactoryTransactionSupportMetaData.NONE;
+
+ }
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/NoTxDataSourceDeploymentMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/NoTxDataSourceDeploymentMetaData.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/NoTxDataSourceDeploymentMetaData.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,53 +1,53 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.metadata.mcf;
-
-import javax.xml.bind.annotation.XmlType;
-
-import org.jboss.managed.api.annotation.ManagementComponent;
-import org.jboss.managed.api.annotation.ManagementObject;
-import org.jboss.managed.api.annotation.ManagementProperty;
-
-
-/**
- * A NoTxDataSourceDeploymentMetaData.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @version $Revision: 1.1 $
- */
- at XmlType(name="no-tx-datasource")
- at ManagementObject(componentType=@ManagementComponent(type="DataSource",subtype="NoTx"))
-public class NoTxDataSourceDeploymentMetaData extends NonXADataSourceDeploymentMetaData
-{
- /** The serialVersionUID */
- private static final long serialVersionUID = -5354506847562754007L;
-
- @Override
- @ManagementProperty(ignored=true)
- public ManagedConnectionFactoryTransactionSupportMetaData getTransactionSupportMetaData()
- {
- return ManagedConnectionFactoryTransactionSupportMetaData.NONE;
-
- }
-
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.metadata.mcf;
+
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.managed.api.annotation.ManagementComponent;
+import org.jboss.managed.api.annotation.ManagementObject;
+import org.jboss.managed.api.annotation.ManagementProperty;
+
+
+/**
+ * A NoTxDataSourceDeploymentMetaData.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+ at XmlType(name="no-tx-datasource")
+ at ManagementObject(componentType=@ManagementComponent(type="DataSource",subtype="NoTx"))
+public class NoTxDataSourceDeploymentMetaData extends NonXADataSourceDeploymentMetaData
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -5354506847562754007L;
+
+ @Override
+ @ManagementProperty(ignored=true)
+ public ManagedConnectionFactoryTransactionSupportMetaData getTransactionSupportMetaData()
+ {
+ return ManagedConnectionFactoryTransactionSupportMetaData.NONE;
+
+ }
+
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityDeploymentType.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityDeploymentType.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityDeploymentType.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,34 +1,34 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.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;
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.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;
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityDomainApplicationManagedMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityDomainApplicationManagedMetaData.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityDomainApplicationManagedMetaData.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,37 +1,37 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.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;
-
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.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;
+
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityDomainMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityDomainMetaData.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityDomainMetaData.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,47 +1,47 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.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;
-
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.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;
+
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityMetaData.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityMetaData.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,79 +1,79 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.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;
-
-import org.jboss.managed.api.annotation.ManagementObject;
-import org.jboss.managed.api.annotation.ManagementProperty;
-
-/**
- * A SecurityMetaData.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @version $Revision: 1.1 $
- */
- at XmlAccessorType(XmlAccessType.NONE)
- at ManagementObject(description="The security domain, type information")
-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));
- }
-
- @ManagementProperty
- public String getDomain()
- {
- return domain;
- }
- public void setDomain(String domain)
- {
- this.domain = domain;
- }
-
- @ManagementProperty
- public SecurityDeploymentType getSecurityDeploymentType()
- {
- return type;
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.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;
+
+import org.jboss.managed.api.annotation.ManagementObject;
+import org.jboss.managed.api.annotation.ManagementProperty;
+
+/**
+ * A SecurityMetaData.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+ at XmlAccessorType(XmlAccessType.NONE)
+ at ManagementObject(description="The security domain, type information")
+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));
+ }
+
+ @ManagementProperty
+ public String getDomain()
+ {
+ return domain;
+ }
+ public void setDomain(String domain)
+ {
+ this.domain = domain;
+ }
+
+ @ManagementProperty
+ public SecurityDeploymentType getSecurityDeploymentType()
+ {
+ return type;
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityMetaDataSupport.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityMetaDataSupport.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/SecurityMetaDataSupport.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,36 +1,36 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.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();
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.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();
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/ServiceMetaDataAdapter.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/ServiceMetaDataAdapter.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/ServiceMetaDataAdapter.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,67 +1,67 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.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.ServiceMetaData2ElementConverter;
-import org.jboss.system.metadata.ServiceMetaDataParser;
-import org.w3c.dom.Element;
-
-/**
- * A ServiceMetaDataAdapter.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
- * @version $Revision: 1.1 $
- */
-public class ServiceMetaDataAdapter extends XmlAdapter<Object, ServiceMetaData>
-{
-
- @Override
- public ServiceMetaData unmarshal(Object e) throws Exception
- {
- ServiceMetaDataParser parser = new ServiceMetaDataParser((Element)e);
- List<ServiceMetaData> services = parser.parse();
-
- ServiceMetaData md = null;
-
- if(services != null)
- {
- md = services.get(0);
-
- }
- return md;
- }
-
- @Override
- public Element marshal(ServiceMetaData service) throws Exception
- {
- if(service == null)
- return null;
- ServiceMetaData2ElementConverter converter = new ServiceMetaData2ElementConverter();
- return converter.createServiceMetaDataElement(service);
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.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.ServiceMetaData2ElementConverter;
+import org.jboss.system.metadata.ServiceMetaDataParser;
+import org.w3c.dom.Element;
+
+/**
+ * A ServiceMetaDataAdapter.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @author <a href="mailto:emuckenh at redhat.com">Emanuel Muckenhuber</a>
+ * @version $Revision: 1.1 $
+ */
+public class ServiceMetaDataAdapter extends XmlAdapter<Object, ServiceMetaData>
+{
+
+ @Override
+ public ServiceMetaData unmarshal(Object e) throws Exception
+ {
+ ServiceMetaDataParser parser = new ServiceMetaDataParser((Element)e);
+ List<ServiceMetaData> services = parser.parse();
+
+ ServiceMetaData md = null;
+
+ if(services != null)
+ {
+ md = services.get(0);
+
+ }
+ return md;
+ }
+
+ @Override
+ public Element marshal(ServiceMetaData service) throws Exception
+ {
+ if(service == null)
+ return null;
+ ServiceMetaData2ElementConverter converter = new ServiceMetaData2ElementConverter();
+ return converter.createServiceMetaDataElement(service);
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/TxConnectionFactoryDeploymentMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/TxConnectionFactoryDeploymentMetaData.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/TxConnectionFactoryDeploymentMetaData.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,97 +1,97 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.metadata.mcf;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-import org.jboss.managed.api.annotation.ManagementComponent;
-import org.jboss.managed.api.annotation.ManagementObject;
-import org.jboss.managed.api.annotation.ManagementProperty;
-
-
-/**
- * A TxConnectionFactoryDeploymentMetaData.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @version $Revision$
- */
- at XmlType(name="tx-connection-factory")
- at XmlAccessorType(XmlAccessType.FIELD)
- at ManagementObject(componentType=@ManagementComponent(type="ConnectionFactory",subtype="XA"))
-public class TxConnectionFactoryDeploymentMetaData extends ManagedConnectionFactoryDeploymentMetaData
-{
-
- /** The serialVersionUID */
- private static final long serialVersionUID = -8491548124974331799L;
-
- public TxConnectionFactoryDeploymentMetaData()
- {
- }
-
- @XmlElement(name="xa-resource-timeout")
- private int xaResourceTimeout;
-
- @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
- @XmlElement(name="xa-transaction")
- private Boolean xaTransaction = Boolean.FALSE;
-
- @ManagementProperty(name="xa-resource-timeout")
- public int getXaResourceTimeout()
- {
- return xaResourceTimeout;
- }
-
- @ManagementProperty(name="xa-transaction")
- public Boolean getXATransaction()
- {
- return xaTransaction;
- }
-
- public void setXATransaction(Boolean xaTransaction)
- {
- this.xaTransaction = xaTransaction;
-
- }
- public void setXaResourceTimeout(int xaResourceTimeout)
- {
- this.xaResourceTimeout = xaResourceTimeout;
- }
-
- @Override
- @ManagementProperty(name="local-transaction")
- public Boolean getLocalTransactions()
- {
- return !getXATransaction();
- }
-
- @Override
- @ManagementProperty(ignored=true)
- public ManagedConnectionFactoryTransactionSupportMetaData getTransactionSupportMetaData()
- {
- return getLocalTransactions() ? ManagedConnectionFactoryTransactionSupportMetaData.LOCAL : ManagedConnectionFactoryTransactionSupportMetaData.XA;
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.metadata.mcf;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.managed.api.annotation.ManagementComponent;
+import org.jboss.managed.api.annotation.ManagementObject;
+import org.jboss.managed.api.annotation.ManagementProperty;
+
+
+/**
+ * A TxConnectionFactoryDeploymentMetaData.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision$
+ */
+ at XmlType(name="tx-connection-factory")
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at ManagementObject(componentType=@ManagementComponent(type="ConnectionFactory",subtype="XA"))
+public class TxConnectionFactoryDeploymentMetaData extends ManagedConnectionFactoryDeploymentMetaData
+{
+
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -8491548124974331799L;
+
+ public TxConnectionFactoryDeploymentMetaData()
+ {
+ }
+
+ @XmlElement(name="xa-resource-timeout")
+ private int xaResourceTimeout;
+
+ @XmlJavaTypeAdapter(ManagedConnectionEmptyContentAdapter.class)
+ @XmlElement(name="xa-transaction")
+ private Boolean xaTransaction = Boolean.FALSE;
+
+ @ManagementProperty(name="xa-resource-timeout")
+ public int getXaResourceTimeout()
+ {
+ return xaResourceTimeout;
+ }
+
+ @ManagementProperty(name="xa-transaction")
+ public Boolean getXATransaction()
+ {
+ return xaTransaction;
+ }
+
+ public void setXATransaction(Boolean xaTransaction)
+ {
+ this.xaTransaction = xaTransaction;
+
+ }
+ public void setXaResourceTimeout(int xaResourceTimeout)
+ {
+ this.xaResourceTimeout = xaResourceTimeout;
+ }
+
+ @Override
+ @ManagementProperty(name="local-transaction")
+ public Boolean getLocalTransactions()
+ {
+ return !getXATransaction();
+ }
+
+ @Override
+ @ManagementProperty(ignored=true)
+ public ManagedConnectionFactoryTransactionSupportMetaData getTransactionSupportMetaData()
+ {
+ return getLocalTransactions() ? ManagedConnectionFactoryTransactionSupportMetaData.LOCAL : ManagedConnectionFactoryTransactionSupportMetaData.XA;
+ }
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/XAConnectionPropertyMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/XAConnectionPropertyMetaData.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/XAConnectionPropertyMetaData.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,36 +1,36 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.metadata.mcf;
-
-import org.jboss.managed.api.annotation.ManagementObject;
-
-
-/**
- * A XAConnectionPropertyMetaData.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @version $Revision: 1.1 $
- */
- at ManagementObject
-public class XAConnectionPropertyMetaData extends DataSourceConnectionPropertyMetaData
-{
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.metadata.mcf;
+
+import org.jboss.managed.api.annotation.ManagementObject;
+
+
+/**
+ * A XAConnectionPropertyMetaData.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+ at ManagementObject
+public class XAConnectionPropertyMetaData extends DataSourceConnectionPropertyMetaData
+{
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/mcf/XADataSourceDeploymentMetaData.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/mcf/XADataSourceDeploymentMetaData.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/mcf/XADataSourceDeploymentMetaData.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,173 +1,173 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.metadata.mcf;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-import org.jboss.managed.api.annotation.ManagementComponent;
-import org.jboss.managed.api.annotation.ManagementObject;
-import org.jboss.managed.api.annotation.ManagementProperty;
-import org.jboss.resource.deployers.management.ConnectionFactoryProperty;
-import org.jboss.resource.deployers.management.XAConnectionFactoryProperty;
-
-
-/**
- * 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)
- at ManagementObject(componentType=@ManagementComponent(type="DataSource",subtype="XA"))
-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")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String xaDataSourceClass;
-
- @XmlElement(name="xa-datasource-property")
- private List<XAConnectionPropertyMetaData> xaDataSourceProperties = new ArrayList<XAConnectionPropertyMetaData>();
-
- @XmlElement(name="url-property")
- @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
- private String urlProperty;
-
- @XmlElement(name="xa-resource-timeout")
- private int xaResourceTimeout;
-
- public XADataSourceDeploymentMetaData()
- {
- setRarName(RAR_NAME);
- setTransactionSupportMetaData(ManagedConnectionFactoryTransactionSupportMetaData.XA);
- }
-
- @ManagementProperty(name="xa-datasource-class", description="The XADataSource class",
- includeInTemplate=true)
- public String getXaDataSourceClass()
- {
- return xaDataSourceClass;
- }
-
- public void setXaDataSourceClass(String xaDataSourceClass)
- {
- this.xaDataSourceClass = xaDataSourceClass;
- }
-
- @ManagementProperty(name="url-property", description="The url-property",
- includeInTemplate=true)
- public String getURLProperty()
- {
- return urlProperty;
- }
-
- public void setURLProperty(String urlProperty)
- {
- this.urlProperty = urlProperty;
- }
-
- @ManagementProperty(name="xa-resource-timeout", description="The XAResource timeout",
- includeInTemplate=true)
- public int getXaResourceTimeout()
- {
- return xaResourceTimeout;
- }
-
- public void setXaResourceTimeout(int xaResourceTimeout)
- {
- this.xaResourceTimeout = xaResourceTimeout;
- }
-
- @ManagementProperty(name="xa-datasource-properties",
- description="The DataSource properties",
- managed=true, includeInTemplate=true,
- propertyFactory= XAConnectionFactoryProperty.class)
- public List<XAConnectionPropertyMetaData> getXADataSourceProperties()
- {
- return this.xaDataSourceProperties;
- }
-
- public void setXADataSourceProperties(List<XAConnectionPropertyMetaData> xaDataSourceProperties)
- {
- this.xaDataSourceProperties = xaDataSourceProperties;
- }
-
- @Override
- @ManagementProperty(name="config-property",
- description="The connection factory property info",
- managed=true, includeInTemplate=true,
- propertyFactory= ConnectionFactoryProperty.class)
- public List<ManagedConnectionFactoryPropertyMetaData> getManagedConnectionFactoryProperties()
- {
- List<ManagedConnectionFactoryPropertyMetaData> properties = super.getManagedConnectionFactoryProperties();
- ManagedConnectionFactoryPropertyMetaData property = null;
-
- if(getXaDataSourceClass() != null)
- {
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("XADataSourceClass");
- property.setValue(getXaDataSourceClass());
- properties.add(property);
- }
-
- List<XAConnectionPropertyMetaData> dsProps = getXADataSourceProperties();
-
- StringBuffer dsBuff = new StringBuffer();
-
- if (dsProps != null)
- {
- for (XAConnectionPropertyMetaData data : dsProps)
- {
- dsBuff.append(data.getName() + "=" + data.getValue() + "\n");
- }
- }
-
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("XADataSourceProperties");
- property.setValue(dsBuff.toString());
- properties.add(property);
-
- if(getURLProperty() != null)
- {
- property = new ManagedConnectionFactoryPropertyMetaData();
- property.setName("URLProperty");
- property.setValue(getURLProperty());
- properties.add(property);
- }
-
- return properties;
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.metadata.mcf;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.jboss.managed.api.annotation.ManagementComponent;
+import org.jboss.managed.api.annotation.ManagementObject;
+import org.jboss.managed.api.annotation.ManagementProperty;
+import org.jboss.resource.deployers.management.ConnectionFactoryProperty;
+import org.jboss.resource.deployers.management.XAConnectionFactoryProperty;
+
+
+/**
+ * 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)
+ at ManagementObject(componentType=@ManagementComponent(type="DataSource",subtype="XA"))
+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")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ private String xaDataSourceClass;
+
+ @XmlElement(name="xa-datasource-property")
+ private List<XAConnectionPropertyMetaData> xaDataSourceProperties = new ArrayList<XAConnectionPropertyMetaData>();
+
+ @XmlElement(name="url-property")
+ @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
+ private String urlProperty;
+
+ @XmlElement(name="xa-resource-timeout")
+ private int xaResourceTimeout;
+
+ public XADataSourceDeploymentMetaData()
+ {
+ setRarName(RAR_NAME);
+ setTransactionSupportMetaData(ManagedConnectionFactoryTransactionSupportMetaData.XA);
+ }
+
+ @ManagementProperty(name="xa-datasource-class", description="The XADataSource class",
+ includeInTemplate=true)
+ public String getXaDataSourceClass()
+ {
+ return xaDataSourceClass;
+ }
+
+ public void setXaDataSourceClass(String xaDataSourceClass)
+ {
+ this.xaDataSourceClass = xaDataSourceClass;
+ }
+
+ @ManagementProperty(name="url-property", description="The url-property",
+ includeInTemplate=true)
+ public String getURLProperty()
+ {
+ return urlProperty;
+ }
+
+ public void setURLProperty(String urlProperty)
+ {
+ this.urlProperty = urlProperty;
+ }
+
+ @ManagementProperty(name="xa-resource-timeout", description="The XAResource timeout",
+ includeInTemplate=true)
+ public int getXaResourceTimeout()
+ {
+ return xaResourceTimeout;
+ }
+
+ public void setXaResourceTimeout(int xaResourceTimeout)
+ {
+ this.xaResourceTimeout = xaResourceTimeout;
+ }
+
+ @ManagementProperty(name="xa-datasource-properties",
+ description="The DataSource properties",
+ managed=true, includeInTemplate=true,
+ propertyFactory= XAConnectionFactoryProperty.class)
+ public List<XAConnectionPropertyMetaData> getXADataSourceProperties()
+ {
+ return this.xaDataSourceProperties;
+ }
+
+ public void setXADataSourceProperties(List<XAConnectionPropertyMetaData> xaDataSourceProperties)
+ {
+ this.xaDataSourceProperties = xaDataSourceProperties;
+ }
+
+ @Override
+ @ManagementProperty(name="config-property",
+ description="The connection factory property info",
+ managed=true, includeInTemplate=true,
+ propertyFactory= ConnectionFactoryProperty.class)
+ public List<ManagedConnectionFactoryPropertyMetaData> getManagedConnectionFactoryProperties()
+ {
+ List<ManagedConnectionFactoryPropertyMetaData> properties = super.getManagedConnectionFactoryProperties();
+ ManagedConnectionFactoryPropertyMetaData property = null;
+
+ if(getXaDataSourceClass() != null)
+ {
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("XADataSourceClass");
+ property.setValue(getXaDataSourceClass());
+ properties.add(property);
+ }
+
+ List<XAConnectionPropertyMetaData> dsProps = getXADataSourceProperties();
+
+ StringBuffer dsBuff = new StringBuffer();
+
+ if (dsProps != null)
+ {
+ for (XAConnectionPropertyMetaData data : dsProps)
+ {
+ dsBuff.append(data.getName() + "=" + data.getValue() + "\n");
+ }
+ }
+
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("XADataSourceProperties");
+ property.setValue(dsBuff.toString());
+ properties.add(property);
+
+ if(getURLProperty() != null)
+ {
+ property = new ManagedConnectionFactoryPropertyMetaData();
+ property.setName("URLProperty");
+ property.setValue(getURLProperty());
+ properties.add(property);
+ }
+
+ return properties;
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/repository/DefaultJCAEntryFormatter.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/repository/DefaultJCAEntryFormatter.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/repository/DefaultJCAEntryFormatter.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,40 +1,40 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.metadata.repository;
-
-import java.util.List;
-
-public class DefaultJCAEntryFormatter implements JCAMetaDataEntryFormatter<String>
-{
- static final long serialVersionUID = 533094294763405271L;
-
- public String formatEntry(JCADeploymentMetaDataEntry entry)
- {
- return null;
- }
-
- public String formatEntries(List<JCADeploymentMetaDataEntry> entries)
- {
- return null;
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.metadata.repository;
+
+import java.util.List;
+
+public class DefaultJCAEntryFormatter implements JCAMetaDataEntryFormatter<String>
+{
+ static final long serialVersionUID = 533094294763405271L;
+
+ public String formatEntry(JCADeploymentMetaDataEntry entry)
+ {
+ return null;
+ }
+
+ public String formatEntries(List<JCADeploymentMetaDataEntry> entries)
+ {
+ return null;
+ }
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/repository/DefaultJCAMetaDataRepository.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/repository/DefaultJCAMetaDataRepository.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/repository/DefaultJCAMetaDataRepository.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,284 +1,284 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.metadata.repository;
-
-import java.io.Serializable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-
-import javax.resource.spi.ActivationSpec;
-
-import org.jboss.aop.microcontainer.aspects.jmx.JMX;
-import org.jboss.logging.Logger;
-import org.jboss.resource.deployment.AdminObject;
-import org.jboss.resource.metadata.ConnectorMetaData;
-import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup;
-import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData;
-
-
-/**
- * A JCAMetaDataRepository.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @version $Revision: 1.1 $
- */
- at JMX(exposedInterface=JCAMetaDataRepository.class,name="jboss.jca:service=JCAMetaDataRepository,name=DefaultJCAMetaDataRepository")
-public class DefaultJCAMetaDataRepository implements JCAMetaDataRepository, Serializable
-{
- private static final Logger log = Logger.getLogger(DefaultJCAMetaDataRepository.class);
-
- /** The serialVersionUID */
- private static final long serialVersionUID = 244233303934974673L;
-
- private static final String DEFAULT_FORMATTER = DefaultJCAEntryFormatter.class.getName();
-
- private String formatterClassName;
- private JCAMetaDataEntryFormatter formatter;
-
- private Map<JCAConnectorMetaDataKey, JCAConnectorMetaDataEntry> connectors = new ConcurrentHashMap<JCAConnectorMetaDataKey, JCAConnectorMetaDataEntry>();
-
- public void setFormatterClassName(String formatterClassName)
- {
- if(formatterClassName != null)
- {
- if(this.formatterClassName != null && !this.formatterClassName.equals(formatterClassName))
- {
- loadFormatter(formatterClassName);
- this.formatterClassName = formatter.getClass().getName();
- }
-
- }else
- {
- this.formatterClassName = "org.jboss.resource.metadata.repository.DefaultJCAEntryFormatter";
- loadFormatter(this.formatterClassName);
- }
- }
-
- public String getFormatterClassName()
- {
- return this.formatterClassName;
-
- }
-
- public void create() throws Exception
- {
- if(formatter == null && formatterClassName != null)
- {
- loadFormatter(formatterClassName);
-
- }else if(formatter == null && formatterClassName == null)
- {
- loadFormatter(DEFAULT_FORMATTER);
- }
-
- }
-
- public void addConnectorMetaData(String name, ConnectorMetaData cmd)
- {
- JCAConnectorMetaDataKey key = new JCAConnectorMetaDataKey(name);
- key.setName(name);
-
- JCAConnectorMetaDataEntry entry = connectors.get(key);
-
- if(entry != null)
- {
- entry.setConnectorMetaData(cmd);
- log.debug("Updated ConnectorMetaData for: "+name);
- }
- else
- {
- entry = new JCAConnectorMetaDataEntry();
- entry.setConnectorMetaData(cmd);
- log.debug("Added ConnectorMetaData for: "+name);
- connectors.put(key, entry);
- }
-
- }
-
- public ConnectorMetaData getConnectorMetaData(String name)
- {
- JCAConnectorMetaDataKey entry = new JCAConnectorMetaDataKey(name);
- entry.setName(name);
- ConnectorMetaData md = getConnectorMetaData(entry);
- return md;
- }
-
- private ConnectorMetaData getConnectorMetaData(JCAConnectorMetaDataKey key)
- {
- JCAConnectorMetaDataEntry entry = connectors.get(key);
- return entry.getConnectorMetaData();
- }
-
- public void addActivationSpec(String rarName, ActivationSpec spec)
- {
-
- JCAConnectorMetaDataKey key = new JCAConnectorMetaDataKey(rarName);
- addDeployment(key, JCADeploymentType.ACTIVATION_SPEC, spec);
-
- }
-
- public void addAdminObject(String rarName, AdminObject adminObject)
- {
- JCAConnectorMetaDataKey key = new JCAConnectorMetaDataKey(rarName);
- addDeployment(key, JCADeploymentType.ADMIN_OBJECT, adminObject);
-
- }
-
- public void addManagedConnectionFactoryDeploymentGroup(ManagedConnectionFactoryDeploymentGroup group)
- {
- List<ManagedConnectionFactoryDeploymentMetaData> mcf = group.getDeployments();
-
- for (ManagedConnectionFactoryDeploymentMetaData deployment : mcf)
- {
- JCAConnectorMetaDataKey key = new JCAConnectorMetaDataKey(deployment.getRarName());
- addDeployment(key, JCADeploymentType.MCF, deployment);
- }
-
- }
-
- @SuppressWarnings("unchecked")
- public Object listDeploymentsForConnector(String rarName)
- {
- Object results = null;
- JCAConnectorMetaDataKey key = new JCAConnectorMetaDataKey(rarName);
- JCAConnectorMetaDataEntry entry = connectors.get(key);
-
- if(entry != null)
- {
- List<JCADeploymentMetaDataEntry> deployments = entry.getDeployments();
- results = formatter.formatEntries(deployments);
-
- }
- else
- {
- results = "No entries for ConnectorMetaData " + rarName;
- }
-
- return results;
- }
-
-
- private void addDeployment(JCAConnectorMetaDataKey key, JCADeploymentType deploymentType, Object deployment)
- {
-
- JCAConnectorMetaDataEntry entry = connectors.get(key);
-
- if(entry == null)
- {
- entry = new JCAConnectorMetaDataEntry();
- entry.addDeployment(deploymentType,deployment);
-
- connectors.put(key, entry);
- }
-
- else
- {
- entry.addDeployment(deploymentType, deployment);
- }
- }
-
- public int getActivationSpecCount()
- {
- return getCount(JCADeploymentType.ACTIVATION_SPEC);
- }
-
- public int getAdminObjectCount()
- {
- return getCount(JCADeploymentType.ADMIN_OBJECT);
- }
-
- public int getConnectorMetaDataCount()
- {
- int count = 0;
-
- synchronized (connectors)
- {
- for(Iterator<JCAConnectorMetaDataEntry> iter = connectors.values().iterator(); iter.hasNext();)
- {
- JCAConnectorMetaDataEntry entry = iter.next();
-
- if(entry.getConnectorMetaData() != null)
- {
- count++;
- }
-
- }
- }
-
- return count;
- }
-
- public int getManagedConnectionFactoryCount()
- {
- return getCount(JCADeploymentType.MCF);
- }
-
- private int getCount(JCADeploymentType deploymentType)
- {
- int count = 0;
-
- synchronized (connectors)
- {
- for(Iterator<JCAConnectorMetaDataEntry> iter = connectors.values().iterator(); iter.hasNext();)
- {
- JCAConnectorMetaDataEntry entry = iter.next();
-
- List<JCADeploymentMetaDataEntry> deployments = entry.getDeployments();
-
- for (JCADeploymentMetaDataEntry deployment : deployments)
- {
- if(deployment.getDeploymentType().equals(deploymentType))
- {
- count++;
- }
- }
- }
- }
-
- return count;
- }
-
- private void loadFormatter(String name)
- {
-
- if(name != null)
- {
- try
- {
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- Class clz = cl.loadClass(formatterClassName);
- formatter = (JCAMetaDataEntryFormatter)clz.newInstance();
- formatterClassName = name;
-
- }catch(Exception e)
- {
- log.trace("Could not formatter for classname " + formatterClassName + " using default.");
- formatter = new DefaultJCAEntryFormatter();
- formatterClassName = formatter.getClass().getName();
- }
-
- }
-
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.metadata.repository;
+
+import java.io.Serializable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+import javax.resource.spi.ActivationSpec;
+
+import org.jboss.aop.microcontainer.aspects.jmx.JMX;
+import org.jboss.logging.Logger;
+import org.jboss.resource.deployment.AdminObject;
+import org.jboss.resource.metadata.ConnectorMetaData;
+import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup;
+import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentMetaData;
+
+
+/**
+ * A JCAMetaDataRepository.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+ at JMX(exposedInterface=JCAMetaDataRepository.class,name="jboss.jca:service=JCAMetaDataRepository,name=DefaultJCAMetaDataRepository")
+public class DefaultJCAMetaDataRepository implements JCAMetaDataRepository, Serializable
+{
+ private static final Logger log = Logger.getLogger(DefaultJCAMetaDataRepository.class);
+
+ /** The serialVersionUID */
+ private static final long serialVersionUID = 244233303934974673L;
+
+ private static final String DEFAULT_FORMATTER = DefaultJCAEntryFormatter.class.getName();
+
+ private String formatterClassName;
+ private JCAMetaDataEntryFormatter formatter;
+
+ private Map<JCAConnectorMetaDataKey, JCAConnectorMetaDataEntry> connectors = new ConcurrentHashMap<JCAConnectorMetaDataKey, JCAConnectorMetaDataEntry>();
+
+ public void setFormatterClassName(String formatterClassName)
+ {
+ if(formatterClassName != null)
+ {
+ if(this.formatterClassName != null && !this.formatterClassName.equals(formatterClassName))
+ {
+ loadFormatter(formatterClassName);
+ this.formatterClassName = formatter.getClass().getName();
+ }
+
+ }else
+ {
+ this.formatterClassName = "org.jboss.resource.metadata.repository.DefaultJCAEntryFormatter";
+ loadFormatter(this.formatterClassName);
+ }
+ }
+
+ public String getFormatterClassName()
+ {
+ return this.formatterClassName;
+
+ }
+
+ public void create() throws Exception
+ {
+ if(formatter == null && formatterClassName != null)
+ {
+ loadFormatter(formatterClassName);
+
+ }else if(formatter == null && formatterClassName == null)
+ {
+ loadFormatter(DEFAULT_FORMATTER);
+ }
+
+ }
+
+ public void addConnectorMetaData(String name, ConnectorMetaData cmd)
+ {
+ JCAConnectorMetaDataKey key = new JCAConnectorMetaDataKey(name);
+ key.setName(name);
+
+ JCAConnectorMetaDataEntry entry = connectors.get(key);
+
+ if(entry != null)
+ {
+ entry.setConnectorMetaData(cmd);
+ log.debug("Updated ConnectorMetaData for: "+name);
+ }
+ else
+ {
+ entry = new JCAConnectorMetaDataEntry();
+ entry.setConnectorMetaData(cmd);
+ log.debug("Added ConnectorMetaData for: "+name);
+ connectors.put(key, entry);
+ }
+
+ }
+
+ public ConnectorMetaData getConnectorMetaData(String name)
+ {
+ JCAConnectorMetaDataKey entry = new JCAConnectorMetaDataKey(name);
+ entry.setName(name);
+ ConnectorMetaData md = getConnectorMetaData(entry);
+ return md;
+ }
+
+ private ConnectorMetaData getConnectorMetaData(JCAConnectorMetaDataKey key)
+ {
+ JCAConnectorMetaDataEntry entry = connectors.get(key);
+ return entry.getConnectorMetaData();
+ }
+
+ public void addActivationSpec(String rarName, ActivationSpec spec)
+ {
+
+ JCAConnectorMetaDataKey key = new JCAConnectorMetaDataKey(rarName);
+ addDeployment(key, JCADeploymentType.ACTIVATION_SPEC, spec);
+
+ }
+
+ public void addAdminObject(String rarName, AdminObject adminObject)
+ {
+ JCAConnectorMetaDataKey key = new JCAConnectorMetaDataKey(rarName);
+ addDeployment(key, JCADeploymentType.ADMIN_OBJECT, adminObject);
+
+ }
+
+ public void addManagedConnectionFactoryDeploymentGroup(ManagedConnectionFactoryDeploymentGroup group)
+ {
+ List<ManagedConnectionFactoryDeploymentMetaData> mcf = group.getDeployments();
+
+ for (ManagedConnectionFactoryDeploymentMetaData deployment : mcf)
+ {
+ JCAConnectorMetaDataKey key = new JCAConnectorMetaDataKey(deployment.getRarName());
+ addDeployment(key, JCADeploymentType.MCF, deployment);
+ }
+
+ }
+
+ @SuppressWarnings("unchecked")
+ public Object listDeploymentsForConnector(String rarName)
+ {
+ Object results = null;
+ JCAConnectorMetaDataKey key = new JCAConnectorMetaDataKey(rarName);
+ JCAConnectorMetaDataEntry entry = connectors.get(key);
+
+ if(entry != null)
+ {
+ List<JCADeploymentMetaDataEntry> deployments = entry.getDeployments();
+ results = formatter.formatEntries(deployments);
+
+ }
+ else
+ {
+ results = "No entries for ConnectorMetaData " + rarName;
+ }
+
+ return results;
+ }
+
+
+ private void addDeployment(JCAConnectorMetaDataKey key, JCADeploymentType deploymentType, Object deployment)
+ {
+
+ JCAConnectorMetaDataEntry entry = connectors.get(key);
+
+ if(entry == null)
+ {
+ entry = new JCAConnectorMetaDataEntry();
+ entry.addDeployment(deploymentType,deployment);
+
+ connectors.put(key, entry);
+ }
+
+ else
+ {
+ entry.addDeployment(deploymentType, deployment);
+ }
+ }
+
+ public int getActivationSpecCount()
+ {
+ return getCount(JCADeploymentType.ACTIVATION_SPEC);
+ }
+
+ public int getAdminObjectCount()
+ {
+ return getCount(JCADeploymentType.ADMIN_OBJECT);
+ }
+
+ public int getConnectorMetaDataCount()
+ {
+ int count = 0;
+
+ synchronized (connectors)
+ {
+ for(Iterator<JCAConnectorMetaDataEntry> iter = connectors.values().iterator(); iter.hasNext();)
+ {
+ JCAConnectorMetaDataEntry entry = iter.next();
+
+ if(entry.getConnectorMetaData() != null)
+ {
+ count++;
+ }
+
+ }
+ }
+
+ return count;
+ }
+
+ public int getManagedConnectionFactoryCount()
+ {
+ return getCount(JCADeploymentType.MCF);
+ }
+
+ private int getCount(JCADeploymentType deploymentType)
+ {
+ int count = 0;
+
+ synchronized (connectors)
+ {
+ for(Iterator<JCAConnectorMetaDataEntry> iter = connectors.values().iterator(); iter.hasNext();)
+ {
+ JCAConnectorMetaDataEntry entry = iter.next();
+
+ List<JCADeploymentMetaDataEntry> deployments = entry.getDeployments();
+
+ for (JCADeploymentMetaDataEntry deployment : deployments)
+ {
+ if(deployment.getDeploymentType().equals(deploymentType))
+ {
+ count++;
+ }
+ }
+ }
+ }
+
+ return count;
+ }
+
+ private void loadFormatter(String name)
+ {
+
+ if(name != null)
+ {
+ try
+ {
+ ClassLoader cl = Thread.currentThread().getContextClassLoader();
+ Class clz = cl.loadClass(formatterClassName);
+ formatter = (JCAMetaDataEntryFormatter)clz.newInstance();
+ formatterClassName = name;
+
+ }catch(Exception e)
+ {
+ log.trace("Could not formatter for classname " + formatterClassName + " using default.");
+ formatter = new DefaultJCAEntryFormatter();
+ formatterClassName = formatter.getClass().getName();
+ }
+
+ }
+
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAConnectorMetaDataEntry.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAConnectorMetaDataEntry.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAConnectorMetaDataEntry.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,66 +1,66 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.metadata.repository;
-
-import java.io.Serializable;
-import java.util.Collections;
-import java.util.List;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import org.jboss.resource.metadata.ConnectorMetaData;
-
-/**
- * A JCAConnectorMetaDataEntry.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @version $Revision: 1.1 $
- */
-public class JCAConnectorMetaDataEntry implements Serializable
-{
- static final long serialVersionUID = 2115245854346888893L;
- private ConnectorMetaData md;
- private List<JCADeploymentMetaDataEntry> deployments = new CopyOnWriteArrayList<JCADeploymentMetaDataEntry>();
-
- public ConnectorMetaData getConnectorMetaData()
- {
- return this.md;
- }
-
- public void setConnectorMetaData(ConnectorMetaData md)
- {
- this.md = md;
- }
-
- public List<JCADeploymentMetaDataEntry> getDeployments()
- {
- return Collections.unmodifiableList(deployments);
- }
-
- public void addDeployment(JCADeploymentType type, Object deployment)
- {
- JCADeploymentMetaDataEntry deploymentEntry = new JCADeploymentMetaDataEntry();
- deploymentEntry.setDeploymentType(type);
- deployments.add(deploymentEntry);
-
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.metadata.repository;
+
+import java.io.Serializable;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import org.jboss.resource.metadata.ConnectorMetaData;
+
+/**
+ * A JCAConnectorMetaDataEntry.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public class JCAConnectorMetaDataEntry implements Serializable
+{
+ static final long serialVersionUID = 2115245854346888893L;
+ private ConnectorMetaData md;
+ private List<JCADeploymentMetaDataEntry> deployments = new CopyOnWriteArrayList<JCADeploymentMetaDataEntry>();
+
+ public ConnectorMetaData getConnectorMetaData()
+ {
+ return this.md;
+ }
+
+ public void setConnectorMetaData(ConnectorMetaData md)
+ {
+ this.md = md;
+ }
+
+ public List<JCADeploymentMetaDataEntry> getDeployments()
+ {
+ return Collections.unmodifiableList(deployments);
+ }
+
+ public void addDeployment(JCADeploymentType type, Object deployment)
+ {
+ JCADeploymentMetaDataEntry deploymentEntry = new JCADeploymentMetaDataEntry();
+ deploymentEntry.setDeploymentType(type);
+ deployments.add(deploymentEntry);
+
+ }
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAConnectorMetaDataKey.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAConnectorMetaDataKey.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAConnectorMetaDataKey.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,82 +1,82 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.metadata.repository;
-
-import java.io.Serializable;
-
-/**
- * A JCAConnectorMetaDataKey.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @version $Revision: 1.1 $
- */
-public class JCAConnectorMetaDataKey implements Serializable
-{
- static final long serialVersionUID = 6536528769896871603L;
- private String name;
-
- public JCAConnectorMetaDataKey(String name)
- {
- this.name = name;
- }
-
- public String getName()
- {
- if (name == null)
- throw new IllegalArgumentException("Null name");
- return name;
- }
-
- public void setName(String name)
- {
- this.name = name;
- }
-
- @Override
- public boolean equals(Object obj)
- {
- if(obj == this)
- return true;
-
- if(!(obj instanceof JCAConnectorMetaDataKey))
- {
- return false;
- }
-
- JCAConnectorMetaDataKey other = (JCAConnectorMetaDataKey)obj;
- return other.getName().equals(getName());
-
- }
-
- @Override
- public int hashCode()
- {
- return getName().hashCode();
-
- }
-
- @Override
- public String toString()
- {
- return "[JCAConnectorMetaDataKey: " + getName() + "]";
- }
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.metadata.repository;
+
+import java.io.Serializable;
+
+/**
+ * A JCAConnectorMetaDataKey.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public class JCAConnectorMetaDataKey implements Serializable
+{
+ static final long serialVersionUID = 6536528769896871603L;
+ private String name;
+
+ public JCAConnectorMetaDataKey(String name)
+ {
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ if (name == null)
+ throw new IllegalArgumentException("Null name");
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if(obj == this)
+ return true;
+
+ if(!(obj instanceof JCAConnectorMetaDataKey))
+ {
+ return false;
+ }
+
+ JCAConnectorMetaDataKey other = (JCAConnectorMetaDataKey)obj;
+ return other.getName().equals(getName());
+
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return getName().hashCode();
+
+ }
+
+ @Override
+ public String toString()
+ {
+ return "[JCAConnectorMetaDataKey: " + getName() + "]";
+ }
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/repository/JCADeploymentMetaDataEntry.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/repository/JCADeploymentMetaDataEntry.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/repository/JCADeploymentMetaDataEntry.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,56 +1,56 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.metadata.repository;
-
-import java.io.Serializable;
-
-/**
- * A JCADeploymentMetaDataEntry.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @version $Revision: 1.1 $
- */
-public class JCADeploymentMetaDataEntry implements Serializable
-{
- static final long serialVersionUID = 3392449594678715491L;
- private JCADeploymentType deploymentType;
- private String name;
-
- public JCADeploymentType getDeploymentType()
- {
- return deploymentType;
- }
-
- public void setDeploymentType(JCADeploymentType deploymentType)
- {
- this.deploymentType = deploymentType;
- }
- public String getName()
- {
- return name;
- }
- public void setName(String name)
- {
- this.name = name;
- }
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.metadata.repository;
+
+import java.io.Serializable;
+
+/**
+ * A JCADeploymentMetaDataEntry.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public class JCADeploymentMetaDataEntry implements Serializable
+{
+ static final long serialVersionUID = 3392449594678715491L;
+ private JCADeploymentType deploymentType;
+ private String name;
+
+ public JCADeploymentType getDeploymentType()
+ {
+ return deploymentType;
+ }
+
+ public void setDeploymentType(JCADeploymentType deploymentType)
+ {
+ this.deploymentType = deploymentType;
+ }
+ public String getName()
+ {
+ return name;
+ }
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/repository/JCADeploymentType.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/repository/JCADeploymentType.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/repository/JCADeploymentType.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,33 +1,33 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.metadata.repository;
-
-/**
- * A JCADeployment.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @version $Revision: 1.1 $
- */
-public enum JCADeploymentType
-{
- MCF, ACTIVATION_SPEC, ADMIN_OBJECT;
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.metadata.repository;
+
+/**
+ * A JCADeployment.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public enum JCADeploymentType
+{
+ MCF, ACTIVATION_SPEC, ADMIN_OBJECT;
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAMetaDataEntryFormatter.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAMetaDataEntryFormatter.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAMetaDataEntryFormatter.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,38 +1,38 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.metadata.repository;
-
-import java.io.Serializable;
-import java.util.List;
-
-/**
- * A JCAMetaDataEntryFormatter.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @version $Revision: 1.1 $
- */
-public interface JCAMetaDataEntryFormatter<T> extends Serializable
-{
- public T formatEntry(JCADeploymentMetaDataEntry entry);
-
- public T formatEntries(List<JCADeploymentMetaDataEntry> entries);
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.metadata.repository;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * A JCAMetaDataEntryFormatter.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public interface JCAMetaDataEntryFormatter<T> extends Serializable
+{
+ public T formatEntry(JCADeploymentMetaDataEntry entry);
+
+ public T formatEntries(List<JCADeploymentMetaDataEntry> entries);
+}
Modified: trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAMetaDataRepository.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAMetaDataRepository.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAMetaDataRepository.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,63 +1,63 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.metadata.repository;
-
-import javax.resource.spi.ActivationSpec;
-
-import org.jboss.resource.deployment.AdminObject;
-import org.jboss.resource.metadata.ConnectorMetaData;
-import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup;
-
-/**
- * A JCAMetaDataRepository.
- *
- * @author <a href="weston.price at jboss.org">Weston Price</a>
- * @version $Revision: 1.1 $
- */
-public interface JCAMetaDataRepository
-{
- public int getConnectorMetaDataCount();
-
- public int getActivationSpecCount();
-
- public int getManagedConnectionFactoryCount();
-
- public int getAdminObjectCount();
-
- public void setFormatterClassName(String formatterClassName);
-
- public String getFormatterClassName();
-
- public void addConnectorMetaData(String name, ConnectorMetaData cmd);
-
- public ConnectorMetaData getConnectorMetaData(String name);
-
- public void addActivationSpec(String rarName, ActivationSpec spec);
-
- public void addManagedConnectionFactoryDeploymentGroup(ManagedConnectionFactoryDeploymentGroup group);
-
- public void addAdminObject(String rarName, AdminObject adminObject);
-
- public Object listDeploymentsForConnector(String rarName);
-
-
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.metadata.repository;
+
+import javax.resource.spi.ActivationSpec;
+
+import org.jboss.resource.deployment.AdminObject;
+import org.jboss.resource.metadata.ConnectorMetaData;
+import org.jboss.resource.metadata.mcf.ManagedConnectionFactoryDeploymentGroup;
+
+/**
+ * A JCAMetaDataRepository.
+ *
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public interface JCAMetaDataRepository
+{
+ public int getConnectorMetaDataCount();
+
+ public int getActivationSpecCount();
+
+ public int getManagedConnectionFactoryCount();
+
+ public int getAdminObjectCount();
+
+ public void setFormatterClassName(String formatterClassName);
+
+ public String getFormatterClassName();
+
+ public void addConnectorMetaData(String name, ConnectorMetaData cmd);
+
+ public ConnectorMetaData getConnectorMetaData(String name);
+
+ public void addActivationSpec(String rarName, ActivationSpec spec);
+
+ public void addManagedConnectionFactoryDeploymentGroup(ManagedConnectionFactoryDeploymentGroup group);
+
+ public void addAdminObject(String rarName, AdminObject adminObject);
+
+ public Object listDeploymentsForConnector(String rarName);
+
+
+}
Modified: trunk/connector/src/main/org/jboss/resource/statistic/JBossConnectionStatistics.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/statistic/JBossConnectionStatistics.java 2008-11-14 12:16:58 UTC (rev 81004)
+++ trunk/connector/src/main/org/jboss/resource/statistic/JBossConnectionStatistics.java 2008-11-14 12:18:35 UTC (rev 81005)
@@ -1,40 +1,40 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.resource.statistic;
-
-
-/**
- * A JBossConnectionStatistics.
- *
- * @author <a href="vicky.kak at jboss.com">Vicky Kak</a>
- *
- */
-public interface JBossConnectionStatistics
-{
- /**
- * This retrieves the connection statistics for the underlying
- * connection of ManagedConnection.
- *
- * @return the statistics.
- */
- public Object listConnectionStats();
-}
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.resource.statistic;
+
+
+/**
+ * A JBossConnectionStatistics.
+ *
+ * @author <a href="vicky.kak at jboss.com">Vicky Kak</a>
+ *
+ */
+public interface JBossConnectionStatistics
+{
+ /**
+ * This retrieves the connection statistics for the underlying
+ * connection of ManagedConnection.
+ *
+ * @return the statistics.
+ */
+ public Object listConnectionStats();
+}
More information about the jboss-cvs-commits
mailing list