Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » JMS Consumer(Jms consumer for refresh table or form)
JMS Consumer [message #1243154] Mon, 10 February 2014 15:41 Go to next message
Nicolas De Amicis is currently offline Nicolas De AmicisFriend
Messages: 19
Registered: February 2014
Junior Member
Hello, I'm beginner with scout and I would use it for a project. I read some topics in this forum and a lot of tutorials.
My question is: it's possible to connect (the server part) to a JMS Topic (like ActiveMQ) for refreshing TableField, PageField and/or a form on receipt message?

I read that it's possible with client notification (client) and I think with a new service on the server part (AbstractJmsConsumerService)? How to use AbstractJmsConsumerService? The wizard propose only attach it to a FormData not with a PageField

Thanks

Nicolas De Amicis
Re: JMS Consumer [message #1243592 is a reply to message #1243154] Tue, 11 February 2014 07:14 Go to previous messageGo to next message
Judith Gull is currently offline Judith GullFriend
Messages: 75
Registered: February 2010
Member
Hi
Yes, this should be possible with client notifications.
service.putNotification(new MyNotification(...

The Scout SDK wizard can create a service with default methods for handling forms. You do not need that for your use case. However, you can have arbitrary methods in your service.

You can create a service extending AbstractJmsConsumerService that processes messages and post a notification:

IClientNotificationService service = SERVICES.getService(IClientNotificationService.class);

On the client side you then need to update the page when a notification is received.

SERVICES.getService(IClientNotificationConsumerService.class).addClientNotificationConsumerListener(...

I hope this helps you start.
Re: JMS Consumer [message #1258511 is a reply to message #1243592] Thu, 27 February 2014 13:07 Go to previous message
Nicolas De Amicis is currently offline Nicolas De AmicisFriend
Messages: 19
Registered: February 2014
Junior Member
Hello, thank you for your answer.

I think I understand the mechanism of Client notification, but I am lost for configuring my Eclipse Scout projet to send and receive JMS messages.

I followed this procedure (www. eclipsezone.com/eclipse/forums/t115159.html) and I downloaded JARs for Eclipse ECP jms provider at this place (download. ecf-project.org/repo/C-HEAD-jms.feature/lastSuccessful/archive/site.p2/plugins/). I added to the server manifest.mf the dependencies (org.eclipse.ecf.provider.jms and org.eclipse.ecf.provider.jms.activemq) and modified the server.product file with the dependencies (org.eclipse.ecf, org.eclipse.ecf.identity, org.eclipse.ecf.provider, org.eclipse.ecf.provider.jms, org.eclipse.ecf.provider.jms.activemq, ...)

I created a Service in the server part that extends AbstractService and I created a test() method.

How to send a message to a queue? I have to use org.eclipse.ecf.provider.jms.channel.AbstractJMSChannel for sending and org.eclipse.ecf.provider.jms.containerAbstractJMSQueueConsumerContainer for receiving messages? These are abstract classes, how to access the implementation classes? I can change the access restriction of the build path? Or there is a standard way for that?

Thanks in advance.

Nicolas De Amicis

PS I don't insert links because I have wrote less than 5 messages on this forum.
Previous Topic:Scout changes its Version Numbering Policy
Next Topic:Multi-Module
Goto Forum:
  


Current Time: Fri Mar 29 14:28:16 GMT 2024

Powered by FUDForum. Page generated in 0.03227 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top