[flexcoders] Programatic Deletion in Tree causes Error #1010:
All, We have few tree structure in various TitleWindow containers. Some of these Trees have data dependency e.g. deleting one node could cause deletion of another node and vice versa. What we are noticing is that when we programatically delete the nodes (as a result of deletion of a another node in another tree), the node does disappear from the tree but and expandItem operation causes following stack trace: TypeError: Error #1010: A term is undefined and has no properties. at mx.controls::Tree/expandItem()[/Applications/Adobe Flex Builder 3 Plug-in/sdks/3.2.0/frameworks/projects/framework/src/mx/controls/Tree.as:1775] at com.dtr.controls.views.components.Tree::SpringLoadedTree/expandItem()[/Users/smangal/projects/main/trunk/dtr/web/src/main/client/com/thed/controls/views/components/Tree/SpringLoadedTree.as:1084] at com.dtr.controls.views.TCR::TestCaseRepositoryCanvas/treeItemClickHandler()[/Users/smangal/projects/main/trunk/dtr/web/src/main/client/com/thed/controls/views/TCR/TestCaseRepositoryCanvas.mxml:169] at com.dtr.controls.views.TCR::TestCaseRepositoryCanvas/__treeViewCreation_itemClick()[/Users/smangal/projects/main/trunk/dtr/web/src/main/client/com/thed/controls/views/TCR/TestCaseRepositoryCanvas.mxml:24] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() This also causes a big white patch in the tree and tree is no more navigable after this error. We do call validateNow() after deletion is completed for all the effected trees. It appears that (rowIndex + rowsToMove) and listItems[i][0] are out of sync but what caused this discrepancy. -Shailesh
[flexcoders] Re: Streaming in LCDS
--- In flexcoders@yahoogroups.com, niamath basha niamathba...@... wrote: Hi all, I have a problem with streaming in LCDS. while running the sample using streaming channel it works fine when run it as 'localhost'. but when I tried to run it through IP address its not working. I tried to change the endpoint url by giveing ip address. but its not working. plese help me out. With Regards, Niamath Basha www.niamathbasha.wordpress.com
[flexcoders] Validation on ItemRenderers in DataGrid
I need to validate all the item renders within a DataGris on certain triggers from within dataGrid as well as out of dataGrid. Validation should provide feedback by marking the border red and error message on hover. I am wondering if any has faced similar issues. -Shailesh
[flexcoders] Re: [silvafug] Calling C++ app or service from flex on Mac
Have you looked at Merapi? You can either use JNI with Merapi to call you dll or write similar socket based bridge in C++ -Shailesh On Feb 22, 2009, at 7:50 AM, Priya Shah wrote: Hi everyone, I am in dire need of being able to call a C++ app or service on Mac from flex. I am willing to go the AIR way for this though that's not optimal. I have spent some time trying to figure out the Netscape plugin architecture which is supported on safari but it's sub- optimal for me to go that route. I already have a C++ dll that I have invoked with flex on the Windows side using an Active/X plugin successfully. Now I need to compile the dll into some format on Mac and then communicate back and forth with flex. I have seen some open source bridge projects that enclose flash player in an MFC object but that doesn't help me on mac. Is it as simple as doing some Netstream class from flex to connect to either an app or a service (if there are services on Mac like there are on Windows) and just do a localhost communication back and forth? If so, what are the limitations of such approaches? Any sample apps out there? Regards Priyanka
[flexcoders] Increase in swf size when upgraded to FlexSDK3
We recently moved from Flex 2.0.1/LCDS 2.5.1 to Flex3.1.0/LCDS2.6 and noticed that by doing that our swf went from 1.3MB to 1.9MB. This is 50% increase in size. Is this typical with Flex 3? -Shailesh
[flexcoders] Re: Increase in swf size when upgraded to FlexSDK3
No, and we have tried both command line as well FlexBuilder compiles. Same result :( -Shailesh --- In flexcoders@yahoogroups.com, Ryan Gravener [EMAIL PROTECTED] wrote: are you compiling with debug enabled? Ryan Gravener http://twitter.com/ryangravener On Mon, Oct 20, 2008 at 7:40 PM, Shailesh Mangal [EMAIL PROTECTED]wrote: We recently moved from Flex 2.0.1/LCDS 2.5.1 to Flex3.1.0/LCDS2.6 and noticed that by doing that our swf went from 1.3MB to 1.9MB. This is 50% increase in size. Is this typical with Flex 3? -Shailesh
[flexcoders] Re: Thick Java Client for LCDS - AIR is too restrictive on Desktop
yeah, I spend some time looking at it, its certainly not easy. Any other alternatives? I need to connect to assembler and get the data pushes to the java client and execute some stuff on the desktop. AIR would have been perfect if it was as powerful as Java on desktop. -Shailesh --- In flexcoders@yahoogroups.com, meteatamel [EMAIL PROTECTED] wrote: By LCDS, you mean DataService in Java? I haven't heard anyone try implementing that in Java. I don't think it'll be that easy though because, first you need to implement all Channels (or at least one that you'll use in your application) in Java and that by itself is not trivial. You need to figure out how to make HTTP calls (URLConnection vs. HTTPClient), figure out how AMF serialization/deserialization is going to work, etc. After you have your Channel, you need to implement Producer/Consumer so you can do messaging. And finally, you can build DataService on top of those. -Mete --- In flexcoders@yahoogroups.com, Shailesh Mangal shailesh.mangal@ wrote: Has java client (thick) for LCDS been tried? Any ideas how can this be done. -Shailesh
[flexcoders] Thick Java Client for LCDS
Has java client (thick) for LCDS been tried? Any ideas how can this be done. -Shailesh
[flexcoders] LCDS Performance (hibernate cascade)
We are using LCDS 2.5.1 and have a bit of a strange need. Here is a simplistic Object model.Object A --- Object B Collection [One-TO-Many] Object B collection can be really huge and the relation between A and B is not need on the client but is needed on server so that we can take advantage of hibernate cascade for bulk operations. Here are my queries: 1. Is there any way that I can ask LCDS to ignore Object B collection completely e.g. some configuration in meta of data-management-config.xml 2. We are thinking of writing a AOP interceptor where we will manually nullify Object B collection whenever assembler get involked. While this option doesnt sound very clean, is it even feasible? It will surely add more complexity in code.3. Should this be a Managed relation or Hierarchical in data-management-config.xml?4. Any other techniques? -sxm
[flexcoders] Switching between RTMP and HTTP
We are using RTMP as our main protocol and HTTP as a fall back. I have bunch of questions. 1. We observed that when RTMP fails, DataService in client automatically falls back to HTTP. But when RTMP comes back, it doesn't reconnects and continues with HTTP. Is there an API to do this (other then client attempting to connect periodically) 2. How does RTMP fall back on to RTMPT (Tunnel). Is there any configuration for this? 3. DataServiceTransaction doesn't seem to work in case of HTTP mode. Is there any work around to push data from server to client in case RTMP is not available. 4. When RTMP becomes unavailable, does message subscriber and publisher have to re- connect to server? Has anybody experienced these issues? WIll appreciate any quick help. -Shailesh
[flexcoders] Re: Flex Builder and Ant
Why do you want to combine the two? We use flex builder for UI project dev and debugging and Maven/ant for automated builds. Shailesh Now, Test Management http://www.getzephyr.com , is a breeze --- In flexcoders@yahoogroups.com, Weyert de Boer [EMAIL PROTECTED] wrote: Does anyone know how I can combine the use of Flex Builder and Ant to compile Flex/AIR projects?
[flexcoders] Re: LCDS - Rollback in dataService doesnt work
We finally figured out the issue, here is quick description Problem: Object Graph: A -(1 - many) -- B -- (many to 1) -- C Each of these object has a corresponding assembler with relationship defined in data-management-config.xml. Say - AA, BA, CA In UI, I have Corresponding DataServices say AS, BS (there is none for C as C get fetched as part of B) If There is a change made on object C, the change is not collected by AS or BS (although they show commitRequired = true). Rollback on AS and BS doesnt do anything. Solution: create a dummy* dataService corresponding to assembler CA and call rollback on it. Shailesh Mangal Zephyr (World's first flex/LCDS based Test Management System) Now, Test Management, is a breeze --- In flexcoders@yahoogroups.com, Shailesh Mangal [EMAIL PROTECTED] wrote: Wondering if anybody got similar issue or has any ideas why this might happen. We do have multiple dataServices corresponding to the same Assembler. -Shailesh --- In flexcoders@yahoogroups.com, Shailesh Mangal shailesh.mangal@ wrote: Hi, We are using LCDS 2.5.1 and just stumbled upon a weird scenario. One of dataServices, detects the objects change in the UI and flags the commitRequired = true but the call to revertChanges doesnt do anything. Object still has all the client change. For a moment, we thought that it might be a stale object reference somewhere. But then the commitRequired flag remains true event after the rollback. Commit works successfully (even after the rollback). Wondering if any one has faced the similar challenge. BTW, this happens to one of our dataservice (out of more then 20 services). -Shailesh
[flexcoders] Re: LCDS - Rollback in dataService doesnt work
Wondering if anybody got similar issue or has any ideas why this might happen. We do have multiple dataServices corresponding to the same Assembler. -Shailesh --- In flexcoders@yahoogroups.com, Shailesh Mangal [EMAIL PROTECTED] wrote: Hi, We are using LCDS 2.5.1 and just stumbled upon a weird scenario. One of dataServices, detects the objects change in the UI and flags the commitRequired = true but the call to revertChanges doesnt do anything. Object still has all the client change. For a moment, we thought that it might be a stale object reference somewhere. But then the commitRequired flag remains true event after the rollback. Commit works successfully (even after the rollback). Wondering if any one has faced the similar challenge. BTW, this happens to one of our dataservice (out of more then 20 services). -Shailesh
[flexcoders] Re: reading arrays from Java into a chart
Dates are marshalled fine (use java.util.Date). Issue seems to be with your getter method. I think your getter methods (in Axis JavaBean) are getEndDate and getDataList. They should rather be getData and getEnd -Shailesh --- In flexcoders@yahoogroups.com, netdeep [EMAIL PROTECTED] wrote: Thanks for the tips. I'll try those out. But I really do need the Date objects and according to the documentation, they should convert. Also for some reason, even when I comment out the date and list objects in the Java and Actionscript definitions, I still get the reference error #1056. Do you know what is causing that error? --- In flexcoders@yahoogroups.com, [p e r c e p t i c o n] percepticon@ wrote: oh and almost forgot...when dealing with lists coming from java i had more success with ArrayCollection than array... p On Wed, Mar 5, 2008 at 7:57 AM, netdeep deepnet@ wrote: Does anyone know the best practice for transferring data from a database to generate a flex chart? I have a Java class Axis with these variables: String ID; Date start; Date end; int min; int max; int incr; String title; String signal; String type; List data; And the List is an array of points defined in a class called DataPoint: public Date point1; public long point2; I pass an array of Axis objects to the Flex app and try to convert it to an actionscript object: package factory.data { [Bindable] [RemoteClass(alias=factory.data.Axis)] public class AxisObject { public var ID:String; public var start:Date; public var end:Date; public var min:int; public var max:int; public var incr:int; public var title:String; public var signal:String; public var type:String; public var data:Array; } and I can access the title for example, but cannot get the DataPoint array into the chart. Furthermore, when I debug it gives me the following errors: ReferenceError: Error #1056: Cannot create property endDate on factory.data.AxisObject. ReferenceError: Error #1056: Cannot create property dataList on factory.data.AxisObject. Thanks for any help you can offer.
[flexcoders] Re: Access MySQL directly from Flex client
Thanks Beau, Apart from the concerns that you have pointed out, we saw another concern around connection leak (each client needs a connection). So this is what we ended up doing. 1. Hourly Cron job on database server which spits out the xml (straight from mysql) and ftp to a secure location. 2. Flex client read those secure files and parses them and draws the charts and datatable in dashboard with configurable refresh rate. Shailesh Now, Test Management http://www.getzephyr.com is a breeze. --- In flexcoders@yahoogroups.com, Beau Scott [EMAIL PROTECTED] wrote: Providing direct access to your DB via a flex app over the web is extremely insecure, even in �safe intranents� � you�d be surprised what bored employees are capable of. Best approach is to use a thing service layer, possibly something like FlexCRUD(http://flexcrud.riaforge.org/blog/index.cfm/2007/5/5/Updated-to\ -ver sion-03-in-SVN) , it�s a little out of date and I personally have no experience with it, but have heard of some people using it with success. Honestly, even if you go the route of AMFPHP or a simple SOAP webservice layer (like PEAR�s Services_Webservice package), it�s really easy to create a service for your specific needs. AMFPHP is probably the easiest in the long term as it doesn�t require you to do a lot of XML parsing to access your data. However it is a bit more work up front. Setup is easy, but you have to create VO�s on both sides. Services_Webservice is just a standard SOAP wrapper for PHP. A little more involved to setup as it doesn�t have a default service broker (though it�s not hard to make one) but doesn�t require VO�s, but like I said, you have to parse through the XML in your client � not that it�s hard. Both methods involve creating PHP classes with public methods as your service interfaces. With AMFPHP you simply put these classes in the amfphp/classes directory. Services_Webservice you extend the Webservice class and load it through your broker. Hope this helps, Beau From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Shailesh Mangal Sent: Monday, March 03, 2008 4:57 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Access MySQL directly from Flex client I need to quickly put together a dashboard where the data will come from mysql. I would like to eliminate middile layer (if possible). The only mysql connector a href='HYPERLINK http://www.bobjim.com/2007/03/16/mysql-access-in-adobe-flex/http://www\ .bob jim.com/2007/03/16/mysql-access-in-adobe-flex/' article /a I came across doesnt have any source code. So I am concluding that this is not possible (yet). I am looking for next best options (thinest possible middle layer, possibly Ruby/Groovy/perl/python?) =Security and scalability are not of concern (as its within our safe intranet for a very small set of users). No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.21.3/1308 - Release Date: 3/3/2008 10:01 AM No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.516 / Virus Database: 269.21.3/1308 - Release Date: 3/3/2008 10:01 AM
[flexcoders] Access MySQL directly from Flex client
I need to quickly put together a dashboard where the data will come from mysql. I would like to eliminate middile layer (if possible). The only mysql connector a href='http://www.bobjim.com/2007/03/16/mysql-access-in-adobe-flex/' article /a I came across doesnt have any source code. So I am concluding that this is not possible (yet). I am looking for next best options (thinest possible middle layer, possibly Ruby/Groovy/perl/python?) =Security and scalability are not of concern (as its within our safe intranet for a very small set of users).
[flexcoders] Re: Maven
We faced the same issue and have taken similar approach as yours. We maintain a internal maven repository. I dont think maven related queries get enough attention on this forum. -Shailesh Now Test Management http://www.getzephyr.com is a breeze. --- In flexcoders@yahoogroups.com, VELO [EMAIL PROTECTED] wrote: Hi, At work we are using maven for all, compile flex (thanks israfil), compile java, build war and build ear. To build war we have a dependency to LCDS 2.5 flex.war To compile java we have several dependencies to flex-*.jar (flex-messaging.jar, flex-messaging-common.jar, depends of situation) To compile flex we put charts, fds dependencies. We are using an internal name definition for the groupID and artifactID. Have adobe made some oficial groupID/artifactID for maven users? Something like this: http://maven.apache.org/guides/mini/guide-coping-with-sun-jars.html Or any planning for Coping with Adobe JARs/SWCs ? VELO
[flexcoders] Re: Access MySQL directly from Flex client
Thanks Fidel, Exactly what I needed. Total rocks! works like a charm. I am done with my dashboard (few datagrids and couple of drillable charts). -Shailesh --- In flexcoders@yahoogroups.com, Fidel Viegas [EMAIL PROTECTED] wrote: On Tue, Mar 4, 2008 at 12:57 AM, Shailesh Mangal [EMAIL PROTECTED] wrote: I need to quickly put together a dashboard where the data will come from mysql. I would like to eliminate middile layer (if possible). The only mysql connector a href='http://www.bobjim.com/2007/03/16/mysql-access-in-adobe-flex/' article /a I came across doesnt have any source code. So I am concluding that this is not possible (yet). I am looking for next best options (thinest possible middle layer, possibly Ruby/Groovy/perl/python?) =Security and scalability are not of concern (as its within our safe intranet for a very small set of users). Hi Shailesh, I have played with this one http://asql.mooska.pl/, and it works with both AIR and Flex. I don't really use it as MySQL is not the database I use for my projects, but I have given it a try and it worked ok. Hope that suits your needs. Fidel.
[flexcoders] LCDS - Rollback in dataService doesnt work
Hi, We are using LCDS 2.5.1 and just stumbled upon a weird scenario. One of dataServices, detects the objects change in the UI and flags the commitRequired = true but the call to revertChanges doesnt do anything. Object still has all the client change. For a moment, we thought that it might be a stale object reference somewhere. But then the commitRequired flag remains true event after the rollback. Commit works successfully (even after the rollback). Wondering if any one has faced the similar challenge. BTW, this happens to one of our dataservice (out of more then 20 services). -Shailesh
[flexcoders] Re: Flex Data Management and container's UserTransaction
In usecase-2, what should happen when method that begins dataServiceTransaction is already within a JTA transaction. In our codebase, We have some remote services which send refreshes to the client using DataServiceTransaction. All these refreshes were working fine until we wrapped my services into Spring TransactionProxy. Any clue is highly appreciated. We tried it with both useJTA=true and useJTA=false One other side query: If we have one-many relation(parent child) in assembler, which points to the same assembler. If a child change, do we need to send refresh on the child only or parent only or the recursively from top most parent to bottom most child. -Shailesh --- In flexcoders@yahoogroups.com, Jeff Vroom [EMAIL PROTECTED] wrote: There are two use cases where we DMS will use the UserTransaction. 1) When your assembler has use-transactions=true, and you commit a change or batch of changes, the DMS code will start a transaction before calling your createItem, updateItem, and deleteItem methods. If any of those get an error, the transaction is rolled back and all of the changes are put back into the uncommitted list on the client. If they all succeed the transaction is committed and the changes pushed to other interested clients. 2) If you use the DataServiceTransaction api to push changes from the server, when you call begin you can pass in a value of true which causes the DMS stuff to start a JTA transaction in that call. When you call commit, the JTA transaction is committed if the setRollbackOnly call was not made. This is just a convenience if you happen to have some JDBC code which is updating the database. You want to both commit those changes and push the changes to other clients or rollback those changes and cancel those changes. For 1), when you are also using Hibernate, the hibernate assembler will register a hibernate current session context class. The goal of this class is to ensure that we create one hibernate session for each JTA transaction we create for DMS and commit/roll them back in sync. Going forward I'd like to offer another way to do this so that we can more flexibly integrate with other ways of using hibernate sessions. Jeff From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of den.orlov Sent: Wednesday, December 12, 2007 2:10 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex Data Management and container's UserTransaction As I understand Flex Data Management Services require that application container provide UserTransaction for it. But I can't find any guide about how FDMS uses it. I was completely confused when I checked several tutorials that used FDMS+HibernateAssempler+Spring or FDMS+hand written Assempler+Hibernate+Spring. That tutorial http://blogs.adobe.com/mtg/2006/08/my_first_hibernate_enabled_fle.html http://blogs.adobe.com/mtg/2006/08/my_first_hibernate_enabled_fle.html specify that Hibernate's SessionFactory use datasource not tied to global transaction manager. This tutorials: http://devblog.ezmo.com/2007/05/29/using-flex-data-services-with-spring- and-hibernate/ http://devblog.ezmo.com/2007/05/29/using-flex-data-services-with-spring -and-hibernate/ http://iamjosh.wordpress.com/2007/11/08/building-a-livecycle-data-servic e-application/ http://iamjosh.wordpress.com/2007/11/08/building-a-livecycle-data-servi ce-application/ don't specify that SessionFactory should use global transaction scope for Session and use local transaction management. So what's the purpose of FDMS to have reference to container's UserTransaction? Den
[flexcoders] Re: Flex Data Management and container's UserTransaction
Turned out that Its not the transaction, its OpenSessionInViewFilter's flag for singleSession which caused my updates fail [For reasons not known]. So, in a nut shell, If you have, 1. singleSession = true, DataServiceTransaction wouldnt send out the updates 2. singleSession = false, DataServiceTransaction send out the updates just fine. (problem with this approach is bulk operations will exhaust resources as every request will fetch a new session object) Will appreciate comments if any one has witnessed the same behavior. -Shailesh --- In flexcoders@yahoogroups.com, Shailesh Mangal [EMAIL PROTECTED] wrote: In usecase-2, what should happen when method that begins dataServiceTransaction is already within a JTA transaction. In our codebase, We have some remote services which send refreshes to the client using DataServiceTransaction. All these refreshes were working fine until we wrapped my services into Spring TransactionProxy. Any clue is highly appreciated. We tried it with both useJTA=true and useJTA=false One other side query: If we have one-many relation(parent child) in assembler, which points to the same assembler. If a child change, do we need to send refresh on the child only or parent only or the recursively from top most parent to bottom most child. -Shailesh --- In flexcoders@yahoogroups.com, Jeff Vroom jvroom@ wrote: There are two use cases where we DMS will use the UserTransaction. 1) When your assembler has use-transactions=true, and you commit a change or batch of changes, the DMS code will start a transaction before calling your createItem, updateItem, and deleteItem methods. If any of those get an error, the transaction is rolled back and all of the changes are put back into the uncommitted list on the client. If they all succeed the transaction is committed and the changes pushed to other interested clients. 2) If you use the DataServiceTransaction api to push changes from the server, when you call begin you can pass in a value of true which causes the DMS stuff to start a JTA transaction in that call. When you call commit, the JTA transaction is committed if the setRollbackOnly call was not made. This is just a convenience if you happen to have some JDBC code which is updating the database. You want to both commit those changes and push the changes to other clients or rollback those changes and cancel those changes. For 1), when you are also using Hibernate, the hibernate assembler will register a hibernate current session context class. The goal of this class is to ensure that we create one hibernate session for each JTA transaction we create for DMS and commit/roll them back in sync. Going forward I'd like to offer another way to do this so that we can more flexibly integrate with other ways of using hibernate sessions. Jeff From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of den.orlov Sent: Wednesday, December 12, 2007 2:10 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex Data Management and container's UserTransaction As I understand Flex Data Management Services require that application container provide UserTransaction for it. But I can't find any guide about how FDMS uses it. I was completely confused when I checked several tutorials that used FDMS+HibernateAssempler+Spring or FDMS+hand written Assempler+Hibernate+Spring. That tutorial http://blogs.adobe.com/mtg/2006/08/my_first_hibernate_enabled_fle.html http://blogs.adobe.com/mtg/2006/08/my_first_hibernate_enabled_fle.html specify that Hibernate's SessionFactory use datasource not tied to global transaction manager. This tutorials: http://devblog.ezmo.com/2007/05/29/using-flex-data-services-with-spring- and-hibernate/ http://devblog.ezmo.com/2007/05/29/using-flex-data-services-with-spring -and-hibernate/ http://iamjosh.wordpress.com/2007/11/08/building-a-livecycle-data-servic e-application/ http://iamjosh.wordpress.com/2007/11/08/building-a-livecycle-data-servi ce-application/ don't specify that SessionFactory should use global transaction scope for Session and use local transaction management. So what's the purpose of FDMS to have reference to container's UserTransaction? Den
[flexcoders] Re: Flex Data Management and container's UserTransaction
Thanks Jeff. 1. This is all happening in remote Service (I dont have access to assembler's transaction there). Hence I am creating new DataServiceTransaction. Does refresh and update happen on a different thread? For assemblers, I use Hibernate Interceptor which works great. 2. singleSession = true binds a session to a threadLocal, so the same session should be available to all as long as its happening on the same thread 3. If we have one-many relation(parent child) in assembler, which points to the same assembler. If a child changes outside of the scope of the assembler, do we need to send refresh on the child only or parent only or the recursively from top most parent to bottom most child. -Shailesh --- In flexcoders@yahoogroups.com, Jeff Vroom [EMAIL PROTECTED] wrote: Hi Shailesh, I'm not sure what the problems are... It sounds like you are using the DataServiceTransaction.begin() and commit() methods yourself (the other way this can be used is if you call the DataServiceTransaction.getCurrentDataServiceTransaction() call from inside of an assembler method such as createItem). When you call begin, if you specify useJTA=false I think that when you call commit() on the data service transaction that those calls should go out no matter what. By the time this calls is made though, we will assume that the changes you are telling us about have been applied to the data base and either have already been committed. It could be that you are calling commit() just before the transaction has been committed?The part that could go wrong there is the refresh fill process. If you call createItem() and then commit(), the commit will go through each managed fill and potentially re-execute those queries to pick up the newly added item. If this fill call re-queries the database so it does not see the change applied, it would not refresh it properly. It might be that in one mode you are using the HibernateAssembler picks up the same session and so sees those changes and in the other mode is picks up a different session? I'm not sure... if you still have questions and can generate a server debug log for the problematic case I'm happy to take a look. Jeff From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Shailesh Mangal Sent: Wednesday, February 13, 2008 2:57 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Flex Data Management and container's UserTransaction Turned out that Its not the transaction, its OpenSessionInViewFilter's flag for singleSession which caused my updates fail [For reasons not known]. So, in a nut shell, If you have, 1. singleSession = true, DataServiceTransaction wouldnt send out the updates 2. singleSession = false, DataServiceTransaction send out the updates just fine. (problem with this approach is bulk operations will exhaust resources as every request will fetch a new session object) Will appreciate comments if any one has witnessed the same behavior. -Shailesh --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Shailesh Mangal shailesh.mangal@ wrote: In usecase-2, what should happen when method that begins dataServiceTransaction is already within a JTA transaction. In our codebase, We have some remote services which send refreshes to the client using DataServiceTransaction. All these refreshes were working fine until we wrapped my services into Spring TransactionProxy. Any clue is highly appreciated. We tried it with both useJTA=true and useJTA=false One other side query: If we have one-many relation(parent child) in assembler, which points to the same assembler. If a child change, do we need to send refresh on the child only or parent only or the recursively from top most parent to bottom most child. -Shailesh --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Jeff Vroom jvroom@ wrote: There are two use cases where we DMS will use the UserTransaction. 1) When your assembler has use-transactions=true, and you commit a change or batch of changes, the DMS code will start a transaction before calling your createItem, updateItem, and deleteItem methods. If any of those get an error, the transaction is rolled back and all of the changes are put back into the uncommitted list on the client. If they all succeed the transaction is committed and the changes pushed to other interested clients. 2) If you use the DataServiceTransaction api to push changes from the server, when you call begin you can pass in a value of true which causes the DMS stuff to start a JTA transaction in that call. When you call commit, the JTA transaction is committed if the setRollbackOnly call was not made. This is just a convenience if you happen to have some JDBC code which is updating the database
[flexcoders] Wierd LCDS behavior
All, We observed a strange LCDS behavior. We have tried all other permutation and combinations of this that we could think of. Any help is highly appreciated. Here is Object tree, collection of A is bound to a tree and collection of B is bound to a grid in the same canvas A | -- Child Collection[A] (one to many) | -- Parent [A](Many to one, read-only=true) | -- Another Collection [B] (one to many) B | Another Object [C] (many to one) | Another Object [A] (many to one) All the relations are managed in data management_config. Everything works fine if collection B (inside A) is empty. But if collection B has some data in it, we get following behavior: When we delete the top most items or their immediate children in the collection, everything works fine and items disappears from the tree. But we go two level deeper, the item gets deleted fine from database but we don't get updates and UI keep showing the item in the tree. If we attempt another delete operation on the same item, it disappears from the tree also. If anyone interested, I am happy to share our datamodel / relevant object classes. -Shailesh
[flexcoders] select folder using FileReferenceList
Hi all, I want user to select a folder but fileFilter only allows to filter (and select) files. Is there a way where I can show user the file browse dialog and allow him to select a folder. Any work arounds? -Shailesh
[flexcoders] NPE after upgrading to LCDS
I just upgraded to LCDS and Hotfix-3 and start getting following exception exception: java.lang.NullPointerException at flex.data.assemblers.HibernateAssembler.start(HibernateAssembler.java:170) at flex.data.adapters.JavaAdapter.getAssemblerObject(JavaAdapter.java:1334) at flex.data.adapters.JavaAdapter.invoke(JavaAdapter.java:491) at flex.messaging.services.MessageService.serviceMessage(MessageService.java:252) at flex.messaging.services.MessageService.serviceMessage(MessageService.java:200) at flex.data.DataService.serviceMessage(DataService.java:525) at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:1165) at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:757) at flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(AbstractRTMPServer.java:888) at flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTMPConnection.java:424) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:613) Rollback seems to be the only option at this point.
[flexcoders] Re: NPE after upgrading to LCDS
It was a working FDS project and had only one messageBroker Servlet configured. I just applied 1. SDK HotFix-2 and HotFix-3 2. Copied over following from within flex.war a. /WEB-INF/flex/jars b. /WEB-INF/lib/ c. /WEB-INF/flex/libs to their corresponding folders in the existing project. Is there anything I am missing. -Shailesh --- In flexcoders@yahoogroups.com, Jeff Vroom [EMAIL PROTECTED] wrote: Do you perhaps have more than one MessageBrokerServlet configured in the same web application? The hibernate assembler is trying to do: dataDestination = DataDestination.getDataDestination(destinationId); which is using the default MessageBroker.getMessageBroker() method to try and look up the destination for this data type. For some reason, it is probably finding the wrong MessageBroker. The hibernate assembler probably should be getting the message broker id of the message broker that initializes it and use that to look up the destination. Jeff From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Shailesh Mangal Sent: Wednesday, September 26, 2007 1:03 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] NPE after upgrading to LCDS I just upgraded to LCDS and Hotfix-3 and start getting following exception exception: java.lang.NullPointerException at flex.data.assemblers.HibernateAssembler.start(HibernateAssembler.java:17 0) at flex.data.adapters.JavaAdapter.getAssemblerObject(JavaAdapter.java:1334) at flex.data.adapters.JavaAdapter.invoke(JavaAdapter.java:491) at flex.messaging.services.MessageService.serviceMessage(MessageService.jav a:252) at flex.messaging.services.MessageService.serviceMessage(MessageService.jav a:200) at flex.data.DataService.serviceMessage(DataService.java:525) at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:11 65) at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoin t.java:757) at flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(Abstrac tRTMPServer.java:888) at flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTMPCo nnection.java:424) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker .runTask(ThreadPoolExecutor.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker .run(ThreadPoolExecutor.java:690) at java.lang.Thread.run(Thread.java:613) Rollback seems to be the only option at this point.
[flexcoders] Upgrading SDK to HotFix3 and FDS to LCDS 2.5
We are trying to upgrade our existing FDS project from Flex SDK 2.0.1 to HotFix2 and HotFix3 (which also require upgrading FDS to LCDS 2.5). 1. Is there any reason not to upgrade? The only reason this is a confusion is that in the KB, Adobe suggests not to unless you have specific problems. 2. There is no LCDS version for MAC (http://kb.adobe.com/selfservice/viewContent.do?externalId=kb402000sliceId=2) How to upgrade it on mac. Will appreciate if some one who has done similar upgrade can share their experience. -Shailesh
[flexcoders] Re: Find parent of selected item in tree
This will only work for XMLCollection. What about ArrayCollections? -Shailesh --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Isn't it just selectedItem.parent()? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dffmyco Sent: Monday, September 24, 2007 7:16 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Find parent of selected item in tree I just can not seem to figure out how to get the parent of a selected item ([EMAIL PROTECTED]). In this case I need to know the genus name when a species is selected. Note that a species name is not unique to a genus name, Uromyces ingae and Puccinia ingae public var nameData:XML = allData genus name=Uromyces species name=ingae/ species name=elegans/ species name=dolicholi/ /genus genus name=Ravenelia species name=irregularis / /genus genus name=Puccinia species name=ingae/ species name=manoelae/ species name=longirostris/ /genus /allData Thanks, Dave
Re: [flexcoders]Is there an event that the application dispatches when a flash s
There is no Unidle(reactive) event. How do you reset the timer. Are MouseMove and KeyEvent the only options? -Shailesh --- In flexcoders@yahoogroups.com, Bjorn Schultheiss [EMAIL PROTECTED] wrote: nice.. On 12/04/2007, at 3:31 PM, Matt Chotin wrote: http://livedocs.adobe.com/flex/201/langref/mx/managers/ SystemManager.html#event:idle Grab the systemManager from the Application for example and just add an event listener for FlexEvent.IDLE and away you go. Matt From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Bjorn Schultheiss Sent: Wednesday, April 11, 2007 8:23 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders]Is there an event that the application dispatches when a flash swf has not been interacted with for a certain amount of time? I don't think there is a predefined event for this. If i were to do it, in the application scope i would set handlers for mouseDown, mouseMove and keyDown to monitor activity time periods with each interaction resetting a Timer object. regards, Bjorn On 12/04/2007, at 12:58 PM, dorkie dork from dorktown wrote: Is there an event that the application dispatches when a flash swf has not been interacted with for a certain amount of time? For example, I have a site that a user has to log into. After they login if they have not interacted at all with the application is there a event that is dispatched that I can listen for so I can log the user out? If not can I suggest something like this: Application inactivityTimeout=10 Application.addEventListener(Application.INACTIVITY, myLogOutFunction); public function myLogoutFunction(event:Event):void { // logoutService.send(); // applicationState.selectedChild = loginState; // loginMessage.text = You haven't done anything for 10 minutes. Get back to work.; }
[flexcoders] Re: Jetty with JOTM causes ClassCastException in FDS
Thanks Jeff, I was able to get a stand alone Tomcat working. But for a speedy development embedded server make so much sense. Further, our team is used to running Tomcat/Jetty inline (via Maven). For some reason that configuration is not able to load the UserTransaction. Will try to switch off JTA but I am afraid when we actually deploy, we might have some unforeseen issues. -Shailesh --- In flexcoders@yahoogroups.com, Jeff Vroom [EMAIL PROTECTED] wrote: When you use Data Management Services to update objects on the server side, and your destination has use-transactions=true, FDS will create a JTA transaction before it calls your assembler methods. The problem you are running into is that this code is failing... it is a pretty standard set of features for a J2EE server though servlet containers don't usually support JTA out of the box. You might be able to workaround this problem by setting use-transactions=false on your destinations though you'll still need JTA libraries to be available to satisfy linkage. Here's a JSP file which you can use to test the transaction support in your servlet container: %@ page import=javax.transaction.UserTransaction % %@ page import=javax.naming.InitialContext % %@ page import=javax.naming.Context % body startbr % try { Context ctx = new InitialContext(); String userTransactionJndi = java:comp/UserTransaction; String userSpecified = System.getProperty(UserTxJndiName); if (userSpecified != null) { userTransactionJndi = userSpecified; } UserTransaction userTransaction = (UserTransaction) ctx.lookup(userTransactionJndi); if (userTransaction != null) { userTransaction.begin(); out.println(begin ok!br); userTransaction.commit(); out.println(commit ok!br); } else { out.println(returned null); } } catch (Exception ne) { out.println(ne.toString()); } % done /body From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Shailesh Mangal Sent: Sunday, May 27, 2007 2:56 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Jetty with JOTM causes ClassCastException in FDS I decided to try tomcat, only to get following (version 5.5.15) [Flex] cause=javax.naming.NamingException: Cannot create resource instance type=class javax.naming.NamingException javax.naming.NamingException: Cannot create resource instance at org.apache.naming.factory.TransactionFactory.getObjectInstance(Transacti onFactory.java:98) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) at org.apache.naming.NamingContext.lookup(NamingContext.java:792) at org.apache.naming.NamingContext.lookup(NamingContext.java:139) at org.apache.naming.NamingContext.lookup(NamingContext.java:780) at org.apache.naming.NamingContext.lookup(NamingContext.java:152) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:136) at javax.naming.InitialContext.lookup(InitialContext.java:351) at flex.data.DataServiceTransaction.doBegin(DataServiceTransaction.java:653 ) at flex.data.DataServiceTransaction.begin(DataServiceTransaction.java:624) at flex.data.DataService.serviceTransactedMessage(DataService.java:474) at flex.data.DataService.serviceMessage(DataService.java:241) at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:54 8) at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoin t.java:302) at flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(Abstrac tRTMPServer.java:682) at flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTMPCo nnection.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker .runTask(ThreadPoolExecutor.java:643) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker .run(ThreadPoolExecutor.java:668) --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Shailesh Mangal shailesh.mangal@ wrote: Adding to this, I found that I can read the data (using Fill()) but as soon I use createItem(), FDS blows up (giving ClassCastException) -Shailesh --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Shailesh Mangal shailesh.mangal@ wrote: Hi All, After struggling for a quite a while, I was able to configure Jetty with JOTM (to a point where it starts cleanly). Now I am getting a ClassCast Exception in JNDILookup. Wondering if anyone has come across following error (FDS output in Debug mode). Same
[flexcoders] Re: Jetty with JOTM causes ClassCastException in FDS
I decided to try tomcat, only to get following (version 5.5.15) [Flex] cause=javax.naming.NamingException: Cannot create resource instance type=class javax.naming.NamingException javax.naming.NamingException: Cannot create resource instance at org.apache.naming.factory.TransactionFactory.getObjectInstance(TransactionFactory.java:98) at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304) at org.apache.naming.NamingContext.lookup(NamingContext.java:792) at org.apache.naming.NamingContext.lookup(NamingContext.java:139) at org.apache.naming.NamingContext.lookup(NamingContext.java:780) at org.apache.naming.NamingContext.lookup(NamingContext.java:152) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:136) at javax.naming.InitialContext.lookup(InitialContext.java:351) at flex.data.DataServiceTransaction.doBegin(DataServiceTransaction.java:653) at flex.data.DataServiceTransaction.begin(DataServiceTransaction.java:624) at flex.data.DataService.serviceTransactedMessage(DataService.java:474) at flex.data.DataService.serviceMessage(DataService.java:241) at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:548) at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:302) at flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(AbstractRTMPServer.java:682) at flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTMPConnection.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:643) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:668) --- In flexcoders@yahoogroups.com, Shailesh Mangal [EMAIL PROTECTED] wrote: Adding to this, I found that I can read the data (using Fill()) but as soon I use createItem(), FDS blows up (giving ClassCastException) -Shailesh --- In flexcoders@yahoogroups.com, Shailesh Mangal shailesh.mangal@ wrote: Hi All, After struggling for a quite a while, I was able to configure Jetty with JOTM (to a point where it starts cleanly). Now I am getting a ClassCast Exception in JNDILookup. Wondering if anyone has come across following error (FDS output in Debug mode). Same issue is discussed on in decent depth, http://tech.groups.yahoo.com/group/flexcoders/message/51486 but no concrete solution suggested. [Flex] Error handling rtmp message: flex.data.DataServiceException: Unable to access UserTransaction in DataService. incomingMessage: Flex Message (flex.data.messages.DataMessage) operation = transacted id = null clientId = D9CE4977-870F-8C20-2C39-C6D4DA7BB599 correlationId = destination = loginService messageId = 466A87F6-D404-76D9-361C-C7CE219FDB80 timestamp = 1180173215095 timeToLive = 0 body = [ Flex Message (flex.data.messages.DataMessage) operation = create_and_sequence id = ASObject(10255870){id=1234} clientId = 03D24138-E112-748E-2BED-C7CE1F822C65 correlationId = 466A87F6-D404-76D9-361C-C7CE219FDB80 destination = loginService messageId = 6C4AEB83-B4A2-73F6-5541-C7CE219CF4BB timestamp = 0 timeToLive = 0 body = [EMAIL PROTECTED] ] hdr(DSEndpoint) = my-rtmp errorReply: Flex Message (flex.messaging.messages.ErrorMessage) clientId = null correlationId = 466A87F6-D404-76D9-361C-C7CE219FDB80 destination = loginService messageId = D9CE49A3-790B-1933-0AD6-36F523BDEB89 timestamp = 1180173215113 timeToLive = 0 body = null code = Server.Processing message = Unable to access UserTransaction in DataService. details = null rootCause = java.lang.ClassCastException: org.objectweb.jotm.Current body = null extendedData = null [Flex] cause=java.lang.ClassCastException: org.objectweb.jotm.Current type=class java.lang.ClassCastException java.lang.ClassCastException: org.objectweb.jotm.Current at flex.data.DataServiceTransaction.doBegin(DataServiceTransaction.java:653) at flex.data.DataServiceTransaction.begin(DataServiceTransaction.java:624) at flex.data.DataService.serviceTransactedMessage(DataService.java:474) at flex.data.DataService.serviceMessage(DataService.java:241) at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:548) at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:302) at flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(AbstractRTMPServer.java:682) at flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTMPConnection.java
[flexcoders] Re: Flex + Struts
Do you run tomcat using maven plugin (maven tomcat:run) I have a tomcat that runs stand alone but the embedded server fails in JNDI (tried both jetty and tomcat). Any one using embedded J2EE container? -Shailesh --- In flexcoders@yahoogroups.com, Oliver Lietz [EMAIL PROTECTED] wrote: Am Donnerstag, 4. Januar 2007 19:28 schrieb Dimitrios Gianninas: Note: I am no struts expert. 1) Download FDS express and install on your PC. Extract the flex.war and then take everything in the web.xml and it to your own. Then take everything in WEB-INF/lib and WEB-INF/flex and add it your app. Create a simple helloworld.mxml and try to see if it work via your browser. If it does then everything is working. You don't need everything when compiling SWFs local. Here are my settings for FDS/Remoting with already compiled SWFs (no AS and MXML files on the server): webx.xml: [...] context-param param-nameflex.class.path/param-name param-value/WEB-INF/lib/param-value /context-param listener listener-classflex.messaging.HttpFlexSession/listener-class /listener servlet servlet-nameMessageBrokerServlet/servlet-name servlet-classflex.messaging.MessageBrokerServlet/servlet-class init-param param-nameservices.configuration.file/param-name param-value/WEB-INF/flex/services-config.xml/param-value /init-param init-param param-nameflex.write.path/param-name param-value/WEB-INF/flex/param-value /init-param load-on-startup1/load-on-startup /servlet servlet-mapping servlet-nameMessageBrokerServlet/servlet-name url-pattern/messagebroker/*/url-pattern /servlet-mapping [...] pom.xml: [...] !-- flex -- dependency groupIdflex/groupId artifactIdflex-messaging/artifactId version2.0/version /dependency dependency groupIdflex/groupId artifactIdflex-messaging-common/artifactId version2.0/version /dependency dependency groupIdflex/groupId artifactIdflex-messaging-opt/artifactId version2.0/version /dependency dependency groupIdflex/groupId artifactIdflex-messaging-req/artifactId version2.0/version /dependency !-- flex commons -- dependency groupIdcommons-codec/groupId artifactIdcommons-codec/artifactId version1.3/version /dependency dependency groupIdcommons-httpclient/groupId artifactIdcommons-httpclient/artifactId version3.0.1/version /dependency dependency groupIdcommons-logging/groupId artifactIdcommons-logging/artifactId version1.0.4/version /dependency !-- flex concurrent -- dependency groupIdbackport-util-concurrent/groupId artifactIdbackport-util-concurrent/artifactId version2.2/version /dependency dependency groupIdconcurrent/groupId artifactIdconcurrent/artifactId version1.3.4/version /dependency !-- flex jta -- dependency groupIdjotm/groupId artifactIdjotm/artifactId version2.0.10/version /dependency [...] Put the Flex jars in your local Maven2 repository. If you don't use m2 copy the jars to WEB-INF/lib. JOTM is for use with Tomcat (servers without build-in transaction support). O.
[flexcoders] Jetty with JOTM causes ClassCastException in FDS
Hi All, After struggling for a quite a while, I was able to configure Jetty with JOTM (to a point where it starts cleanly). Now I am getting a ClassCast Exception in JNDILookup. Wondering if anyone has come across following error (FDS output in Debug mode). Same issue is discussed on in decent depth, http://tech.groups.yahoo.com/group/flexcoders/message/51486 but no concrete solution suggested. [Flex] Error handling rtmp message: flex.data.DataServiceException: Unable to access UserTransaction in DataService. incomingMessage: Flex Message (flex.data.messages.DataMessage) operation = transacted id = null clientId = D9CE4977-870F-8C20-2C39-C6D4DA7BB599 correlationId = destination = loginService messageId = 466A87F6-D404-76D9-361C-C7CE219FDB80 timestamp = 1180173215095 timeToLive = 0 body = [ Flex Message (flex.data.messages.DataMessage) operation = create_and_sequence id = ASObject(10255870){id=1234} clientId = 03D24138-E112-748E-2BED-C7CE1F822C65 correlationId = 466A87F6-D404-76D9-361C-C7CE219FDB80 destination = loginService messageId = 6C4AEB83-B4A2-73F6-5541-C7CE219CF4BB timestamp = 0 timeToLive = 0 body = [EMAIL PROTECTED] ] hdr(DSEndpoint) = my-rtmp errorReply: Flex Message (flex.messaging.messages.ErrorMessage) clientId = null correlationId = 466A87F6-D404-76D9-361C-C7CE219FDB80 destination = loginService messageId = D9CE49A3-790B-1933-0AD6-36F523BDEB89 timestamp = 1180173215113 timeToLive = 0 body = null code = Server.Processing message = Unable to access UserTransaction in DataService. details = null rootCause = java.lang.ClassCastException: org.objectweb.jotm.Current body = null extendedData = null [Flex] cause=java.lang.ClassCastException: org.objectweb.jotm.Current type=class java.lang.ClassCastException java.lang.ClassCastException: org.objectweb.jotm.Current at flex.data.DataServiceTransaction.doBegin(DataServiceTransaction.java:653) at flex.data.DataServiceTransaction.begin(DataServiceTransaction.java:624) at flex.data.DataService.serviceTransactedMessage(DataService.java:474) at flex.data.DataService.serviceMessage(DataService.java:241) at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:548) at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:302) at flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(AbstractRTMPServer.java:682) at flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTMPConnection.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:643) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:668) at java.lang.Thread.run(Thread.java:613)
[flexcoders] Re: Jetty with JOTM causes ClassCastException in FDS
Adding to this, I found that I can read the data (using Fill()) but as soon I use createItem(), FDS blows up (giving ClassCastException) -Shailesh --- In flexcoders@yahoogroups.com, Shailesh Mangal [EMAIL PROTECTED] wrote: Hi All, After struggling for a quite a while, I was able to configure Jetty with JOTM (to a point where it starts cleanly). Now I am getting a ClassCast Exception in JNDILookup. Wondering if anyone has come across following error (FDS output in Debug mode). Same issue is discussed on in decent depth, http://tech.groups.yahoo.com/group/flexcoders/message/51486 but no concrete solution suggested. [Flex] Error handling rtmp message: flex.data.DataServiceException: Unable to access UserTransaction in DataService. incomingMessage: Flex Message (flex.data.messages.DataMessage) operation = transacted id = null clientId = D9CE4977-870F-8C20-2C39-C6D4DA7BB599 correlationId = destination = loginService messageId = 466A87F6-D404-76D9-361C-C7CE219FDB80 timestamp = 1180173215095 timeToLive = 0 body = [ Flex Message (flex.data.messages.DataMessage) operation = create_and_sequence id = ASObject(10255870){id=1234} clientId = 03D24138-E112-748E-2BED-C7CE1F822C65 correlationId = 466A87F6-D404-76D9-361C-C7CE219FDB80 destination = loginService messageId = 6C4AEB83-B4A2-73F6-5541-C7CE219CF4BB timestamp = 0 timeToLive = 0 body = [EMAIL PROTECTED] ] hdr(DSEndpoint) = my-rtmp errorReply: Flex Message (flex.messaging.messages.ErrorMessage) clientId = null correlationId = 466A87F6-D404-76D9-361C-C7CE219FDB80 destination = loginService messageId = D9CE49A3-790B-1933-0AD6-36F523BDEB89 timestamp = 1180173215113 timeToLive = 0 body = null code = Server.Processing message = Unable to access UserTransaction in DataService. details = null rootCause = java.lang.ClassCastException: org.objectweb.jotm.Current body = null extendedData = null [Flex] cause=java.lang.ClassCastException: org.objectweb.jotm.Current type=class java.lang.ClassCastException java.lang.ClassCastException: org.objectweb.jotm.Current at flex.data.DataServiceTransaction.doBegin(DataServiceTransaction.java:653) at flex.data.DataServiceTransaction.begin(DataServiceTransaction.java:624) at flex.data.DataService.serviceTransactedMessage(DataService.java:474) at flex.data.DataService.serviceMessage(DataService.java:241) at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:548) at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:302) at flex.messaging.endpoints.rtmp.AbstractRTMPServer.dispatchMessage(AbstractRTMPServer.java:682) at flex.messaging.endpoints.rtmp.NIORTMPConnection$RTMPReader.run(NIORTMPConnection.java:665) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:643) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:668) at java.lang.Thread.run(Thread.java:613)
[flexcoders] Re: FDS Samples
Wondering if you have tried Jetty with JOTM. I am getting follwoing error when i use DataManagement. Is it sufficient to put carol.properties in classpath? BTW, this code works on Tomcat 5.5 [RPC Fault faultString=Unable to access UserTransaction in DataService. faultCode=Server.Processing faultDetail=null] at mx.data::ConcreteDataService/http://www.adobe.com/2006/flex/mx/internal::dispatchFaultEvent() at mx.data::CommitResponder/fault() at mx.rpc::AsyncRequest/fault() at ::NetConnectionMessageResponder/NetConnectionChannel.as$40:NetConnectionMessageResponder::statusHandler() at mx.messaging::MessageResponder/status() -Shailesh --- In flexcoders@yahoogroups.com, hank williams [EMAIL PROTECTED] wrote: yeah, jboss is a JEE application server so I think JOTM is part of the spec by now. But I didnt know resin had it. Jetty is another one that should go more smoothly than tomcat since JOTM came out of the jetty project. If it had turned out to be much harder than it actually was I probably would have switched. But as it turns out the biggest issue with using tomcat is the documentation, not the actual process. Hank On 6/18/06, Jeremy Lu [EMAIL PROTECTED] wrote: Thanks for the detailed tutorial. Btw, I tried to install FDS on JBoss and Resin and it worked pretty well, just have to comment out one block in the configuration file. Maybe the document should mention this so people have another choice over Tomcat ? Jeremy. On 6/19/06, klumikaze [EMAIL PROTECTED] wrote: Couldn't agree with your comments more... I burned about 4 hours the other day trying to get FDS up and running with Tomcat (will have to try your clearer instructions on the JOTM install, as I tried the 2 sources you mentioned and did not get anywhere). In Adobe's defense, I don't think it's just them, the Java community seems to have so many amazing platforms and frameworks, but there's so many that just accomplish the same thing, and in general, there's no simple documentation on installation or usage that makes any sense. Sometimes it seems like it takes 6 frameworks running around the clock to print out 'hello world'. :) All that being said, I'm sure that once Flex 2 goes GA, we'll see much better documentation on all of this. They are probably a little busy right now... Thanks again for the instructions though, I'm sure these will help many who found the JOTM instructions cryptic before. Brian --- In flexcoders@yahoogroups.com, hank williams hank777@ wrote: I wrote up a little explanation that is much (I think) easier to understand that the instructions provided by adobe for installing JOTM (which is necessary for FDS) 1. un gzip the file http://debian-sf.objectweb.org/projects/jotm 2. go to the lib directory in the resulting uncompressed folder 3. place all the files in this folder in the $CATALINA_HOME/shared/lib directory except: a. log4j.jar b. commons-cli.jar c. jotm_iiop_stubs.jar NOTE: $CATALINA_HOME is just your tomcat folder. 4. Add the following XML to $CATALINA_HOME/conf/server.xml Context path=/samples docBase=samples debug=0 reloadable=true crossContext=true !-- Description of the resource UserTransaction -- Resource name=UserTransaction auth=Container type= javax.transaction.UserTransaction / ResourceParams name=UserTransaction parameter namefactory/name valueorg.objectweb.jotm.UserTransactionFactory/value /parameter parameter namejotm.timeout/name value60/value /parameter /ResourceParams /Context NOTE: In the first line above, the word samples listed twice, should be whatever the name of your webapp is. Using samples allows you to run the samples application that comes with FDS. On 6/18/06, hank williams hank777@ wrote: Well, I figured out what the problem is. On the wiki (but nowhere in the downloaded package) it says that FDS on Tomcat requires the JOTM transaction manager. The wiki points to two articles by unrelated third parties that have different instructions for what is required to install. Then there are some additional instructions directly in the wiki that seem to overlap and contradict the instructions in the articles. The bottom line is this is no easy drop a war or jar in and your done kind of installation - or if it is, then the instructions are even worse than I thought. I would suggest that adobe make the effort to tighten up the documentation on this and maybe do some kind of an installer that maybe even makes the necessary adjustments to the
[flexcoders] Re: Error: default arguments may not be interspersed with other options
Thanks Bjorn, It certainly worked, So you keep two copies of SDK or is there a way to point FlexBuilder to this new version of FlexSDK and delete from its original location (/Applications/Adobe Flex Builder 2 Plug-in/Flex SDK 2/) -Shailesh --- In flexcoders@yahoogroups.com, Bjorn Schultheiss [EMAIL PROTECTED] wrote: I copied my SDK into /Library/Flex2SDK/ therefore removing any folder name issues. Hopefully thats your only issue.. On 30/04/2007, at 2:03 PM, Shailesh Mangal wrote: I am trying to run my command line ant build (working on windows) on my mac. I got following error. Error: default arguments may not be interspersed with other options Wondering if there mac geeks out there who have already solved this. I looked for thishere , but couldnt figure out. I believe its something to do with the space in the path. I am using default installation location for Flex SDK /Applications/Adobe\ Flex\ Builder\ 2\ Plug-in/Flex\ SDK\ 2/ and my project doesnt have any path in it. Any suggestions? Regards, Bjorn Schultheiss Senior Developer Personalised Communication Power Level 2, 31 Coventry St. South Melbourne 3205, VIC Australia T: +61 3 9674 7400 F: +61 3 9645 9160 W: http://www.qdc.net.au ((This transmission is confidential and intended solely for the person or organization to whom it is addressed. It may contain privileged and confidential information. If you are not the intended recipient, you should not copy, distribute or take any action in reliance on it. If you believe you received this transmission in error, please notify the sender.---))
[flexcoders] Error: default arguments may not be interspersed with other options
I am trying to run my command line ant build (working on windows) on my mac. I got following error. Error: default arguments may not be interspersed with other options Wondering if there mac geeks out there who have already solved this. I looked for this here http://labs.adobe.com/wiki/index.php/Talk:Flex_Ant_Tasks#Tasks_don.27t_\ support_spaces_in_paths , but couldnt figure out. I believe its something to do with the space in the path. I am using default installation location for Flex SDK /Applications/Adobe\ Flex\ Builder\ 2\ Plug-in/Flex\ SDK\ 2/ and my project doesnt have any path in it. Any suggestions?
[flexcoders] Re: e4x - attribute based selector
Thanks Tracy, Thats exactly what I ended up doing, 1. Clone the original collection 2. get XMLList of the nodes that I dont want 3. Delete them -sxm --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: That is a tough one. It is more of a transformation than a selection. If you can't do it directly, consider using the selection expression to return the nodes you do NOT want, then deleting them from the XML. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Shailesh Mangal Sent: Wednesday, January 24, 2007 8:13 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] e4x - attribute based selector All, I have a following xml structure retrieved from server root parent name=good child name=abc/ child name=cba/ child name=abc/ /parent parent name=notGood child name=abc/ child name=def/ child name=fed/ /parent /root and I want to make a selection based on the attribute of child. e.g. for child with name abc, get a result as.. root parent name=good child name=abc/ child name=abc/ /parent parent name=notGood child name=abc/ /parent /root I tried following, result..child.(@name==abc) result.root.parent.child.(@name==abc) but I end up getting following child name=abc child name=abc child name=abc Any suggestions? sxm
[flexcoders] e4x - attribute based selector
All, I have a following xml structure retrieved from server root parent name=good child name=abc/ child name=cba/ child name=abc/ /parent parent name=notGood child name=abc/ child name=def/ child name=fed/ /parent /root and I want to make a selection based on the attribute of child. e.g. for child with name abc, get a result as.. root parent name=good child name=abc/ child name=abc/ /parent parent name=notGood child name=abc/ /parent /root I tried following, result..child.(@name==abc) result.root.parent.child.(@name==abc) but I end up getting following child name=abc child name=abc child name=abc Any suggestions? sxm
[flexcoders] Titlewindow dragging and dropping within canvas
I need to put a titleWindow over the canvas (either as a child or as popup) and should be draggable by it titleBar (and not the body) confined with the canvas and should not flow over other components on the screen. I did it successfully by implementing custom dragging but that lets the whole titleWindow draggable. Tried with Popup manager but drag events dont get bubbled up except close and mousedownout. I need to capture dragComplete to make confine the dragged component into a defined boundary. I tried dragComplete on the dragged component. Are there alternative ways to do this?
[flexcoders] Re: Flex and Maven2 managed project
I am planning to use Maven for my new flex project. Wondering if someone can share their experience of using maven folder structure, POM file, todo and not todo items, limitations etc -sxm --- In flexcoders@yahoogroups.com, Oliver Lietz [EMAIL PROTECTED] wrote: Am Montag, 18. Dezember 2006 08:19 schrieb Aldo Bucchi: Yeah Maven!, I'm a little surprised on the apparent low interest in the flex-maven front. I'm not surprised ;). Most people will start with a shiny frontend which sells the application. Project (build/change/livecycle) management is not as sexy as eye candy for most of them. I am also flirting with the idea of building a plugin, but not yet... not yet... tomorrow perhaps :), same here I would really like to hear about Adobe's plans with respect to Maven. It would be a very good way to make things easier for new developers ( by leveraging something that's already built for you ) and to make things more attractive to veterans. Really, maven is one of those little toys I really really love. My wishlist on this one ( thinking java here ): * mavenized standardization of folder structures for flex applications ( all flavors: standalone, fds, etc ) ** src/main/flex, src/test/flex? Did that already for my projects without integrating testing. Works fine - same layout (SVN+MVN) for Flex and Java projects. * maven plugins: ** flexunit ( or asunit ) ** mxmlc ** asdoc *** including complex features (eg. auto compile and deploy examples) * definitions and workflow for continuous integration deployoment ( cruise control and continuum hopefully ) and then some extra would-be-nice-to-have plugins: * auto generate fds stubs/skeletons ( vos, assemblers, dataproviders, dataservices, etc ) for hibernate, JDO, other ORMs * springified fds ...? Nice, indeed. I hope someone at Adobe is already working on Mavenization of Flex. O.
[flexcoders] Re: Flex and Maven2 managed project
I dont have huge exp with Maven either. I just liked some of the features that it brings to the table e.g. Modular, inheritance, more then build (report, testing etc) out of the box (of course u can build all these in ant as well). Specially when I would need multiple projects for client (Flex modules, action script libraries), server (FDS, XFire, Hibernate etc) would like know what people are using in mulitple project env. -sxm --- In flexcoders@yahoogroups.com, Nick Sophinos [EMAIL PROTECTED] wrote: I despise Maven. I know that this is a bit provocative, but my experience with those who utterly abuse it to the point where the project is *anything but manageble* has led me to this conclusion. I am always open to change, though. Thoughts, anyone? - Nick On 1/8/07, Shailesh Mangal [EMAIL PROTECTED] wrote: I am planning to use Maven for my new flex project. Wondering if someone can share their experience of using maven folder structure, POM file, todo and not todo items, limitations etc -sxm --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Oliver Lietz flex@ wrote: Am Montag, 18. Dezember 2006 08:19 schrieb Aldo Bucchi: Yeah Maven!, I'm a little surprised on the apparent low interest in the flex-maven front. I'm not surprised ;). Most people will start with a shiny frontend which sells the application. Project (build/change/livecycle) management is not as sexy as eye candy for most of them. I am also flirting with the idea of building a plugin, but not yet... not yet... tomorrow perhaps :), same here I would really like to hear about Adobe's plans with respect to Maven. It would be a very good way to make things easier for new developers ( by leveraging something that's already built for you ) and to make things more attractive to veterans. Really, maven is one of those little toys I really really love. My wishlist on this one ( thinking java here ): * mavenized standardization of folder structures for flex applications ( all flavors: standalone, fds, etc ) ** src/main/flex, src/test/flex? Did that already for my projects without integrating testing. Works fine - same layout (SVN+MVN) for Flex and Java projects. * maven plugins: ** flexunit ( or asunit ) ** mxmlc ** asdoc *** including complex features (eg. auto compile and deploy examples) * definitions and workflow for continuous integration deployoment ( cruise control and continuum hopefully ) and then some extra would-be-nice-to-have plugins: * auto generate fds stubs/skeletons ( vos, assemblers, dataproviders, dataservices, etc ) for hibernate, JDO, other ORMs * springified fds ...? Nice, indeed. I hope someone at Adobe is already working on Mavenization of Flex. O.
[flexcoders] problem in parsing xml return by HTTPservice, could it be namespace issue
Hi all, Here is the xml I get back from my HTTPService call res:message source=web action=coveragemap id=123 xmlns:res=http://response.coveragemap; com:statusCode xmlns:com=common0/com:statusCode com:statusDesc xmlns:com=commonSuccess/com:statusDesc res:marketValueSanFrancisco_CA/res:marketValue /res:message but when I try to use .. operator for marketValue node, I get null object back. Any suggestions. I tried use namespace also, didnt help. HTTPService Call mx:HTTPService id=xmlPoster2 url={loc + 'coveragemap'} method=POST resultFormat=e4x contentType=application/xml result=showMap(event)/ public function showMap(event:ResultEvent):void{ trace(event.result); var res:XML = event.result..marketValue as XML; var imgName:String = res.toString(); imgSrc = assets/img/ + imgName; coverageMapBox.setVisible(Boolean(true)); }
[flexcoders] Re: problem in parsing xml return by HTTPservice, could it be namespace issue
I figured this out. Here is what worked for me. var res:XML = event.result as XML; var ns:Namespace = res.namespace(); var imgName:String = res..ns::marketValue; :: operator is the key. This works well for the defualt namespace. I still havent figured how to access an element whose namespace different then the default nameSpace and is not known. -Shailesh --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Uisn the index will work but it would be much better to figure out the namespace problem. I am currently working on an example to learn about namespaces myself. Ben Clinkinbeard has posted on this issue often and he has some examples and discussion on his Blog. I plan to head over there and start studying when I have a bit of spare time. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ben Marchbanks Sent: Wednesday, January 03, 2007 8:54 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] problem in parsing xml return by HTTPservice, could it be namespace issue You try what I used to solve the same kind of problem event.result.record[0].myFieldName where my XML looks something like this records record myFeldNamemyValue/myFieldName /record /records Thanks to Tracy Spratt for revealing access to the XML more directly via event.result ! Shailesh Mangal wrote: Hi all, Here is the xml I get back from my HTTPService call res:message source=web action=coveragemap id=123 xmlns:res=http://response.coveragemap http://response.coveragemap com:statusCode xmlns:com=common0/com:statusCode com:statusDesc xmlns:com=commonSuccess/com:statusDesc res:marketValueSanFrancisco_CA/res:marketValue /res:message but when I try to use .. operator for marketValue node, I get null object back. Any suggestions. I tried use namespace also, didnt help. HTTPService Call mx:HTTPService id=xmlPoster2 url={loc + 'coveragemap'} method=POST resultFormat=e4x contentType=application/xml result=showMap(event)/ public function showMap(event:ResultEvent):void{ trace(event.result); var res:XML = event.result..marketValue as XML; var imgName:String = res.toString(); imgSrc = assets/img/ + imgName; coverageMapBox.setVisible(Boolean(true)); }
[flexcoders] Re: remote sandbox security problem for mx:HTTPService
I ran into this same issue. How to use Proxy? Is it because I am using eval license of the builder. -Shailesh --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: You can use the Flex proxy, or write your own. Tracy -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Arnaud Garcia Sent: Thursday, March 09, 2006 7:25 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] remote sandbox security problem for mx:HTTPService Hi all, My app works well when I launch it as a local sandbox but when I put it in my tomcat webserver the sandbox is now on state remote and all the http service call failed. The only way I found is to put a crossdomain.xml in the root of all servers I call ! (which is not possible for a real deployment) = Is there a way to create as we do in java a policy file on the client side or a certificate to trust the swf file ... many thanks for help arnaud -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links
[flexcoders] Re: remote sandbox security problem for mx:HTTPService
I ran into this same issue. How to use Proxy? Is it because I am using eval license of the Flex builder. -Shailesh --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: You can use the Flex proxy, or write your own. Tracy -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Arnaud Garcia Sent: Thursday, March 09, 2006 7:25 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] remote sandbox security problem for mx:HTTPService Hi all, My app works well when I launch it as a local sandbox but when I put it in my tomcat webserver the sandbox is now on state remote and all the http service call failed. The only way I found is to put a crossdomain.xml in the root of all servers I call ! (which is not possible for a real deployment) = Is there a way to create as we do in java a policy file on the client side or a certificate to trust the swf file ... many thanks for help arnaud -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links
[flexcoders] Re: source code of Training from the Source
I know, but my copy is no more usable. Wondering if any one can share theirs. You can send to me the zipped version on my mailID. -sxm --- In flexcoders@yahoogroups.com, Jeff Hindman [EMAIL PROTECTED] wrote: It's on a CD that came with the book. --Jeff Hindman Simon Software Solutions _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Shailesh Mangal Sent: Wednesday, December 27, 2006 5:31 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] source code of Training from the Source Does any one have the source code of Adobe Flex2 - Training from the Source. sxm