-
1. Re: Wrapped connection for the wildfly
mayerw01 Mar 19, 2018 9:14 AM (in response to sant_kaly)You can get the Connection object either via:
connection = DriverManager.getConnection( url, username, password)
or
@Resource(mappedName = "{JNDI-Name}")
DataSource ds;
....
connection = ds.getConnection();
-
2. Re: Wrapped connection for the wildfly
sant_kaly Mar 19, 2018 2:28 PM (in response to mayerw01)am able to get the connection, but with this connection object we can't call the preparecall() and we can't create the array parameter from string[] because ArrayDescriptor expect the wrappedconnection object.
How can i use in my Jdk8 with the wildfly?
-
3. Re: Wrapped connection for the wildfly
mayerw01 Mar 20, 2018 12:42 PM (in response to sant_kaly)"So, the 11.2 Oracle JDBC drivers do not and cannot support the
createArrayOf
method." (JDBC Standards SupportAs mentioned in the Spec you may use the
createARRAY method instead.
So something like this should work:
int [] iarray = {17, 18,19};
OracleConnectionWrapper ocw = new OracleConnectionWrapper((OracleConnection) connection);
OracleConnection oc = ocw.unwrap();
ARRAY ocArray = oc.createARRAY("{databaseElement}".toUpperCase(), iarray);
-
4. Re: Wrapped connection for the wildfly
sant_kaly May 16, 2018 3:23 PM (in response to sant_kaly)we need to specify in the global modules of standalone.xml
<module name="com.oracle.jdbc" slot="main"/>
<module name="org.jboss.ironjacamar.jdbcadapters" slot="main"/>