Well, my efforts to get all the parts working have failed to achieve the 
desired results.  
Here's what's happening:

My Manager class gets loaded when the server starts up.  

It spawns a thread for each report in the database.

Each thread launches an instance of the flex charting app.

Now here is where is breaks down...

Previously, I had the thread broadcast every few minutes the new data (these 
are historical 
charts), but since I only had one channel and channels are defined in the 
config files, I saw 
no way to couple each Thread's sendMessages to that specific instance of the 
flex app.

So I thought I'd try Remoting.  I told the flex app the reportID it was 
associated with and 
then it would call the Manager class which would look for the Thread serving 
that report 
and return the results.  But the RemoteObject just creates a new instance of 
the Manager 
class each time it calls the Manager's getReportData method.  So the Threads I 
initialized 
on startup never get used and the call to the RemoteObject by flex has no 
threads running 
in it, so it returns a null data set....

How do I get this working?  Are channels the way to go?  Remoting?  Something 
else?  

--- In flexcoders@yahoogroups.com, "gjessup1" <[EMAIL PROTECTED]> wrote:
>
> Should work...no problem. I guess you would just have each different
> chart invoking a different remote method, or at least handling the
> results differently. No reason that should not work at all.
> 
> Each time the page is loaded and a chart is selected, it creates a
> seperate instance, and each instance invokes the method
> seperately...so yes, seperate threads.
> 
> Seems like a fine approach to me. Unless you are going to have some
> huge number of users..then you may want to involve a queue to cache
> changes, but current approach seems good to start with.
> 
> 
> 
> 
> --- In flexcoders@yahoogroups.com, "netdeep" <deepnet@> wrote:
> >
> > Here is a diagram of what the program needs to do:
> > 
> > 
> > Database
> >    /\
> >     |
> >     |
> >    \/
> > Manager.java queries database
> > (for each Report in Database spawn Thread)
> >     | 
> >     |
> >    \/
> > Thread to queries database every X sec/min/hrs to get new data for chart
> > (thread launches Flex RIA report frontend)
> >     |
> >     |
> >    \/
> > Flex app subscribes to Thread as consumer to listen for new data to
> draw chart
> > to messages from ONLY that thread.
> > 
> > 
> > The desired effect is that the user could go to a master web portal
> and select which report he wants to see.   This web portal serves 
> > up whatever chart the user requests in a separate web page.
> > 
> > Maybe my approach is off, but that's how I've been coming at it so far.
> > 
> > Thanks for any help you can offer.
> >
>



Reply via email to