Camel JMS Component with Spring on Weblogic Server -
i not found decent, clear example learn jms component spring configuration. wrote this:
<bean id="weblogic" class="org.apache.camel.component.jms.jmscomponent"> <property name="connectionfactory" ref="jmsconnectionfactory"/> </bean> <bean id="jmsjnditemplate" class="org.springframework.jndi.jnditemplate"> <property name="environment"> <props> <prop key="java.naming.factory.initial">weblogic.jndi.wlinitialcontextfactory</prop> <prop key="java.naming.provider.url">t3://${ip}:${port}</prop> </props> </property> </bean> <bean id="jmsconnectionfactory" class="org.springframework.jndi.jndiobjectfactorybean"> <property name="jnditemplate" ref="jmsjnditemplate"/> <property name="jndiname" value="jms/cdrpremo-connfact-jndi"/> </bean> <camelcontext id="camelcontext" xmlns="http://camel.apache.org/schema/spring"> <camel:endpoint id="jmsqueue" uri="weblogic:queue:jms/cdrpremo-queue-jndi"/> <route> <from ref="jmsqueue"/> <bean ref="test" method="writefile"/> <to uri="log:errors?level=error"/> </route> </camelcontext>
but gives exception :
caused by: javax.naming.namenotfoundexception: unable resolve 'weblogic.jms.backend.jms'. resolved 'weblogic.jms.backend'; remaining name 'jms' @ weblogic.jndi.internal.basicnamingnode.newnamenotfoundexception(basicnamingnode.java:1139) @ weblogic.jndi.internal.basicnamingnode.lookuphere(basicnamingnode.java:252) @ weblogic.jndi.internal.servernamingnode.lookuphere(servernamingnode.java:182) @ weblogic.jndi.internal.basicnamingnode.lookup(basicnamingnode.java:206) @ weblogic.jndi.internal.basicnamingnode.lookup(basicnamingnode.java:214) @ weblogic.jndi.internal.basicnamingnode.lookup(basicnamingnode.java:214) @ weblogic.jndi.internal.basicnamingnode.lookup(basicnamingnode.java:214) @ weblogic.jndi.internal.wleventcontextimpl.lookup(wleventcontextimpl.java:254) @ weblogic.jndi.internal.wlcontextimpl.lookup(wlcontextimpl.java:393) @ weblogic.jms.frontend.femanager.destinationcreate(femanager.java:287) ... 8 more
jms conf true(ip port , jndi names). getting connection, , session gives exception tell me mistakes?
thanx
edit: fix applied according comment of claus.
the camel endpoints should refer "weblogic" component name.
<camel:endpoint id="jmsqueue" uri="jms:queue:jms/cdrpremo-queue-jndi"/>
should be
<camel:endpoint id="jmsqueue" uri="weblogic:queue:jms/cdrpremo-queue-jndi"/>
as name gave jms component in id attribute of < bean > tag, eg
<bean id="weblogic" class="org.apache.camel.component.jms.jmscomponent"> <property name="connectionfactory" ref="jmsconnectionfactory"/> </bean>
Comments
Post a Comment