Spring Integration with Oracle AQ -
i'm trying learn spring integration , create application this:
from oracle send messages (on oracle queue), message intercepted java application (build spring integration) , application send email based on message received. message contain to: - cc: , text send.
to make kind of communication i've decided use jms (i think in oracle made oracle aq).
in database i've created queue , i'm trying create simple applicationcontext.xml start handshake.
looking on net i've found few articles (spring integration + oracle aq) , i'm getting error. main error this: java.lang.classnotfoundexception: oracle.jms.aqjmsfactory
right applicationcontext.xml
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:int="http://www.springframework.org/schema/integration" xmlns:context="http://www.springframework.org/schema/context" xmlns:orcl="http://www.springframework.org/schema/data/orcl" xmlns:int-jms="http://www.springframework.org/schema/integration/jms" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/integration/jms http://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd http://www.springframework.org/schema/data/orcl http://www.springframework.org/schema/data/orcl/spring-data-orcl-1.0.xsd"> <int:channel id="inbound" /> <int:channel id="outbound" /> <bean id="simplemessagelistener" class="it.dirimo.simplemessagelistener" /> <int-jms:inbound-channel-adapter channel="inbound" connection-factory="connectionfactory" destination-name="q1"> <int:poller fixed-delay="1000" /> </int-jms:inbound-channel-adapter> <int:service-activator input-channel="inbound" output-channel="outbound" ref="simplemessagelistener" method="onmessage" /> <int-jms:outbound-channel-adapter id="jmsout" channel="outbound" connection-factory="connectionfactory" destination-name="samplequeue" /> <int:poller id="poller" default="true" fixed-delay="10000" /> <orcl:aq-jms-connection-factory id="connectionfactory" data-source="datasource" use-local-data-source-transaction="true"/> <bean id="datasource" class="org.apache.commons.dbcp.basicdatasource" lazy-init="false"> <property name="driverclassname" value="oracle.jdbc.driver.oracledriver" /> <property name="url" value="jdbc:oracle:thin:@localhost:1521:orcl" /> <property name="username" value="user" /> <property name="password" value="password" /> </bean> </beans>
maybe i'm using "old" technologies (for example i've seen first time org.apache.commons.dbcp.basicdatasource
)
unfortunally i'm new spring integration , i've seen first time oracle queue (i'm using oracle work never used kind of queue).
some advice of how proceed apreciated :)
edit 1 solve problem aqjmsfactory need include aqapi.jar
java.lang.classnotfoundexception: oracle.jms.aqjmsfactory
this means missing jar contains class classpath.
oracle, typically, requires manually download jars them directly.
Comments
Post a Comment