Re: [flexcoders] Re: Loading animation between LCDS page fetched

2010-07-08 Thread Jeffrey Vroom
Depending on your use case, you may not see that error.   If you are
scrolling through a list or grid, it gets caught and handled by the
DataGrid.

My memory on this is a little hazy now but I think you can listen to events
on the DataService and see all of the traffic from the data service to the
server.   You'll see events of type "page" or "page_items" come through
which indicate the start of a page operation.   Keep count of them and
display your busy cursor when the count goes from 0-1.   I am forgetting
exactly how you get the responder/call for when those events complete (to
decrement the outstanding count) but I think it's accessible off of that
event or maybe you listen for result events?   Hope this helps.

Jeff

On Thu, Jul 8, 2010 at 9:32 AM, Aasim  wrote:

>
>
> I think i found the answer, need to look at the ItemPendingError
>
> -Aasim
>
>
> --- In flexcoders@yahoogroups.com , "Aasim"
>  wrote:
> >
> > Hi,
> >
> > I need to show a loading animation while scrolling in a LCDS paging
> enabled datagrid. Is there a way to know when a new page is requested in
> flex while scrolling? and when data is returned back?
> >
> > Regards,
> > Aasim
> >
>
>  
>


Re: [flexcoders] Re: Flex 4....Large recordset...how much is too much?

2010-03-14 Thread Jeffrey Vroom
Back when I was at Adobe, I had a demo which did paging with 60K records in
the query being scrolled.   It probably could have done more if I tried
since it was doing everything incrementally, though I'll admit the
experience was not perfect, particularly if you moved the thumb too quickly.

This was using the DataService with LCDS on the backend but it would be the
same client code with "client data management" in flex builder.

There were some tricks to deal with the big data sets:
   - paging automatically pages in objects but never releases the paged in
objects by default.  You can add this manually with the
releaseItemsFromCollection method.  You put this into a scroll event
handler, periodically (but not too often) releasing any invisible data.
   - keeping the page request queue from getting too large.   This was one
problem I never solved completely... as you move the thumb, the data grid
can request pages faster than they can be filled/released.   There should be
a way to either limit the page requests or keep them in a queue that can be
flushed if you call the release method.

I did a quick google search on "releaseItemsFromCollection" and it looks
like the code from my demo made it into the LCDS docs.  Not sure that even
with this call it will do what you want but without that release call, the
automatic paging stuff would eventually just keel-over from having too much
in-memory.  If that seems like the major problem, it might be worth trying
it out.

Jeff

On Sun, Mar 14, 2010 at 11:28 AM, iloveyouwisconsin <
iloveyouwiscon...@yahoo.com> wrote:

>
>
> Maybe I'll have to wait until Flex 7 (or later) 'til they truly make flex
> able to handle large datasets smoothly. (I guess I'll also have to advise
> those at Adobe and the flex evangelists that what they define as a "large"
> dataset isn't large in practice. They probably need to moonlight as interns
> for a few of their customers to snapback into reality. There's no company in
> the real world that would define a large dataset as only a few thousand
> items)
>
> --- In flexcoders@yahoogroups.com ,
> "iloveyouwisconsin"  wrote:
> >
> > How many records is considered "too large" for a datagrid to handle? I am
> using Flex 4 with Zend AMF & paging enabled. When I google it the topic,
> most seem to think that a "few thousand" is large, but that doesn't seem
> hardly anything to me. I thought Zend would do the trick but it isn't
> anywhere near what I need. My 15 million records didn't go over too well (I
> can use the scroll wheel on my mouse to scroll through the records but it
> kept crashing when I tried to use the scrollbar on the datagrid to jump
> around). I ask because I don't want to have to jimmy around with code until
> I'm blue in the face trying to find something flex can handle. Can I do 1
> million? 5,000? 500,000? I just want to be able to let users play around w/
> the scrollbar on the datagrid without it crashing, is all (though I realize
> that the user's machine will play a big factor in performance. All of my
> users have computers that are no more than a couple yrs old)
> >
> > I also ask because I am sure others would like to know for their
> projectsis there a more efficient way to get the data than Zend, like
> Livecycle or Coldfusion? I am willing to switch the backend up a bit in
> order to increase performance of my app.
> >
> >
> > many thanks!
> >
>
>  
>


Re: [flexcoders] Re: LCDS: Problem with destination inheritance

2010-02-24 Thread Jeffrey Vroom
Hi Kevin,

On your specific bug, the bug below where this error occurred improperly was
fixed before I left Adobe.   It could be a simple problem in your
configuration or code.   When you use sub-types in Java with hibernate and
LCDS, you need a corresponding type hierarchy of ActionScript classes.   If
Foo extends Bar in Java and both are hibernate model classes, you need a
Foo.as which has its remoteClass alias set to Foo.java and similar for Bar.
  You might also check the XML downloaded from the server at the time this
error occurs.  It is in flex.messaging.config.ServerConfig.xml (a static
property).   If you dump that out you should see destinations which match up
with the type hierarchy for your model.

Jeff

On Wed, Feb 24, 2010 at 7:26 AM, Jeff  wrote:

