Hi evetybody, In order to publish a WebService on Jonas, I use JMSConfigFeature with all its advantages of using Spring bean config.
Here is my config. Here JCF is an ConnectionFactory ( org.objectweb.joram.client.jms.tcp.TcpConnectionFactory ), created when Jonas is started, the same with the two queues request and reply ______________________________________________ <bean id="jmsConnectionFactory" class="org.springframework.jms.connection.SingleConnectionFactory"> <property name="targetConnectionFactory"> <bean id="connectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName" value="JCF"/> </bean> </property> </bean> <bean id="request_bean" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName" value="request"/> </bean> <bean id="reply_bean" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName" value="reply"/> </bean> <bean id="jmsConfig" class="org.apache.cxf.transport.jms.JMSConfiguration" p:connectionFactory-ref="jmsConnectionFactory" p:targetDestination-ref="request_bean" p:replyDestination-ref="reply_bean"> </bean> <jaxws:endpoint id="endpoint-JMSgreeter" implementor="demo.jms_greeter.server.GreeterJMSImpl" wsdlLocation="/wsdl/jms_greeter.wsdl" address="/JMSgreeter"> <jaxws:features> <bean class="org.apache.cxf.transport.jms.JMSConfigFeature" p:jmsConfig-ref="jmsConfig" /> </jaxws:features> </jaxws:endpoint> ______________________________________________ But when I deploy on Jonas, I have this error: ______________________________________________ 18:04:04,400 ERROR ContextLoader(215) - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jmsConnectionFactory' defined in ServletContext resource [/WEB -INF/applicationContextTest.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to conver t property value of type [org.objectweb.joram.client.jms.tcp.TcpConnectionFactory] to required type [javax.jms.ConnectionFactory] for property 'target ConnectionFactory'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [org.objectweb.joram.client.jms.tcp.TcpConnec tionFactory] to required type [javax.jms.ConnectionFactory] for property 'targetConnectionFactory': no matching editors or conversion strategy found at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934) ______________________________________________ It means that I couldn't use TcpConnectionFactory to replace a ConnectionFactory !!! When I see the API of TcpConnectionFactory, it implements well the javax.jms.ConnectionFactory interface. (http://joram.ow2.org/current/javadoc/org/objectweb/joram/client/jms/tcp/TcpConnectionFactory.html) Any suggestions in my case? Thanks ========================================================================= NGUYEN Tien Luong | M2PGI - UFRIMAG 13 Rue Blanche MONIER | Tel : 06.45.42.46.33 38000 GRENOBLE | http://tienluong.info
