Thanks a lot, your answer helped me to understand much better how this xbean
configuration file work.

I've made the change you told me but there was still the same error, so I
replaced the <property> by <constructor-arg>:

<bean id="jmsFactory" class="cgl.narada.jms.JmsTopicConnectionFactory">
            <constructor-arg value="localhost" />
            <constructor-arg value="3045" />
            <constructor-arg value="tcp" />
        </bean> 


The compilation and installation work fine with this xbean, but a new error
appear when i try to activate my SU on ServiceMix. Here is the error:

Caused by: java.lang.AbstractMethodError:
cgl.narada.jms.JmsTopicConnectionFactory.createConnection()Ljavax/jms/Connection;

I looked again at the  http://www.naradabrokering.org/api/
JmsTopicConnectionFactory API , it's true that this class does not implement
the createConnection method but only the createTopicConnection one. That's
strange because this class implement the 
http://java.sun.com/j2ee/1.4/docs/api/javax/jms/ConnectionFactory.html
connectionFactory  interface and should implement this method.

Do you think it's the problem ? And what could I do to fix it ?

Thanks.
Regards,

Arnaud Décolasse


rabi wrote:
> 
> 
> Can you try this....
> 
> <bean id="jmsFactory" class="cgl.narada.jms.JmsTopicConnectionFactory">
>         <property name="hostName" value="localhost" />
>         <property name="portNum" value="3045" />
>         <property name="transportType" value="tcp" />
> </bean> 
> 
> In place of..
> 
>   <bean id="jmsFactory" class="cgl.narada.jms.JmsTopicConnectionFactory">
>     <property name="connectionFactory">
>       <bean class="cgl.narada.jms.JmsTopicConnectionFactory">
>         <property name="brokerURL" value="tcp://localhost:3045" />
>       </bean>
>     </property>
>   </bean>
> 
> Regards,
> Rabi Mishra, 
> http://rabisblog.blogspot.com/
> c++; /* this makes c bigger but returns the old value */ 
> -----Original Message-----
> From: Arnaud Décolasse [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, June 28, 2007 2:21 PM
> To: [email protected]
> Subject: Using jms component with NaradaBrokering
> 
> 
> Good morning,
> 
> I'm trying to connect ServiceMix and NaradaBrokering throught the JMS
> component, my goal is to get in ServiceMix (NM format) the jms messages
> sent into various topic with Narada.
> 
> http://www.naradabrokering.org Narada  is a broker implementing the JMS
> api (but not only), you can find this implementation in this
> http://www.naradabrokering.org/api javadoc  at cgl.narada.jms
> 
> I've taken a look to the configuration instructions of the JMS component
> using ActiveMQ and i tried to adapt it to Narada. Here is the xbean.xml of
> my SU:
> 
> <beans xmlns:jms="http://servicemix.apache.org/jms/1.0";
>        xmlns:e="http://www.edf.fr";>
> 
>     <!-- START SNIPPET: consumer -->
>     <jms:endpoint service="e:EnergyService"
>                   endpoint="energy-jms"
>                   targetService="e:EnergyService"
>                   defaultOperation="e:getData"
>                   role="consumer" 
>                   connectionFactory="#jmsFactory"
>                   destinationStyle="topic"
>                   jmsProviderDestinationName="chatTopic=/Energy/Trame"
>                   />
>                   
>   <bean id="jmsFactory" class="cgl.narada.jms.JmsTopicConnectionFactory">
>     <property name="connectionFactory">
>       <bean class="cgl.narada.jms.JmsTopicConnectionFactory">
>         <property name="brokerURL" value="tcp://localhost:3045" />
>       </bean>
>     </property>
>   </bean>
>     <!-- END SNIPPET: consumer -->
> </beans>
> 
> I've also include the NaradaBrokering.jar whitch contains the
> JmsTopicConnectionFactory to my pom.xml after adding it to my m2rep, here
> are the command and the <dependency> added in the pom:
> 
> mvn install:install-file -Dfile=NaadaBrokering.jar -DgroupId=energy
> -DartifactId=narada -Dversion=2.0.2 -Dpackaging=jar -DgeneratePom=true
> 
> <dependency>
>       <groupId>energy</groupId>
>       <artifactId>narada</artifactId>
>       <version>2.0.2</version>
>       <scope>runtime</scope> 
>     </dependency>
> 
> And here is the error when i'm trying to generate my SU with: mvn -e
> install:
> 
> ...
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Failed to generate jbi.xml
> 
> Embedded error: Unable to generate service unit descriptor!
> cgl.narada.jms.JmsTopicConnectionFactory.<init>()
> 
> ...
> 
> Caused by: org.springframework.beans.BeanInstantiationException: Could not
> instantiate bean class [cgl.narada.jms.JmsTop
> icConnectionFactory]: No default constructor found; nested exception is
> java.lang.NoSuchMethodException: cgl.narada.jms.
> JmsTopicConnectionFactory.<init>()
> 
> 
> I'm not sure about the error. Is my class found or not ? i think yes. Or
> is it beacause my JmsTopicConnectionFactory does not have the good
> constructor.
> Maybe it's in relation with Spring. I have to acknowledge that i do not
> understand well all this concepts. 
> 
> My main question: Is it possible to use Narada with JMS component in a
> simple way as for ActiveMQ ?
> 
> Thanks for helping.
> 
> Arnaud Décolasse
> EDF R&D
> 01 47 65 38 59
> [EMAIL PROTECTED]
> --
> View this message in context:
> http://www.nabble.com/Using-jms-component-with-NaradaBrokering-tf3993210s12049.html#a11339403
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> 
> 
> 
> The information contained in this electronic message and any attachments
> to this message are intended for the exclusive use of the addressee(s) and
> may contain proprietary, confidential or privileged information. If you
> are not the intended recipient, you should not disseminate, distribute or
> copy this e-mail. Please notify the sender immediately and destroy all
> copies of this message and any attachments. 
> 
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses.
> The company accepts no liability for any damage caused by any virus
> transmitted by this email.
>  
> www.wipro.com
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Using-jms-component-with-NaradaBrokering-tf3993210s12049.html#a11343198
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to