>
>
> I am running into this same problem below with a fill command. (Error: "but
> we could not find a destination in the list of sub-types"). Any thoughts on
> a workaround for just a simple fill of an extended destination?
>
> I must admit my frustration with LCDS is growing especially considering the
> recent change of licensing for LCDS 3. I have not had any luck with Adobe's
> very expensive paid support so continuing to dump money into their
> licenses/support seem futile. I am wondering if now is the time to migrate
> to another solution.
>
> Has anyone had better luck with WebOrb, GraniteDS or Blaze in terms of
> ease-of-use and community support? I primarily need Hibernate integration
> and real-time data push.
>
> Thanks for the help and advice,
>
> Kevin
>
> --- In flexcoders@yahoogroups.com ,
> "gordon_greg"  wrote:
> >
> > Hi Jeff,
> >
> > Thanks for the usual quick response, the workaround is fine for the
> > time being, looking forward to the update release.
> >
> > greg
> >
> > --- In flexcoders@yahoogroups.com , Jeff
> Vroom  wrote:
> > >
> > > Hi Greg,
> > >
> > > Yeah, thanks for sending this as it did uncover an LC DS bug. It
> > occurs with the combination of the "deleteItem" and the commit(item)
> > or commit([item]) case. The code is trying to look up the DataService
> > associated with the item in the argument... to do that we look in the
> > cache for each item. We can't find it (since it has been deleted) and
> > the code is improperly returning the last data service in the list.
> > So when it works, it is because the list of data services is generated
> > in some particularly lucky order.
> > >
> > > If you can commit everything - not just that item, that would be an
> > easy workaround though most likely you are using that variant of
> > commit for a reason.
> > >
> > > I'll contact you off-list to get you a patched fds.swc to try out
> > the fix. For your reference, the bug number I filed is:
> > >
> > > https://bugs.adobe.com/jira/browse/LCDS-351
> > >
> > > Jeff
> > >
> > >
> > > From: flexcoders@yahoogroups.com [mailto:
> flexcoders@yahoogroups.com ]
> > On Behalf Of gordon_greg
> > > Sent: Thursday, July 03, 2008 12:53 PM
> > > To: flexcoders@yahoogroups.com 
> > > Subject: [flexcoders] LCDS: Problem with destination inheritance
> > >
> > >
> > > Hello,
> > >
> > > I'm using the latest LCDS 2.6.RC1 with the HibernateAssembler and a
> > > non-trivial data model that relies upon destination inheritance in a
> > > few places.
> > >
> > > In general everything works great, but occasionally, when I remove an
> > > element from a collection using dataService.deleteItem, when I then
> > > call dataService.commit, I end up with an exception that indicates
> > > that the wrong destination is being invoked...
> > >
> > > For our purposes, let's just deal with 4 destinations:
> > >
> > > Folder
> > > ResourceFolder (extends folder)
> > > Meeting
> > > MeetingParticipant (is a many-to-one child of Meeting)
> > >
> > > Now, if I call:
> > >
> > > meetingParticipantDataService.deleteItem(meetingParticipant);
> > >
> > > meetingParticipantDataService.commit([meetingParticipant],true);
> > >
> > > I end up with the following exception:
> > >
> > > == begin exception 
> > >
> > > Error: Destination: spring.folder received an instance of class:
> > > demo.model.meetings::MeetingParticipant but we could not find a
> > > destination in the list of sub-types: spring.resourceFolder which
> > > extends this destination.
> > > at
> > >
> > mx.data::ConcreteDataService/
> http://www.adobe.com/2006/flex/mx/internal::getDestinationForInstance
> ()[C:\depot\flex\branches\enterprise_corfu_rc\frameworks\projects\data\src\mx\data\ConcreteDataService.as:5309]
> > > at
> > >
> > mx.data::ConcreteDataService/
> http://www.adobe.com/2006/flex/mx/internal::getItemDestination
> ()[C:\depot\flex\branches\enterprise_corfu_rc\frameworks\projects\data\src\mx\data\ConcreteDataService.as:5290]
> > > at
> > >
> > mx.data::ConcreteDataService/
> http://www.adobe.com/2006/flex/mx/internal::getItemMetadata
> ()[C:\depot\flex\branches\enterprise_corfu_rc\frameworks\projects\data\src\mx\data\ConcreteDataService.as:5275]
> > > at
> > >

Re: [flexcoders] Flex and LCDS - Cannot Remove Client?

2010-02-23 Thread Jeffrey Vroom
LCDS maintains several data structures on the server to track clients using
the messaging system.   The standard HttpSession is kept by the app server
using the cookie.  The FlexClient is associated with an individual Flash
player instance.  Each subscription has a corresponding MessageClient to
track that subscription.   I think this error occurs when the client is
trying to send a message to the server to clean up that flex client data
structure.   It might be occurring though when a session is expiring or
something.  I'd expect to see this type of thing if you restart a server or
are using non-sticky load balancing - so the HttpSession and FlexClient
states get out of sync.  It may well not be a problem but might cause a
memory leak or something like that.

If you want to track it down further, turning on the debug logs for some of
the categories would show you the context in which it is happening.

Jeff

On Mon, Feb 22, 2010 at 7:04 PM, headj...@bellsouth.net <
headj...@bellsouth.net> wrote:

>
>
> I am using Flex 3.4/Hibernate/ and LCDS 2.6 with polling AMF running on
> Tomcat 5.5 The application works fine, but occasionally I get a message in
> the logs that says "[ERROR] [Service.Message] Failed to remove client:
> 884EDC33-A098-231E-44AD-F76A5A6E1A76}" . (The session ID changes obviously.)
>
> I've looked for information on this message in an attempt to diagnose what
> it is, but haven't found anything on it. Has anyone else run into this
> message or does anyone know anything about what this means?
>
> I'm also wondering if this might have something to due with network
> performance. Does anyone have any pointers for tuning and setting
> parameters? This is not a large application, but our network does suffer
> from some congestion issues and RTMP is not an option due to firewalls.
> Could that message above be related to poor network performance?
>
> Disclaimer: I'm new to LCDS, so bear with me!
>
> Thanks,
> JB
>
>  
>


Re: [flexcoders] LCDS Deleting offline data cache

2010-02-10 Thread Jeffrey Vroom
I've been away from the code a while and so can't remember exactly but one
thing you'd have to do to get that to work is to compile in your
services-config.xml into your client app.

The offline data store contains the names of the data services id
properties, associations etc. when the application does not have it compiled
into directly.  Without that info, LCDS does not know what destinations are
there, the id properties etc. and so cannot even initialize without any
data.

When you use the new hibernate assembler, it's default behavior is to
generate the id properties and associations (the stuff that you'd normally
put into services config.xml manually) from hibernate's configuration which
means it just is not available to the compiler.   it's always downloaded at
connect time and LCDS is not really working until that happens.

