Flex and JMS: Portfolio Viewer (Updated for Flex 2 GA)

As you already know, Flex 2 is now available. So, it’s time to post the upgraded version of some of the demos I built during the beta… starting with the portfolio viewer which had generated some good feedback.

portfolio.jpg

The portfolio viewer is an example of a real time market data application. It uses the Flex Data Services to push data to the client. At the server-side, a Java application publishes a data feed to a JMS topic. The Flex client subscribes to that topic and displays the data in a DataGrid and in a Line Chart that are both updated in real time. Read my original post here.

  • Run the application (NOTE: Since my host doesn’t provide JMS hosting, this version simulates data at the client-side). View Source is enabled: right click the application and select View Source to look at the source code.
  • Download the full JMS version of the application (Flex code + Java code). This version requires the Flex Data Services. See the included readme.txt file for deployment instructions. If you just want to demonstrate the concept without installing FDS, run portfolio.mxml. For the full version, run portfoliojms.mxml.

If you tried the application during the beta, make sure you check out this version which includes some nice performance improvements.

UPDATE (1/12/2007): I put together a Tomcat-based Test Drive Server that includes an improved version of this sample running out-of-the box. Read this post for more info. The improved version uses the Java API directly (no JMS), and uses subtopics to allow users to subscribe to the stocks they are interested in.

  • Digg
  • del.icio.us
  • Facebook
  • Google
  • description
  • LinkedIn
  • Pownce
  • Slashdot
  • StumbleUpon
  • Technorati
  • TwitThis

