[jboss-jira] [JBoss JIRA] (AS7-6794) SQLServerXADataSource IntegratedSecurity not working when adding XA JNDI datasource
Vedran Mikulcic (JIRA)
jira-events at lists.jboss.org
Tue Mar 26 07:56:42 EDT 2013
Vedran Mikulcic created AS7-6794:
------------------------------------
Summary: SQLServerXADataSource IntegratedSecurity not working when adding XA JNDI datasource
Key: AS7-6794
URL: https://issues.jboss.org/browse/AS7-6794
Project: Application Server 7
Issue Type: Feature Request
Components: Server
Affects Versions: 7.1.1.Final
Environment: Windows
Reporter: Vedran Mikulcic
Assignee: Jason Greene
When setting the IntegratedSecurity in the XA datasource on JBoss to true, Microsoft's JDBC driver doesn't resolve the 'true' setting to boolean value but throws an error:
{code}
java.lang.NoSuchMethodException:
com.microsoft.sqlserver.jdbc.SQLServerXADataSource.setIntegratedSecurity(java.lang.String)
{code}
This is only the issue when using the XA datasource, non XA datasources work normally.
Steps to reproduce:
1. In the JBoss AS configuration\standalone\standalone.xml add a new xa-datasource to JNDI:
{code}
<xa-datasource jta="true" jndi-name="java:jboss/datasources/jndiName" pool-name="poolName" enabled="true" use-java-context="true" use-ccm="true">
<!-- this should work but doesn't -->
<xa-datasource-property name="IntegratedSecurity">
true
</xa-datasource-property>
<xa-datasource-property name="ServerName">
localhost
</xa-datasource-property>
<xa-datasource-property name="DatabaseName">
MyDbName
</xa-datasource-property>
<xa-datasource-property name="SelectMethod">
cursor
</xa-datasource-property>
<xa-datasource-class>com.microsoft.sqlserver.jdbc.SQLServerXADataSource</xa-datasource-class>
<driver>sqljdbc</driver>
<xa-pool>
<is-same-rm-override>false</is-same-rm-override>
</xa-pool>
<validation>
<valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mssql.MSSQLValidConnectionChecker"/>
</validation>
</xa-datasource>
{code}
2. Restart JBoss AS
3. Try to execute a query using the configured JNDI connection:
{code}
InitialContext ic = new InitialContext();
DataSource ds = (DataSource) ic.lookup("java:jboss/datasources/jndiName");
Connection conn = null;
try {
conn = ds.getConnection();
// try to execute something
CallableStatement stmt = conn.prepareCall("{? = call some_stored_procedure()}");
stmt.execute();
} finally {
if (conn != null)
conn.close();
}
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list