As I recall, there is supposed to be some event or error or something that
is thrown when this happens so that you could catch that and at least report
that they need to connect.  Turning on the debug log on the client would be
the quickest way to see what is happening.

There is probably a way you could hack the ServicesConfig.xml static
property to avoid this altogether - i.e. just set it to some hard-coded
string that you squirrel away from a system which did initialize itself
properly.   Just make sure to set it before you try to initialize the data
service and it will act like it was compiled in.

Jeff

On Wed, Feb 10, 2010 at 1:56 PM, Dennis  wrote:

>
>
> If a user deletes the offline cache of an Air app then starts up the app in
> offline mode what is the expected behaviour results from a fill request? On
> my local setup, the callbacks bound to the token from my fill request are
> not called and the app waits indefinitely. I expect an empty fill result
> list similar to what would happen when you make a offline request that was
> never cached.
>
> I could write some custom code to return empty lists when the sqllite db
> file does not exist, but i'm thinking there is a nicer and built in way of
> doing this. Any suggestions?
>
> Dennis
>
>  
>


Re: [flexcoders] LCDS Offline Synchronization

2010-02-09 Thread Jeffrey Vroom
It sounds to me like you are just not getting that particular DataService
connected before you do the fill.   There is a DataService.connect method if
I recall correctly that might help.  I don't think you get
commitRequired=true when the app is in a disconnected state.  The fill will
auto-connect before it runs so that would explain why it is initializing the
data store.

The reconnect policy setting is set by default from the server
configuration.  I think there is an api on the client which also sets it
though, probably on the DataStore property of the DataService..   note that
there is also a "refresh" operation on the DataService client which
essentially does the same thing only manually.

It sounds to me like when you are calling fill, it reconnects which then
refreshes that fill as per the reconnect policy, then you do the fill again
so it happens twice.  If you just call "connect", you can avoid that extra
fill call altogether.

Jeff

On Tue, Feb 9, 2010 at 10:07 AM, Dennis  wrote:

>
>
> I want to determine if the following offline synchronization behaviour is
> by design or a result of some improper LCDS config or client code.
>
> Scenario:
> After committing a change to the offline cache, I see the "commitRequire"
> flag on the DataStore is set as true and I save the offline cache. Next, I
> close the app, start up my server and restart the app expect the offline
> data to by synchronized.
>
> On application restart one thing I noticed is that on initialization of the
> DataService and DataStore, the "commitRequire" is false even though the
> offline DataStore was previously required a commit. If I do a fill for data
> that was modified in offline mode, my success callback registered to the
> AsyncToken from the fill call is called twice. It seems one result of the
> fill is coming from the offline data cache and the other is from the server
> side data. After the fill call, the "commitRequire" flag of the DataStore is
> now set to be true and that is were I do a commit.
>
> Q.
> Is this expected? Does LCDS compare the fill results between the offline
> cache and the server data to determine if "commitRequire" is true? Should I
> blindly call commit once I leave offline mode and delete the offline cache?
> If I delete the offline cache from the filesystem, the callback from the
> fill is only called once. Ideally I want the callback from the fill to only
> be called once and to contain the synchronized results of the fill.
>
> Q.
> In looking at the LCDS dev guide is see the follow passage in Chapter 18:
> Advanced data handling:
> "If there is a connection available after the local cache is loaded, the
> current reconnectPolicy property value is
> consulted to determine how a request for the current data will be made. If
> the reconnectPolicy property is set to
> IDENTITY, no request for remote data is made because it is assumed that the
> data is up-to-date. If the
> reconnectPolicy property is set to INSTANCE, a request for the remote data
> is made and the result of that fill is used
> to overwrite the current in-memory version."
>
> Where is the "reconnectPolicy" defined and do I need to change this?
>
> I apologize for the length of the post, I've tried to be as concise as
> possible.
>
>  
>


Re: [flexcoders] Re: Adobe pulls Single CPU and 100-user licenses

2010-01-24 Thread Jeffrey Vroom
Ugh, actually that sounds to me like their lawyers just mailed in the
effort.  I'm no lawyer but I would not accept that license agreement as it
is one of the most anti-competitive things I've seen in a while.  It
essentially means you cannot use the fds.swc to build an "a.b" relationship
in your code - even if you do the id to value mapping yourself.  Similarly,
if you want to use fds.swc along with sql-lite you are not legally allowed
to do that either.  If you display "disconnected" button and link against
fds.swc that could be construed as "offline capability".   Do they define
this "modeling plug-in" in some way to differentiate the tools you pay for
in FB4 from the LCDS tools?  Both seem to be data modelling plugins to me.
 Does a Php server compete against BlazeDS?

Knowing the folks at Adobe, I believe they would use restraint and only
enforce those provisions if you're actually using the association feature of
fds.swc, the offline feature of fds.swc, and the modelling plugins in LCDS
or if you really do compete with either of those two products.  But if
you're looking at Adobe as a provider for developer tools of any kind, this
is a pretty seriously anti-competitive clause right there.   If you sell any
server products, you might want to stay away from the new FB data centric
tools altogether.

As it is, I'm not sure how any of the things I suggested in the last couple
of emails would not be considered as "competing with LCDS"... darn it Adobe,
you've cornered me again :(

Jeff

On Sat, Jan 23, 2010 at 12:07 AM, busitech wrote:

>
>
> I took a look at the FB4 Beta 2 License Agreement, and here's what I found:
>
> 2.4.7 Flash (R) Builder(R) with LiveCycle(R) Data Services(LCDS) Data
> Management Library. Your rights to this Software are limited. In order to
> (a) utilize the file called "fds.swc" (the "LCDS Library") to develop
> associations , (b) utilize the LCDS Library to develop offline capability,
> (c) use the application modeling plug-in, or (d) utilize the LCDS Library to
> develop a product that competes with LiveCycle Data Services or BlazeDS, you
> must obtain additional licensing rights from Adobe.
>
> So, the lawyers have been working overtime... This weekend I'm going to
> spend some time with each of the available components, to see how complete
> the package can becomes after adding up the sum of the parts...
>
> Matthew
>
>  
>


