[jboss-jira] [JBoss JIRA] (WFLY-1169) SQLServerXADataSource IntegratedSecurity not working when adding XA JNDI datasource

Brian Stansberry (Jira) issues at jboss.org
Fri Feb 15 17:01:00 EST 2019


     [ https://issues.jboss.org/browse/WFLY-1169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Stansberry reassigned WFLY-1169:
--------------------------------------

     Issue Type: Bug  (was: Feature Request)
    Component/s: JCA
                     (was: Server)
       Assignee: Stefano Maestri  (was: Jason Greene)


My guess here is the problem relates to the fact that the setIntegratedSecurity​ method takes a boolean not a string.

This would be an Enhancement if no type conversions were possible, but if this works in the non-XA case that implies type conversions are done there so perhaps there is a bug.

> SQLServerXADataSource IntegratedSecurity not working when adding XA JNDI datasource
> -----------------------------------------------------------------------------------
>
>                 Key: WFLY-1169
>                 URL: https://issues.jboss.org/browse/WFLY-1169
>             Project: WildFly
>          Issue Type: Bug
>          Components: JCA
>         Environment: Windows
>            Reporter: Vedran Mikulcic
>            Assignee: Stefano Maestri
>            Priority: Major
>
> 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 was sent by Atlassian Jira
(v7.12.1#712002)



More information about the jboss-jira mailing list