jeudi 26 février 2015

JMS 112 Invalid connection using spring ds

I'm using a spring datasource and is unable to connect to Oracle AQ Queue.



Connection connection = null;
AQSession aqSess = null;

connection = ds.getConnection();
connection.setAutoCommit(false);

DataSourceUtils.getTargetConnection(connection);
Class.forName("oracle.AQ.AQOracleDriver");

aqSess = AQDriverManager.createAQSession(connection);
aqSession = aqSess;


But still get this: oracle.jms.AQjmsException: JMS-112: Connection is invalid any tips would be appreciated.



<bean id="myId" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"/>
<property name="url" value="jdbc:oracle:thin:@myIpAddress:dev"/>
<property name="username" value="user"/>
<property name="password" value="pass"/>
<property name="removeAbandoned" value="true"/>
<property name="initialSize" value="2"/>
<property name="maxIdle" value="8"/>
<property name="maxActive" value="30"/>
<property name="maxWait" value="60000"/>
</bean>


AQException: oracle.AQ.AQException: JMS-112: Connection is invalid
at oracle.AQ.AQDriverManager.createAQSession(AQDriverManager.java:193)

Aucun commentaire:

Enregistrer un commentaire