Re: [flexcoders] Re: Adobe pulls Single CPU and 100-user licenses

2010-01-22 Thread Jeffrey Vroom
That statement about fds.swc certainly was true before, but the DataService
apis are used to power the rpc based data tools in the new Flex Builder.  In
the beta at least, it was the exact same file shipped in LCDS as in FB, so
presumably use of that file would be covered by the FB4 license.  There's a
public adapter interface in the code in which you can translate messages
into whatever operation on the client.  It is used as the hinge point that
switches between "client DMS" in FB4 and LCDS.  That would be the easiest
way probably to hook into Granite - just use their client apis to emulate
the LCDS behavior right there in a new extension of RPCDataServiceAdapter.
Alternatively, you could override DataServiceAdapter's invoke method and
translate them directly into granite's AS library calls.

With BlazeDS on the backend, you can use the standard DataServiceAdapter
which sends those DataMessages to a new DataService on the server.  There
you would need some Java code to replace that DataService.java's
"serviceMessage" (I think).  It would translate those messages into the
Assembler calls, then get the response and translate that data back into
DataMessages.   The hardest one is the "batch" message used for updates.  It
essentially means decoding a series of messages and making repeated calls to
createItem, updateItem, etc.  Even that is easy until you start to factor in
associations.  That requires some subtle logic for turning the ids into
instances to preserve instance integrity but LCDS was not the first place I
used those algorithms :)

I think you also could get manual sync working using BlazeDS since the
DataService just uses a normal Consumer for implementing that.  Hopefully if
the new DataService extends MessagingService that would just work but there
is probably some tweaking needed there.   I have a feeling the farata folks
might have some of these pieces already so maybe we can just contribute to
that project?

FB4 also contains the core Java modeling code, used to generate those
service wrapper classes on the client.  FB4 does not contain the tools to
generate those models other than against simple RPC backends.  If the dev
license for LCDS really is free though, I wonder if you could use it to
generate models that you deploy on other servers?   If so, with a bit more
work you could write a model adapter which generates JPA code.  Not too hard
if you do not mind a web-app restart for model changes.

To me Adobe should be a tools company... giving the tools away for free
seems like a bad strategy.

Jeff

On Fri, Jan 22, 2010 at 10:05 AM, busitech wrote:

>
>
> Good to hear from you, Jeff! We are saddened too. We are quite passionate
> about LCDS, and always have been. We built somewhere in the neighborhood of
> 14 test cases for LCDS 3.0 during the most recent alpha/beta, so just in the
> last 6 months our investment has remained quite significant even though
> we're a small company without deep pockets. This was not welcome news to say
> the least, especially at the end of the beta process we just went through,
> upgrading everything. I feel like the crew of the SS Minnow! Here's what the
> developer of another Flex data project has said about fds.swc:
>
> [Our] data management implementation is quite different than the one in
> LCDS. The code and APIs from LCDS have not been ported. The reason for that
> is Adobe's license agreement. When you use Adobe's LCDS approach, your
> client code is coupled to their library (fds.swc). Even if you do not have
> LCDS running on the backend, but use their client-side data management
> library, you still owe the LCDS licensing fee to Adobe. Our attorney
> confirmed this and we also had a conversation with the LCDS team management
> about it as well.
>
>
> Our software uses the LCDS exclusive features quite heavily, especially for
> sending messages from server to client. We have an ERP system almost ready
> to release. If an inventory count changes, it is broadcast in case anyone is
> selling from an inventory search which has become stale. Price changes work
> the same way, as well as customer A/R balances, etc.
>
> We will be looking at how to recreate the auto sync functions and obtaining
> true data push (or reverse RPC). We're looking at 
> Red5
> for possibly adding RTMP to BlazeDS. At least if we start with BlazeDS, we
> can use our custom object proxies in the serialization process. Red5 has
> also implemented SharedObjects (between client and server) which is really
> neat.
>
> I will definitely read your articles. Unless Adobe hurries up and changes
> their LCDS licensing policies very soon, I'll be interested in working on a
> project which would at least integrate what is available, and build the
> missing pieces.
>
> Some of the client code found in fds.swc has been recreated by Farata
> Systems and released as open 
> source.
> They've built change tracking/loggi

Re: [flexcoders] Adobe pulls Single CPU and 100-user licenses

2010-01-21 Thread Jeffrey Vroom
I am saddened by this situation...  if you read a couple of posts on my blog
you'll understand at least one of the reasons I left Adobe:


http://blog.jvroom.com/2009/12/11/understanding-the-market-for-software-platforms/

http://blog.jvroom.com/2009/10/29/tips-for-buying-and-selling-enterprise-software/

In terms of how to go forward for customers that can't afford the new
license, has anyone seen the flex 4 license for fds.swc?   That gets shipped
with the Flex Builder data tools and unless they changed things since I
left, contains the client half of the LCDS APIs.  Maybe there are
restrictions in how that code can be used though?  It has the hardest part
of the association implementation, offline, etc. in there.

If you can use all of the client features, you could emulate the server
parts you use on blazeDS or GraniteDS so you can move your applications over
to a different infrastructure without having pay the big license fee and
rewrite your client apps.   Doing simple CRUD stuff using BlazeDS would be
pretty easy, in fact you can do that with FB 4 's data management just not
using the assembler interface on the server.  That does not do sync,
associations, change batching though.   The two trickiest features in
LCDS2.6 were auto-sync and RTMP.  If you don't need those (i.e. manual sync
and long-polling are ok), it is not a huge bit of server code to replace the
rest since most of that is in BlazeDS.   Are there enough affect customers
out there that we should start a project around this?   I'm in the middle of
a pretty big project of my own and so don't have a ton of time but would be
happy to chip in.

Jeff

On Thu, Jan 21, 2010 at 7:38 AM, busitech  wrote:

