Fórumok

Camel Endpoints And Data Representation

thumbnail
Arko Mahmud, módosítva 10 év-val korábban

Camel Endpoints And Data Representation

Junior Member Bejegyzések: 43 Csatlakozás dátuma: 2013.06.11. Legújabb bejegyzések
Hi
I have a Camel Endpoint from where I get messages, I want to represent data in real time graph. And update Database also using Liferay portlet.
I am new in this area. Could anyone suggest some Liferay way to do it ?

Like Libraries and Technologies I should read about i.......

Thanks In advance...
thumbnail
David H Nebinger, módosítva 10 év-val korábban

RE: Camel Endpoints And Data Representation

Liferay Legend Bejegyzések: 14915 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
I have a similar thing. Camel consumer will invoke SB custom methods to persist data.

The graphing thing will be challenging. You may have 5 users showing the graph, but there will be only a single camel consumer. Depending upon what the graph would contain, you could do the following:

1. custom SB method updates a 'fake entity' to store updated info from each message; graphing is then based on getting the latest info from SB to use in the graph, then you just need to deal w/ the refresh, but it's not real time.

2. 5 portlets create separate destinations in the Liferay Message Bus and register the destination w/ SB code. When SB is processing the save, it pushes a message to each registered destination, 5 portlets get individual messages to use for the display.
thumbnail
Arko Mahmud, módosítva 10 év-val korábban

RE: Camel Endpoints And Data Representation

Junior Member Bejegyzések: 43 Csatlakozás dátuma: 2013.06.11. Legújabb bejegyzések
Hello
Thanks for your reply!
Could you recommend any sample portlet for that ? or similar work ?
I didn't get the Idea of creating 5 portlets. I am sorry But I am new with this technology.

Can I use DWR or comet to publish data ?

Idea is I have a endpoint like this

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<newdata xmlns="..../datameter" xmlns:s12="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wse="http://schemas.xmlsoap.org/ws/2004/08/eventing" DeviceId="Datasource1" Timestamp="2000-01-02T00:17:47.630">
<Profile>1</Profile>
<source ID="Source1">
<data1>4.65</data1>
<data2>0.03</data2>
<data3>0.00</data3>
</source>
<source ID="Source2">
<data1>4.00</data1>
<data2>0.05</data2>
<data3>0.01</data3>
</source>
</newdata>

I want to get the data and represent in real time (or online) may be using highcharts.

Could I get any step by step instruction ?
thumbnail
David H Nebinger, módosítva 10 év-val korábban

RE: Camel Endpoints And Data Representation

Liferay Legend Bejegyzések: 14915 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
No examples or anything, you're off in custom development land...

Portlets are placed on a page, but you have to remember that many users could be looking at the page so you'll have that many instances. No single portlet instance should consume from JMS as that would not allow other instances to see the message and therefore you only get a partial view.

However, using the LMB each instance can register a destination and you can broadcast the one JMS message to all registered destinations. Each portlet instance would receive a copy of the message and can do what it needs to.

So this is all on the server side; to get it to update in the browser you'll need some sort of push technology, any that you're familiar with should work.
thumbnail
Arko Mahmud, módosítva 10 év-val korábban

RE: Camel Endpoints And Data Representation

Junior Member Bejegyzések: 43 Csatlakozás dátuma: 2013.06.11. Legújabb bejegyzések
hello David
At last I managed to make, Camel endpoint and also started receiving message there. Everything works fine. But the problem is when I try to stop the server, I get following warnings, and server doesn't stop... Just pause at the last line. Do you have any idea why it is happening ?
Thanks for your answer in advance !

SEVERE: The web application [/StreamLive-portlet] appears to have started a thread named [CamelJettyClient(0x1bf031b)-80] but has failed to stop it. This is very likely to create a memory leak.
25.9.2013 10:11:33 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/StreamLive-portlet] appears to have started a thread named [CamelJettyClient(0x1bf031b)-81] but has failed to stop it. This is very likely to create a memory leak.
25.9.2013 10:11:33 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/StreamLive-portlet] appears to have started a thread named [CamelJettyClient(0x1bf031b)-82] but has failed to stop it. This is very likely to create a memory leak.
25.9.2013 10:11:33 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/StreamLive-portlet] appears to have started a thread named [CamelJettyClient(0x1bf031b)-83] but has failed to stop it. This is very likely to create a memory leak.
25.9.2013 10:11:33 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/StreamLive-portlet] appears to have started a thread named [CamelJettyClient(0x1bf031b)-84] but has failed to stop it. This is very likely to create a memory leak.
25.9.2013 10:11:33 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/StreamLive-portlet] appears to have started a thread named [CamelJettyClient(0x1bf031b)-85] but has failed to stop it. This is very likely to create a memory leak.
25.9.2013 10:11:33 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/StreamLive-portlet] appears to have started a thread named [CamelJettyClient(0x1bf031b)-86] but has failed to stop it. This is very likely to create a memory leak.
25.9.2013 10:11:33 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/StreamLive-portlet] appears to have started a thread named [CamelJettyClient(0x1bf031b)-87] but has failed to stop it. This is very likely to create a memory leak.
25.9.2013 10:11:33 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/StreamLive-portlet] appears to have started a thread named [qtp28952668-88 Selector0] but has failed to stop it. This is very likely to create a memory leak.
25.9.2013 10:11:33 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/StreamLive-portlet] appears to have started a thread named [qtp28952668-89 Acceptor0 SelectChannelConnector@192.168.1.168:1989] but has failed to stop it. This is very likely to create a memory leak.
25.9.2013 10:11:33 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/StreamLive-portlet] appears to have started a thread named [qtp28952668-90] but has failed to stop it. This is very likely to create a memory leak.
25.9.2013 10:11:33 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/StreamLive-portlet] appears to have started a thread named [qtp28952668-91] but has failed to stop it. This is very likely to create a memory leak.
25.9.2013 10:11:33 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/StreamLive-portlet] appears to have started a thread named [qtp28952668-92] but has failed to stop it. This is very likely to create a memory leak.
25.9.2013 10:11:33 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/StreamLive-portlet] appears to have started a thread named [qtp28952668-93] but has failed to stop it. This is very likely to create a memory leak.
25.9.2013 10:11:33 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/StreamLive-portlet] appears to have started a thread named [qtp28952668-94] but has failed to stop it. This is very likely to create a memory leak.
25.9.2013 10:11:33 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/StreamLive-portlet] appears to have started a thread named [qtp28952668-95] but has failed to stop it. This is very likely to create a memory leak.
25.9.2013 10:11:33 org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/StreamLive-portlet] appears to have started a thread named [Camel (camel-1) thread #0 - ManagementLoadTask] but has failed to stop it. This is very likely to create a memory leak.
25.9.2013 10:11:34 org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-8080"]
25.9.2013 10:11:34 org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
25.9.2013 10:11:34 org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8080"]
25.9.2013 10:11:34 org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-bio-8009"]
thumbnail
David H Nebinger, módosítva 10 év-val korábban

RE: Camel Endpoints And Data Representation

Liferay Legend Bejegyzések: 14915 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
Yep, you'll need to trap the destroy method of your portlet to shut down camel cleanly.
thumbnail
Arko Mahmud, módosítva 10 év-val korábban

RE: Camel Endpoints And Data Representation

Junior Member Bejegyzések: 43 Csatlakozás dátuma: 2013.06.11. Legújabb bejegyzések
Thanks for your all your support emoticon
It works Now emoticon
I feel, I am becoming a Liferay Developer emoticon