97 Comments

  1. Sun Says:

    Hi,
    I am new to flex, this particular sample of yours has created very much interest in flex. My manager wants me look into flex and create proof of concept. We also have a similar application but we display metadata. I just wanted to convert our current application and show it him so that he can find the advantages of flex.

    I was going through your sample, i couldn’t find the flex jms client file. Can you direct me.

    Thank you

    Sun

  2. christophe Says:

    Sun,
    Download portfolio.zip. The JMS client is portfoliojms.mxml in that zip file.
    Christophe

  3. pitoouogm Says:

    onipvvbqm…

    hmednpa wizxzqkk ysbzvogvs…

  4. Amit Says:

    Would Flex Messaging/JMS approach be an overkill for displaying market picture with real time feed? Some of my co-workers think that its better to use a webservice to display real time market picture. I don’t know how is it possible to display real time feeds using webservice (kind of new to this game). Is XMLSocket an option?

    Please advice.

  5. this is a brilliant application.
    i am trying to create something similar hope i get some good pointers from your code.

    thanks a ton

  6. Patrick Garner Says:

    In the example (testdrive) application, when I make a request against it I get an empty Flash screen. I get a similar result when I make a request against the portfolio viewer sample (http://coenraets.org/blog/2006/06/flex-and-jms-portfolio-viewer-updated-for-flex-2-ga). It’s as though I don’t have the correct version of Flash client installed on my workstation. Help! Note that I develop in a Linux environment and therefore am unable to install the latest/greatest version of Flash.

  7. Jeroen van Vianen Says:

    Nice example, but do you have a working JMS powered version in Tomcat, preferably with ActiveMQ?

    In my own app I am able to connect to a JNDI ActiveMQ JMS broker, send JMS messages to it with a stand-alone Java app, also able to subscribe to the JMS Topic in MXML, but it seems the Topic FDS subscribes to is another one than the one I’m publishing to, so the messages I send server-side will not be shown on the client-side. It seems I’m unable to specify the correct Topic JNDI name. Any clue?

    Thanks,

    Jeroen

  8. Lucas Says:

    I’m new at flex and i’m currently freaking out because I can’t find a way to remove the grid lines from my flex charts. Any help would be welcome:)
    Thanks,
    Lucas

  9. yqsong Says:

    Nice example,
    I’m new at flex and i have a new question about this example.
    Hot to send messages from Server-Side Java Code with Subtopic?
    Thank you for reply.

  10. Pereira Says:

    Hei. I’ve based my self in this example to create a sparkline. I’ve also created a custom renderer (in AS) do add a label into a plotseries, my question is if it’s possible to pass to the renderer class some arguments, that not the datapoint that i’m rendering. In a few words, my questions are:

    1.how can i pass arguments to a renderer class?

    (public class MinValueLabeledRenderer extends UIComponent implements IDataRenderer)

    2.how can i set a renderer using AS code, without the need to use de itemRenderer=”bla.bla.blaRenderer” from MXML?

    Thans for reply.

  11. Grayson Pierce Says:

    Christophe,

    Very nice work!

    Any way of not spiking the CPU quite as much (on my machine it’s at 60% constantly)? other than the obvious of “slow down the data”

    GP

  12. anoyn Says:

    The link inside the article does not work

    http://coenraets.com/viewarticle.jsp?articleId=102

  13. Marsha Says:

    Nice page greetings to all in this guestbook!

  14. Shannon Says:

    Hi! Your site is very nice!

  15. link ekle Says:

    In the example above, the page header and intro text prints. I’m trying to suppress that as well.

  16. Clyde Says:

    Hi there! Just couldn’t resist your guestbook! Please visit my homepage:

  17. Shirley Says:

    I’m glad I found your site! It’s nice! Please also visit my site:

  18. Katrina Says:

    Nice page greetings to all in this guestbook! Please visit my homepage too:

  19. robotraff Says:

    Traffic – the current of visitors web-site.
    Robotraff.com is automatics selling system of traffic
    Only at us, You may choose country, categories and browsers version (for advanced). If you choose the traffic for buy then you must fill the order form at menu “Traffic panel”( You must resisted) and pay your order. (we accept more 15th electronic currency). After order is paid, you receive a special web links where you may watch a statistics of order. Customer, please pay attention minimal one order was been 1000 unique visitors (UV).
    Also You may view a detail information (menu Statistics on left) about the traffic.
    robotraff.com

  20. John Says:

    Z9daOC bhsdrjkvbfjksbhfsvkbdhfkv

  21. rxdrugsaaa Says:

    Hi!
    Order soma, viagra, fioricet, tramadol, prozac, cialis,
    propecia at low price. No Prior Prescription Required!!
    US Based Pharmacy, US Licensed Doctors, Free Online
    Consultation. Order drugs online!!

  22. rxdrugsaab Says:

    Hi!
    Order soma, viagra, fioricet, tramadol, prozac, cialis,
    propecia at low price. No Prior Prescription Required!!
    US Based Pharmacy, US Licensed Doctors, Free Online
    Consultation. Order drugs online!!

  23. goggle Says:

    Grande sito!!

  24. TestName Says:

    Test myfunction comment

  25. xfsnqeevkn Says:

    Hello! Good Site! Thanks you! hfqfbghjfpq

  26. Senqakkk Says:

    Thank you!
    san diego breast augmentation san diego breast augmentation

  27. Homer Says:

    haven’t much done I today. gotten ,

  28. Vince Marco Says:

    I’m interested in how you simulated the JMS messages on the client side. Any chance of a link to that code? Also, is there any way to code a Flex-based JMS client, without requiring the Flex Data Service?

  29. Children in … fill in the nation of your choice … are living better

  30. jonnyoiu Says:

    Anyone tried nvest free money into real estate property?
    I guess investment into real estate property can be the best investment in your life. Real estate is good because it is like gold.

  31. Megan Says:

    been recently. unremarkable My completely life’s ,

  32. Gerry Says:

    less happening or much these days. not More ,

  33. Daisy Says:

    Basically doing. worth seems nothing ,

  34. Ester Says:

    worth thinking Nothing about. seems ,

  35. Tegan Says:

    Today was but total shrug. loss, a ,

  36. Belva Says:

    been haven’t much. to up I ,

  37. Xenia Says:

    mind my now. Not on right much ,

  38. Erick Says:

    a was complete loss. Today ,

  39. Elvin Says:

    have just don’t say I to anything lately. ,

  40. Ilene Says:

    letting everything by. been just me I’ve pass ,

  41. hiutopor Says:

    Hi all!

    Very interesting information! Thanks!

    Bye

  42. Gqraoxox Says:

    nicotine valium vicodin marijuana ecstacy and alcohol
    nicotine valium vicodin marijuana ecstacy and alcohol

  43. Hi Christophe,
    I have been trying to connect to a WebLogic JMS Queue using Adobe Flex 2.0.1 and Adobe Livecycle Data Services. I am able to connect to a WebLogic Topic without any problem. However, for some reason, flex is not able to get messages from a WebLogic JMS Queue. I have gone through the documentation (http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Parts&file=messaging_config_103_08.html). The documentation is also light on JMS Queues.

    Do I have to do anything different from connecting to a Topic to connect to a Queue?

  44. uhsoftcd Says:

    Thanks to Oprah, Obama camp claims biggest crowd yet

  45. rzsoftke Says:

    Lafarge to buy Orascom Cement for $12.8 bln link

  46. secretboy Says:

    nice posts.your blog is very informative.

  47. Simon Says:

    I need lot of free porn video, sexy girls fucking video / movies clips for mobile . 2 to 5 minutes downloadable clips. it will be full free ..

  48. TomasKell Says:

    Hello webmaster, very nice site here, great work!
    TomasKell

  49. Dolby ac3 2000 codec….

    Codec video. Codec. Codec and format comparison. 640 x 480 codec. 123 codec. Winamp wma codec….

  50. Crystal Says:

    Hi,
    I’m Crystal. I’m new in Flex and BlazeDS technology. Messaging is quite interesting. I would like to run the example you given. But I need some information from you.
    To run the portfolio, it require a JRun integrated server. Where I can get it??
    Or if I already have JRun in my computer, I have to configure the JMS topic (DashboardFeed) with a JNDI name of jms/topic/flex/dashboard_feed in the jrun-resources.xml right?? Can you give me the details inside the and tags??
    The details have to include inside the existing tag or create a new tag ?

    Looking forward to your help. Thank you and advanced.

    =Crystal=

  51. [...] Coenraets Flex and JMS: Portfolio Viewer (LCDS jRun) 30 Minutes Flex Test-Drive for Java Developers [...]

  52. sohbet Says:

    been recently. unremarkable My completely life’s …

  53. çet Says:

    Codec video. Codec. Codec and format comparison. 640 x 480 codec. 123 codec. Winamp wma codec….

  54. mirc Says:

    great working thank you

  55. webmaster Says:

    very nice site here, great work

  56. Vicky Says:

    Hi

    Can we make this application to use Webservices for realtime update? My requirement is to show Market Depth (Best 5 Bids and Best 5 Offers). Can you give me your email address to contact?

    Thanks
    Vicky

  57. batman Says:

    very nice site here
    thank you

  58. [...] Christophe Coenraets :: Flex and JMS: Portfolio Viewer :: More info [...]

  59. [...] :: Is2 Quickbooks Web Client :: More info Christophe Coenraets :: Flex and JMS: Portfolio Viewer :: More info Christophe Coenraets :: Google Maps Collaboration using Flex, Flash Media Server and AJAX Coker [...]

  60. [...] :: Amazon/Library mashup :: More info · Christophe Coenraets :: Flex and JMS: Portfolio Viewer :: More info · Christophe Coenraets :: Google Maps Collaboration using Flex, Flash Media Server and Ajax · [...]

  61. [...] :: Installing FDS with JBoss and IIS JMS Christophe Coenraets :: Flex and JMS: Portfolio Viewer :: More info Jove Shi :: Use Flex Message Service with JBoss JRun Jared Rypka-Hauer :: Get Flex to Use the JRun [...]

  62. anil4it Says:

    [...] :: Is2 Quickbooks Web Client :: More info Christophe Coenraets :: Flex and JMS: Portfolio Viewer :: More info Christophe Coenraets :: Google Maps Collaboration using Flex, Flash Media Server and AJAX Coker [...]

  63. [...] :: Installing FDS with JBoss and IIS JMS Christophe Coenraets :: Flex and JMS: Portfolio Viewer :: More info Jove Shi :: Use Flex Message Service with JBoss JRun Jared Rypka-Hauer :: Get Flex to Use the JRun [...]

  64. [...] Christophe Coenraets :: Flex and JMS: Portfolio Viewer :: More info [...]

  65. [...] Christophe Coenraets :: Flex and JMS: Portfolio Viewer :: More info [...]

  66. [...] Christophe Coenraets :: Flex and JMS: Portfolio Viewer :: More info [...]

  67. [...] Christophe Coenraets :: Flex and JMS: Portfolio Viewer :: More info [...]

  68. [...] · Christophe Coenraets :: Flex and JMS: Portfolio Viewer :: More info [...]

  69. [...] :: Amazon/Library mashup :: More info · Christophe Coenraets :: Flex and JMS: Portfolio Viewer :: More info · Christophe Coenraets :: Google Maps Collaboration using Flex, Flash Media Server and Ajax · [...]

  70. [...] :: Amazon/Library mashup :: More info · Christophe Coenraets :: Flex and JMS: Portfolio Viewer :: More info · Christophe Coenraets :: Google Maps Collaboration using Flex, Flash Media Server and Ajax · [...]

  71. [...] :: Installing FDS with JBoss and IIS JMS Christophe Coenraets :: Flex and JMS: Portfolio Viewer :: More info Jove Shi :: Use Flex Message Service with JBoss JRun Jared Rypka-Hauer :: Get Flex to Use the JRun [...]

  72. [...] :: Is2 Quickbooks Web Client :: More info Christophe Coenraets :: Flex and JMS: Portfolio Viewer :: More info Christophe Coenraets :: Google Maps Collaboration using Flex, Flash Media Server and AJAX Coker [...]

  73. [...] :: Is2 Quickbooks Web Client :: More info Christophe Coenraets :: Flex and JMS: Portfolio Viewer :: More info Christophe Coenraets :: Google Maps Collaboration using Flex, Flash Media Server and AJAX Coker [...]

  74. [...] Christophe Coenraets :: Flex and JMS: Portfolio Viewer :: More info [...]

  75. [...] Christophe Coenraets :: Flex and JMS: Portfolio Viewer :: More info [...]

  76. [...] :: Is2 Quickbooks Web Client :: More info Christophe Coenraets :: Flex and JMS: Portfolio Viewer :: More info Christophe Coenraets :: Google Maps Collaboration using Flex, Flash Media Server and AJAX Coker [...]

Leave a Comment