>
>
> I'm curious how many of your projects were deployed into production using
> the no-charge Single CPU (or the 100-user departmental) licenses of LCDS
> 2.x.
>
> Since the release of LCDS 3.0, neither of these licenses exist. This leaves
> our small business customers running in production using the Single CPU
> license with no upgrade path going forward, unless they can come up with the
> steep license fees for ES2. I doubt any of our customers will be able to
> afford it.
>
> Needless to say, this seriously impedes our ability to do business on the
> LCDS platform going forward in the SMB market we serve. It also leaves our
> hands tied with respect to the software we've already developed and
> deployed. BlazeDS is not an option - it would require a total rewrite of
> client and server, and mass annihilation of features.
>
> How are these changes affecting your business?
>
>  
>


Re: [flexcoders] Tree component + sort + LCDS 2.6 : nasty stackoverflow error [1 Attachment]

2009-12-09 Thread Jeffrey Vroom
I do recall seeing and workaround an error like that... it would occur when
you using paging or pending data features with the tree components.  They
did not do all of the checking for ItemPendingErrors that they needed in the
default Flex implementation.

There are two ways you can workaround those problems.  One is to use the
ResidentCollection I wrote to wrap your managed ArrayCollection in LCDS.  It
swallows IPEs and makes it look like the ArrayCollection just goes from
empty to full via change events.   I also think that I was able to
workaround this problem by patching in some of the client classes even when
you are not using resident collection.   I'll attach the source from the
sample I had on this but unfortunately I don't have a build or the flex or
lcds source so it is all from memory now.

Jeff

On Mon, Dec 7, 2009 at 1:19 AM, Rajeev Goel  wrote:

>
>  [Attachment(s) <#12569edb8eb3129b_TopText> from Rajeev Goel included
> below]
>
> hi All,
>
> Need pointers/help to solve this issue. Had created an issue under LCDS
> component (on 1st december) in adobe's jira but its not public. Can't view
> its status and didn't hear back from them also.
>
> Hopefully someone in forum can generate new ideas/insights.
>
>
> Please refer attached source code (build instruction are provided at
> bottom)
>
>
>
> 1. launch the lcds-samples war with tomcat server
>
> 2. log on to URL: http://localhost:8400/lcds-samples/tree/TreeApp.swf
>
> 3. Completely expand the tree nodes in application
>
> 4. Drag and drop tree node with name "1.3.1 #7" upon tree node with name
> "root".
>
>
>
>
>
> **Actual Results:**
>
> 5. application fails with StackOverflow error. (see image5).
>
> Also note that 2 nodes with same name - "1.3.1 #7" is added as child to
> "root".
>
> 6. Another variation to this bug is: Open two app in two browser windows,
> DnD in one window causes stackoverflow in both application instances.
>
> (see image6)
>
>
>
> **Expected Results:**
>
> 7. DnD should occur smoothly, node "1.3.1 #7" should become a child of tree
> node "root".
>
>
>
> Workaround (if any): remove sorting in Tree's dataDescriptor and code works
> smoothly.
>
>
>
> ** Exact error msg:**
>
>  Error: Error #1023: Stack overflow occurred.
>
> at
> mx.data.utils::Managed$/getProperty()[C:\depot\flex\branches\enterprise_corfu_rc\frameworks\projects\data\src\mx\data\utils\Managed.as:158]
>
> at BOMVO/get
> children()[D:\server\lcds\tomcat\webapps\lcds-samples\WEB-INF\flex-src\tree\src\BOMVO.as:21]
>
> at
> BOMTreeDataDescriptor/calculateChildren()[D:\server\lcds\tomcat\webapps\lcds-samples\WEB-INF\flex-src\tree\src\BOMTreeDataDescriptor.as:38]
>
> at
> BOMTreeDataDescriptor/getChildren()[D:\server\lcds\tomcat\webapps\lcds-samples\WEB-INF\flex-src\tree\src\BOMTreeDataDescriptor.as:22]
>
> at
> mx.controls.treeClasses::HierarchicalCollectionView/getChildren()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\treeClasses\HierarchicalCollectionView.as:393]
>
> at
> mx.controls.treeClasses::HierarchicalCollectionView/calculateLength()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\treeClasses\HierarchicalCollectionView.as:285]
>
> at
> mx.controls.treeClasses::HierarchicalCollectionView/calculateLength()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\treeClasses\HierarchicalCollectionView.as:293]
>
> at
> mx.controls.treeClasses::HierarchicalCollectionView/calculateLength()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\treeClasses\HierarchicalCollectionView.as:259]
>
> at
> mx.controls.treeClasses::HierarchicalCollectionView/calculateLength()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\controls\treeClasses\HierarchicalCollectionView.as:293]
>
> at
>
>
>
> **BUILD INSTRUCTIONS: **
>
>
>
> 1. This bug's source code uses lcds-samples project shipped with LCDS 2.6
> setup.
>
> 2. refer /tomcat/webapps/lcds-samples
>
> 3. copy the provided java source code into
> lcds-samples/WEB-INF/src/com/myapp directory
>
> so that it contains these files:
>
> com/myapp/
>
> com/myapp/tree
>
> com/myapp/tree/BOM.java
>
> com/myapp/tree/BOMAssembler.java
>
> com/myapp/tree/BOMService.java
>
> 4. copy flex sources files into folder:
> lcds-samples/WEB-INF/flex-src/tree/src . It should look like:
>
> tree/src/assets
>
> tree/src/BOMTreeDataDescriptor.as
>
> tree/src/BOMVO.as
>
> tree/src/TreeApp.mxml
>
>
>
> 5. overwrite these files in lcds-samples/WEB-INF/flex
>
> data-management-config.xml
>
> remoting-config.xml
>
>
>
> 6. after compilation lcds-samples/tree folder should be created with these
> contents:
>
> tree/
>
> tree/assets
>
> tree/assets/font
>
> tree/TreeApp.swf
>
>
>
> 7. To configure lcds-samples as eclipse project, copy these files to
> /lcds-samples folder -
>
> .actionScriptProperties
>
> .classpath
>
> .flexPrope

