I have installed Rifidi edge server (open source RFID middleware provide services as osgi bundles) on windows7 and I am trying to develop a java application to connect and read data from edge server.
1) Firstly I used Spring with following code to get JMS ConnectionFactory object which I am getting in my application successfully but it gives exception on creating JMS Session and I dont know how to create JMS Topic object.
<bean id="connectionFactory" class="org.apache.activemq.spring.ActiveMQConnectionFactory">
<property name ="brokerURL" value="tcp://localhost:1099"/>
<property name="useAsyncSend" value="true"/>
</bean>
2) Secondly I use Eclipse IDE to create an OSGi bundle having following code and deploy it in Rifidi Edge Server, I am getting JMS ConnectionFactory object and JMS Session object but dont know how to get JMS Topic (Destination) object.
<bean id="connectionFactory" class="org.apache.activemq.spring.ActiveMQConnectionFactory">
<property name ="brokerURL" value="vm://externalBroker"/>
<property name="useAsyncSend" value="true"/>
</bean>
To create JMS Topic object I need
<bean id="topic" class="org.apache.activemq.command.ActiveMQTopic">
<constructor-arg value="?"/>
</bean>
But what to write in place of "?" as nothing is given on the Rifidi site.
3) Then I created an OSGi bundle with code as given on http://wiki.rifidi.net/index.php?title=EdgeServerJMS and deploy it on Rifidi edge Server , it is not working.
<bean id="jmsContainer"
class="org.springframework.jms.listener.SimpleMessageListenerContainer">
<property name="autoStartup" value="true" />
<property name="connectionFactory" ref="confac" />
<property name="destination" ref="internalMB" />
<property name="messageListener" ref="myMessageListener" />
<property name="acceptMessagesWhileStopping" value="true" />
</bean>
<osgi:reference id="confac" interface="javax.jms.ConnectionFactory" bean- name="internalBrokerConFac" />
<osgi:reference id="internalMB" interface="javax.jms.Topic" bean-name="internalDest" />
<bean id="myMessageListener" class="org.myapp.JMSConsumer"/>
It is not working when I am using these lines
<osgi:reference id="confac" interface="javax.jms.ConnectionFactory" bean-name="internalBrokerConFac" />
<osgi:reference id="internalMB" interface="javax.jms.Topic" bean-name="internalDest" />
I am not getting any error message.I expect to get POJO provided by Rifidi Edge Server using osgi:reference tag in spring xml. But on doing this my Osgi Bundle is not reading xml. I am exactly following these links wiki.rifidi.net/index.php?title=Edge_Server_Architecture wiki.rifidi.net/index.php?title=EdgeServerJMS to access services of rifidi edge server.
I have created & exported my own service in OSGI bundle & accessing it from another OSGI bundle using osgi:reference... tag in spring xml, Bundle is reading xml & I am getting object from exported service easily.But when I am trying to access services exported by Rifidi edge server,my bundle is not reading xml.