Re: [flexcoders] LCDS : number of flexsessions

2009-10-22 Thread Jeffrey Vroom
The first thing would be to determine if they are RTMP or HTTP sessions that
are sticking around.  HTTP sessions can grow because polling clients keep
the session alive indefinitely.  RTMP sessions should only stick around if
the socket between the client and server is still open.  Netstat is a good
way to ensure the sockets are not being kept open for some reason.   I also
vaguely recall there being a bug on some OS's where RTMP sessions would not
be closed properly.   The latest hotfix for 2.5.1 should have that fix and
it should be fixed in the beta of the next release.
Jeff

On Thu, Oct 22, 2009 at 10:03 AM, Besite - Bart  wrote:

>
>
> Hello,
>
> Our application uses amf and rtmp channels. All our destinations have
> application scope.
> The rtmp channels in our application have an idle-timeout-minutes
> property of 20 minutes.
>
> In our ds-console we see that the number of Flexsessions keeps growing
> and growing. After a few hours
> our application becomes slow and we think that the growing number of
> flexsessions causes our appication to slow down.
>
> What could be the reason that some flexsessions are never ended ?
>
> Kind regards
> Bart Ronsyn
>
>  
>


Re: [flexcoders] Re: Flex 4 - data push

2009-10-10 Thread Jeffrey Vroom
There is this blog post which has the basic code you'd need:
http://viconflex.blogspot.com/2007/12/dataservicetransaction-lcds.html

If you are using the new LCDS that comes with Flex 4,  there should be an
option in the api which lets you both send calls to the DB and send them to
clients (which helps with the problem that the author had problems with)

Jeff

On Sat, Oct 10, 2009 at 11:06 AM, fgnowfg  wrote:

>
>
> Are there any tutorials on the methods you suggest? I can't find any good
> explanations on how to implement it w/ mysql
>
>
> --- In flexcoders@yahoogroups.com , Jeffrey
> Vroom  wrote:
> >
> > LCDS won't automatically pick up changes from the database unfortunately.
> > There is an api you can use if you control the code making the changes -
> > see flex.data.DataServiceTransaction. You also could do some kind of
> > polling on the server using the DataServiceTransaction.refreshFill
> method...
> > it would look for changes and when it finds them it would push them out
> to
> > the client.
> > Jeff
> >
> > On Sat, Oct 10, 2009 at 10:00 AM, fgnowfg  wrote:
> >
> > >
> > >
> > > I guess it doesn't exist, then. Here's an example of the real-time
> feature
> > > I am seeking: I created the app and am connected w/ my mysql database.
> I
> > > open two browsers and changes made in browser 1 appear in browser 2. So
> far,
> > > so good. However, if I bypass the flex app completely and make a change
> on
> > > the database or add a new record it won't show up until I refresh the
> flex
> > > app, which is not acceptable for any production environment. I have to
> hand
> > > it to the adobe evangelists for being able to point out the good
> features of
> > > flex & lcds and completely ignore reality as many databases don't get
> > > populated via the front-end UI. I guess I'll have to wait until flex 5
> and
> > > lcds 4 for this feature to be implemented. For now, it seems we wasted
> > > development time and $ on LCDS & flex.
> > >
> > > --- In flexcoders@yahoogroups.com 
> > >  40yahoogroups.com>,
> > > "fgnowfg"  wrote:
> > > >
> > > > Does anyone know of a tutorial for data push in flex 4? All I can
> find is
> > > people blogging about it but no one has a complete tutorial. I can do
> > > non-real time data w/ tomcat server and only need tutorial on data
> push.
> > > thx!
> > > >
> > >
> > >
> > >
> >
>
>  
>


Re: [flexcoders] Re: Flex 4 - data push

2009-10-10 Thread Jeffrey Vroom
LCDS won't automatically pick up changes from the database unfortunately.
 There is an api you can use if you control the code making the changes -
see flex.data.DataServiceTransaction.  You also could do some kind of
polling on the server using the DataServiceTransaction.refreshFill method...
it would look for changes and when it finds them it would push them out to
the client.
Jeff

On Sat, Oct 10, 2009 at 10:00 AM, fgnowfg  wrote:

>
>
> I guess it doesn't exist, then. Here's an example of the real-time feature
> I am seeking: I created the app and am connected w/ my mysql database. I
> open two browsers and changes made in browser 1 appear in browser 2. So far,
> so good. However, if I bypass the flex app completely and make a change on
> the database or add a new record it won't show up until I refresh the flex
> app, which is not acceptable for any production environment. I have to hand
> it to the adobe evangelists for being able to point out the good features of
> flex & lcds and completely ignore reality as many databases don't get
> populated via the front-end UI. I guess I'll have to wait until flex 5 and
> lcds 4 for this feature to be implemented. For now, it seems we wasted
> development time and $ on LCDS & flex.
>
> --- In flexcoders@yahoogroups.com ,
> "fgnowfg"  wrote:
> >
> > Does anyone know of a tutorial for data push in flex 4? All I can find is
> people blogging about it but no one has a complete tutorial. I can do
> non-real time data w/ tomcat server and only need tutorial on data push.
> thx!
> >
>
>  
>


Re: [flexcoders] LCDS async error

2009-05-25 Thread Jeffrey Vroom
I see two possible things that could cause this error:
1) you have a fault handler whose function definition takes a
MessageFaultEvent parameter.  You need to change that to the common base
class which is (I think) a FaultEvent so it can accept both a
MessageFaultEvent and a DataServiceFaultEvent.
2) there is a bug in LCDS where it is doing 1).

If you check your code and you don't have any event handlers which take a
MessageFaultEvent, it is probably 2).   I don't have access to the source
anymore or I'd check into 2) for you...

Jeff

On Mon, May 25, 2009 at 5:17 AM, Johannes Nel wrote:

>
>
> Hi All
>
> I have a LCDS app which must stay open for ages, deal with dodgy internet
> connections and all such fun things.
> Thus far we have managed to get the NetConnection to re-establish itself
> nicely when the line drops, but here is a wonderful error (which does not
> actually break the app) that i get after having the app open for a few
> hours,  only on OS X.
>
> So, the fact that it does not touch our code anywhere means that I have no
> way of trapping this. I would really like some advice on how i can suppress
> or even catch it.
>
>
>
> TypeError: Error #1034: Type Coercion failed: cannot convert
> mx.data.events::dataservicefaultev...@2cb864c1 to
> mx.messaging.events.MessageFaultEvent.
> at mx.data::ConcreteDataService/sendRefreshFault()
> at mx.rpc::AsyncResponder/fault()
> at mx.rpc::AsyncToken/
> http://www.adobe.com/2006/flex/mx/internal::applyFault()
> at mx.rpc.events::FaultEvent/
> http://www.adobe.com/2006/flex/mx/internal::callTokenResponders()
> at mx.data::ConcreteDataService/
> http://www.adobe.com/2006/flex/mx/internal::dispatchFaultEvent()
> at DataListRequestResponder/fault()
> at mx.rpc::AsyncRequest/fault()
> at NetConnectionMessageResponder/channelDisconnectHandler()
> at flash.events::EventDispatcher/dispatchEventFunction()
> at flash.events::EventDispatcher/dispatchEvent()
> at mx.messaging::Channel/disconnectSuccess()
> at mx.messaging.channels::NetConnectionChannel/internalDisconnect()
> at mx.messaging.channels::RTMPChannel/internalDisconnect()
> at mx.messaging.channels::RTMPChannel/statusHandler()
>
> regards
> Johan
> --
> j:pn
> \\no comment
>  
>


Re: [flexcoders] Do we get any notification when user dissconnects from LCDS

2009-05-13 Thread Jeffrey Vroom
The FlexSession object dispatches session closed events.  For RTMP sessions,
these will be pretty much immediate.  For HTTP sessions though, they are
dispatched when the session expires.  So for RTMP you get quick notification
but for HTTP it will be delayed based on your session expiration interval.
Jeff

On Tue, May 12, 2009 at 10:39 PM, Dharmendra Chauhan  wrote:

>
>
> Hi,
> I have to release resources when user get disconnected from LCDS.
> What I need to implement in java to listen it ?
>
> User may disconnect due to network failure ,when he closes the flex Window
> etc..
>
> Thanks,
> Dharmendra
>
>
>  
>


Re: [flexcoders] Re: loading status for DataGrid

2009-05-13 Thread Jeffrey Vroom
The player does not provide status events for a single NetConnection "call"
so there's no easy way to get the status events unless you break the
requests into smaller pieces.
There are two reasons I can think of that paging would slow down sorting.
 One is if you do not have all of the pages loaded on the client and you try
to sort, it would have to fetch all of the pages before it could do the
sort.  The sort would appear slow but really it is just fetching the data to
do the sort.   If you are just using paging though to get status events, you
could put the app into a "modal" state (i.e. lock out user interaction)
until all of the pages have been fetched.  After you do a query, you just
need to have some code which touches every page in the collection so all
pages get fetched.  Keep a count of the result events and use that to build
your progress bar.   The sort should work the same once everything has been
loaded.

I could also see a couple of ways you could get slower results with paging
because of how the server is implemented.   Ordinarily though, with
cache-items=true and where the assembler returns the entire collection from
the fill method (i.e. not the fill-page method), it should not slow things
down to do paging+sorting.

Jeff

On Tue, May 12, 2009 at 10:22 PM, Dharmendra Chauhan  wrote:

>
>
> Thanks for the reply,
> I really cant turn on pagiing because it makes sorting slow by at least 5
> times.Once I did it but had to revert.
>
> I have to think other way to get rid of this issue.
> DataService should dispatch some event which tells the status of data
> loading.
>
>
> --- In flexcoders@yahoogroups.com , Jeffrey
> Vroom  wrote:
> >
> > You can turn on paging, then listen for the "result" events on the
> > DataService. They'll be dispatched once for each page result.
> > Jeff
> >
> > On Tue, May 12, 2009 at 12:15 PM, Dharmendra Chauhan  > > wrote:
> >
> > >
> > >
> > > Hi All,
> > > I have flex DataGrid which asynchronously receive data throw LCDS
> deployed
> > > on Jboss.Initially It loads around 2k to 3k rows
> > > I need to show loading status which would just keep showing Data
> Loading
> > > until data load is complete.
> > >
> > > DataService class does not have any event which would serve this
> purpose
> > >
> > > Does anybody have any idea on it ?
> > >
> > >
> > >
> >
>
>  
>


Re: [flexcoders] loading status for DataGrid

2009-05-12 Thread Jeffrey Vroom
You can turn on paging, then listen for the "result" events on the
DataService.  They'll be dispatched once for each page result.
Jeff

On Tue, May 12, 2009 at 12:15 PM, Dharmendra Chauhan  wrote:

>
>
> Hi All,
> I have flex DataGrid which asynchronously receive data throw LCDS deployed
> on Jboss.Initially It loads around 2k to 3k rows
> I need to show loading status which would just keep showing Data Loading
> until data load is complete.
>
> DataService class does not have any event which would serve this purpose
>
> Does anybody have any idea on it ?
>
>  
>


Re: [flexcoders] Server PUSH in LCDS

2009-05-06 Thread Jeffrey Vroom
If you can run Java code at the time the database changes, you can use the
DataServiceTransaction api.  It has methods to refresh queries, or push
specific create, update, delete changes to the client.
There is a "refresh" operation which you can run from the client.  That will
only pick up db changes though if you have cache-items disabled.

Jeff

On Tue, May 5, 2009 at 1:29 PM, Ravi Suda  wrote:

>
>
> Hi,
> I want to implement Server-Push in my project. We use Adobe Flex3 in UI. We
> use Spring with Hibernate on server side. We also have LCDS on server.
>
> Flex calls Spring beans (DAOs) on server. Spring DAO's access database
> using hibernate. In this way Flex-UI gets data from server. And also
> update/save data using Spring beans. Spring beans(DAOs) has the hibernate
> code (mappings) to fetch/update database.
>
> Now, one outside process is updating the database directly i.e., without
> involving Flex/Spring/Hibernate. Whenver that happens, UI needs to get the
> latest data from server.
>
> Could you tell me how to implement this. What kind of adapter should I use?
> Any resources/docs available ?
>
> Thanks in advance for your reply.
> Ravi
>
>  
>


Re: [flexcoders] Re: How to 'undo' the changes in the flex client w/ LCDS when a rollback is isssued?

2009-04-29 Thread Jeffrey Vroom
In my opinion, LCDS should detect that you've called setRollbackOnly and
deliver a generic fault to the client.  I just recently left Adobe so it is
not my position anymore to say for sure it is a bug or just the way it
works.  I vaguely recall a bug opened on this issue but can't check since
that bug system is not public.

Jeff

On Wed, Apr 29, 2009 at 12:09 PM, Mehdi  wrote:

>
>
> --- In flexcoders@yahoogroups.com , Jeffrey
> Vroom  wrote:
> >
> > I think this is a bug - calling setRollbackOnly does not trigger the
> fault
> > handler. The server knows that transaction failed but the client does not
> > so things get out of sync. You have to throw an exception from your
> > assembler methods to get the fault handler called. When you do that, if
> > use-transactions=true, the rollback will happen automatically. this also
> > gives you the ability to pass the message of your exception to the client
> so
> > your fault handler knows what exactly the error was on the server.
> >
> > At that point, you can call revertChanges to undo that change.
> >
> > Jeff
> >
> > On Wed, Apr 29, 2009 at 9:15 AM, Mehdi  wrote:
> >
> > >
> > >
> > > The typical example.
> > > You have a datagrid that is bound with an arraycollection, which source
> is
> > > managed by LCDS via ds.fill().
> > > your datagrid is editable. The user edits a value in the collection and
> you
> > > fire a commit. (ds.commit()).
> > >
> > > Let say you are using a custom assembler. The
> > > updateItem(newVersion,prevVersion,changesList) method will be invoked.
> > > There assuming something goes wrong and you call:
> > >
> > >
> DataServiceTransaction.getCurrentDataServiceTransaction().setRollbackOnly();
> > >
> > > I can see the db rolling back no problem. But my client did not get any
> > > notification!
> > > I have callback functions in the commit, and I have event listener on
> the
> > > ds (fault and result) AS such:
> > >
> > > _dataService.commit();
> > > token.addResponder(new AsyncResponder(
> > > function onAsyncResult(result:Object, token:Object = null) : void
> > > {
> > > }
> > > function onAsyncFault(.../...)
> > > )
> > >
> > > AND,
> > >
> > > _dataService.addEventListener(DataServiceFaultEvent.FAULT,
> this.onFault,
> > > false, 0, true);
> > > _dataService.addEventListener(ResultEvent.RESULT, this.onResult, false,
> 0,
> > > true);
> > >
> > > NONE of these callbacks get called. So I basically have no way of
> knowing
> > > that a rollback happened, and the user datagrid is still showing the
> wrong
> > > value, since the commit failed. Any idea?
> > >
> > > Note that however when an exception is thrown on the server
> (updateItem()
> > > method), I do indeed get a callback via the AsyncFault method.
> > >
> > > Thank you.
> > >
> > >
> > >
> >
> Hi Jeff,
>
> I'm not sure what you meant by:
> "I think this is a bug - calling setRollbackOnly does not trigger the fault
> handler"
> Are you confirming the fact that this is a bug, and that calling
> setRollbackOnly SHOULD actually call the fault handler or you are saying
> that only throwing an exception should do it.?
>
> thanks.
>
>  
>


Re: [flexcoders] How to 'undo' the changes in the flex client w/ LCDS when a rollback is isssued?

2009-04-29 Thread Jeffrey Vroom
I think this is a bug - calling setRollbackOnly does not trigger the fault
handler.  The server knows that transaction failed but the client does not
so things get out of sync.   You have to throw an exception from your
assembler methods to get the fault handler called.   When you do that, if
use-transactions=true, the rollback will happen automatically.  this also
gives you the ability to pass the message of your exception to the client so
your fault handler knows what exactly the error was on the server.

At that point, you can call revertChanges to undo that change.

Jeff

On Wed, Apr 29, 2009 at 9:15 AM, Mehdi  wrote:

>
>
> The typical example.
> You have a datagrid that is bound with an arraycollection, which source is
> managed by LCDS via ds.fill().
> your datagrid is editable. The user edits a value in the collection and you
> fire a commit. (ds.commit()).
>
> Let say you are using a custom assembler. The
> updateItem(newVersion,prevVersion,changesList) method will be invoked.
> There assuming something goes wrong and you call:
>
> DataServiceTransaction.getCurrentDataServiceTransaction().setRollbackOnly();
>
> I can see the db rolling back no problem. But my client did not get any
> notification!
> I have callback functions in the commit, and I have event listener on the
> ds (fault and result) AS such:
>
> _dataService.commit();
> token.addResponder(new AsyncResponder(
> function onAsyncResult(result:Object, token:Object = null) : void
> {
> }
> function onAsyncFault(.../...)
> )
>
> AND,
>
> _dataService.addEventListener(DataServiceFaultEvent.FAULT, this.onFault,
> false, 0, true);
> _dataService.addEventListener(ResultEvent.RESULT, this.onResult, false, 0,
> true);
>
> NONE of these callbacks get called. So I basically have no way of knowing
> that a rollback happened, and the user datagrid is still showing the wrong
> value, since the commit failed. Any idea?
>
> Note that however when an exception is thrown on the server (updateItem()
> method), I do indeed get a callback via the AsyncFault method.
>
> Thank you.
>
>  
>