Flex :: Use DTOs Or Domain Objects When Connecting To Blazeds/java/jpa Using Remote-services?

Jul 24, 2011

I am working on an Adobe Flex front-end with a Java back-end using JPA for persistence. he protocol I am using is remote objects (AMF) implemented with BlazeDS.I started out with a service-facade and entity DAOs, but without any specific DTOs. The same POJOs, the domain objects, were passed in the service-facade as those used as DTOs passed to the Hibernate DAOs.However, the latest few days I have been thinking whether this is a good approach or not. The latest article on the subject I read was this one:Interesting JPA Pattern blogThe situation:Say I have POJO Book with a unidirection ManyToOne relation with the POJO Category (i.e. each book may only be associated with one category, but the same category may be associated with many books). I see some alternatives:Alternative 1:I expose a method/operation addUpdateBook(Book book). In the implementation of this operation I add/update both the book and the referenced category.

View 1 Replies


Similar Posts:


Java - Connecting Non-flex Client To Server Running BlazeDS?

Aug 27, 2010

I have Flex/AIR app that connects to a tomcat server via BlazeDS. I'm not finding that I have to integrate an old webapp (struts/jsp) and I'd like to keep that webapp untouched except for login, authentication and session handling. Also a 3rd java app that uses httpclient.

Currently I have some blazeDS remote objects to handle login/logout with a few RPC calls. In turn, FlexSession objects are created and handled. Is there a way to use httpclient and javascript to call those blazeds RPCs so I dont have to recode and have 3 different means to handle logins and sessions?

View 1 Replies

Java :: Flex Session Parameters In Remote Object BlazeDS?

Jun 23, 2011

I have my flex object embedded to JSP page.The JSP page retrieves user information like user name and group from portal profile object and stores in http session parameters. The flex Object makes a remote call to Employee.class to perform persona based operation.

I retrieved the session id in JSP and also in the Employee.class both are same. But I am not able to retrieve the username stored in the http session from FlexSession. I read in the internet that the FelxSession will hold all httpSession information as well. It's always coming as null. Correct me if I am wrong.

[Code]...

View 1 Replies

ActionScript :: Java - Flex ArrayCollection Of Number Objects To Java Collection<Long> Using BlazeDS

Mar 24, 2010

I am using Flex 3 and make a call through a RemoteObject to a Java 1.6 method and exposed with BlazeDS and Spring 2.5.5 Integration over a SecureAMFChannel. The ActionScript is as follows (this code is an example of the real thing which is on a separate dev network);

[Code]...

View 2 Replies

AS3.0 :: Java - Flex - ArrayList Of Custom Java Objects Over BlazeDS

Dec 7, 2010

Right away i just try to explain my problem: Using BlazeDS i got the following Javaclasses:

[Code]...

Then i got a Flex service class calling BlazeDS and executing the getCategories java method. Since Flash dosn't seem to understand typed arrays, the result from that method which i get back in flex is a simple array of untyped objects (the mapping dosn't seem to work here, even tought the class category exists in flex and has the same properties).
thats the first thing. but however, i'm converting the untyped objects manually into objects of the category.as class. the second thing is that categories have child-categories within the java object, which are also ArrayLists of the type category.java. the problem about that: my result event object only contains the first level of categories, looking into them the children are allways null. i dunno why they are empty, since they ARE part of the java object category.

and the third thing (the strangest by fast), you maybe noticed i named the properties of the category.java class strange, like idCat and nameTest instead of simply id and name. why that? because the property names of my flex result objects dont seem to change when i change the java objects properties names (result object properties are named "id" and "name" but the java class object properties are named "idCAT" and "nameTEST"). that it REALLY strange, since if i set the properties, like you see at nameTEST = "TESTNAME" it IS recogniced by flex, only the proertyNAMES dont seem to be recognized at all.

[Code]...

View 4 Replies

Flex :: Access A Remote Java Class (on Spring/BlazeDS) From The Cairngorm Application?

Nov 5, 2009

I seem to be getting the following error when I try to access a Remote Java class (on Spring/BlazeDS) from the Flex/Cairngorm application. I am going crazy at the moment trying to see what is wrong

[Code]...

View 2 Replies

Java ::Spring MVC: RESTful Web Services + BlazeDS Integration Possible?

Oct 29, 2010

I have a Spring MVC web application which provides RESTful web services via a controller class (annotated with @Controller) which has methods mapped to specific request types and signatures via @RequestMapping annotations.I have attempted to integrate a BlazeDS service destination into the mix by 1) adding the HttpFlexSession listener to the web.xml, 2) adding the flex:message-broker and flex:remoting-destination declarations to my Spring application context configuration file, and 3) adding a generic /WEB-INF/flex/services-config.xml.

The above BlazeDS integration steps appear to have hosed my RESTful web services, in that it appears that requests are no longer being routed to the controller methods. Is it even possible to do this, i.e, to have a single web application which 1) services HTTP requests via request mapped controller methods and 2) services remote object method calls (i.e. from a Flex client) via a BlazeDS service? If so then can anyone tell me what it may be that I'm doing wrong?

View 1 Replies

Actionscript :: Flex - Debug AMF (BlazeDS) Serialization Of Java Objects?

Jun 11, 2009

I'm using BlazeDS to remote some Java objects that I'm consuming in a Flex application. I'm getting a type coercion error with one of my classes that I can't for the life of me figure out. I have other classes that are working fine using the same data types, and I've gone over my mapping a dozen times. I'm following all of the necessary conventions for getters and setters as far as I know...

Anyhow, my question is: how can I debug this problem? Running the Flex app in debug mode spits out some generic errors to the console that don't really help much (TypeError: Error #1034: Type Coercion failed: cannot convert Object@5d1d809 to valueObjects.SomeClass.).

View 5 Replies

Java :: Remote Object(flex) And ArrayList Of Custom Objects?

Jan 24, 2012

I have a custom java class which has an ArrayList and corresponding to it have a custom vo class which has ArrayCollection (in Flex).I want to return data from Java to flex.Every variable in java is getting mapped to vo perfectly except for ArrayList.When trying to retrive When trying to retrive exposureUSDList (which is an arrayList) in flex I am getting empty ArrayCollection. It is not getting mapped properlyPlease find my code below:

Flex Code:
package com.example.vo
{

[code].....

View 1 Replies

Flex :: Develop The HTTPS Application Using Java - Remote Objects Or HTTPServices

Feb 8, 2010

I need to develop the HTTPS application using Flex and Java. But i have idea about remote objects or HTTPServices. which one is the best for developing HTTPS application.

View 1 Replies

Java :: BlazeDS Not Mapping AS Objects Correctly?

Mar 25, 2011

I have 2 java classes that are the same (imagine the getters and setters):

class ScheduledEvent {
private String eventName;
private List<eventValues> values; [code]....

Now there is a reason why there are two classes that are the same.When something is "scheduled", I should get the ScheduleEvent object and when an event is started, I should get the StartEvent object.And depending on the object I get back, I do different things.My problem is that, on the backend, it will send me the ScheduleEvent object, but once it got to the flex side (via BlazeDS), it becomes a StartEvent....

At first, I thought it's because these two events have exactly the same variables, so I tried changing ScheduledEvent by adding a dummy variable (String foobar) but that didn't seem to make a difference.

EDIT: I'm using BlazeDS messaging system.That's why I am not using "one java method call to one responder" approach. So, in the message.body, I should be getting ScheduledEvent but I keep receiving StartEvent. I'm wondering if it's because the two objects have the same property and BlazeDS doesn't know how to map them correctly... I even put a break point in the java service layer, to make sure that the appropriate object is being sent back and it is... But by the time BlazeDS serializes and deserializes it to the flex side, it is now a StartEvent.

View 1 Replies

Java :: Performance - Code Doesnot(only Sometimes) Compiles In Java+flex (+ BlazeDS+Tomcat ) Combined Project.a

Aug 13, 2010

i am working on a flex+java combined project.My IDE and computer configuration is as follows:

[Code]...

When i make a small change in Flex code (eg, reposition of a button...anything), and run the project on server, it does make any change on output. Actually it depends on my luck... because it makes change in output randomly.what is is happening? tried rebuild, republish, clean , restart server, restarting the IDE, restarting the computer all available feature i could think. Also, i created a simple flex project on IDE and compiled it..... everything is compiled and displayed on output.

View 2 Replies

Flex :: One Client Connecting To Two Webapps Using BlazeDS

Mar 24, 2011

I have a flex application that communicates via BlazeDS with two webapps running inside a single instance of Tomcat.The flex client is loaded by the browser from the first webapp and all is well. However on the initial call to the second webapp the client receives the following error: Detected duplicate HTTP-based FlexSessions, generally due to the remote host disabling session cookies. Session cookies must be enabled to manage the client connection correctly.Subsequent calls to the same service method succeed.

View 2 Replies

Integrate Flex Application To Access Rest Services (using Jersey) Through BlazeDS?

Feb 15, 2011

I am trying to integrate Flex application to access Rest services (using Jersey) through BlazeDS. I'm able to get Rest + Jersey working (pretty straight forward I guess) and I was able to configure Flex + BlazeDS. I'm looking for help to invoke rest services (different methods) from Flex UI based on the annotations specified such as @Path in my rest service class.

View 1 Replies

Flex :: RDS Server Connect Data Services Using Blazeds Get Error Message

Mar 2, 2011

When I connect data services using blazeds I get following error message.

[Code]...

Why am not able to connect? But when specify remoteObject in the declaration tags and call the methods it works fine.

View 1 Replies

Flex :: Limit Execution Time Of Services With Weblogic/Blazeds/Spring?

Sep 20, 2011

I'm working on a project where we use Flex, Spring, Hibernate and Blazeds,all working on a Weblogic server.Everything works fine and we call services at the server side from the flex app without problems,but now we need to limit the time who spent the execution of the services to 2 seconds, if any service takes more than 2 seconds the server must return a timeout to the flex app.I've been searching for a way to do this with the blazeds configuration, but it looks that it's not possible.Is there any way to achieve this? I've thought in add a filter to the blazeds requests so it can control the timeout... But I can't find any example and I don't have enough knowledge of filter.

View 1 Replies

Java :: Implement A Web App With Blazeds+java+flex+tomcat?

Mar 23, 2010

I'm coding a web app in flex blazeds and Java. I installed the Eclipse plugins for using WTP mixed project. I'm using flex's server that uses an emulate of tomcat when i ran my flex service the web app got the datas, everythings is ok. the problem is when i copy the project with all files generated by flex in my tomcat or the blazeds's tomcat, it doesn't work, this is becasue i want to implement my app on a server the error is:[code]
i don't know why tomcat doesn't find the class of flex.messaging.endpoints.AMFEndpoint that is used for my-amf 'URL...'. all works well in the emulated server that flex has.

View 4 Replies

Flex :: Connecting Flex Application To Tomcat + Spring 3.0 Framework With BlazeDS?

Apr 9, 2011

I'm developing a web application (client in Flash Builder 4, server in Eclipse 3.6 + Tomcat 7 + Spring 3 Framework). How do I make the Flex client automatically deploy in the Tomcat server and use BlazeDS messaging and remoting more seamlessly?

View 14 Replies

Java :: Intercepting Date Objects Coming From BlazeDS And Adjusting For Timezone Differences?

Oct 27, 2010

I am working on an application that is near the end of its development cycle and has mostly passed user testing. We recently realized that having flex convert dates to the client's local timezone is not desired, as all of our dates are in EST and contain no time data. Since BlazeDS sends dates in UTC, this results in the dates being converted to the day before in timezones west of EST.

The best solution is to go in and refactor all dates to adjust for the timezone offset, but that is just not doable at this stage. Since all dates in our application don't care about time, I would really like to be able to intercept all Date objects that come across BlazeDS and adjust for the timezone offset.

View 1 Replies

Java :: RemoteObject In BlazeDS Environment: Serializing Objects From JAXB / XJC-generated Classes

May 10, 2011

I'm developing a webapp with Java backend and Flash (pure ActionScript) frontend using BlazeDS. I'm using the RemoteObject stuff to send objects, using custom serialization, where I need to implement Externalizable (Java) and IExternalizable (AS) interfaces. This works fine so far.

But now I need to send objects from Java to Flash, whose classes are generated with JAXB/XJC. Of course these generated Java classes don't implement the Externalizable interface, so it seems that I can't use my approach here. One possibility seems to be writing a XJC plugin which makes the classes implement Externalizable. But this looks like a tough job...

View 2 Replies

Java :: Flex - Max Upload File Size For Java Using Remote Object (BlazDS)?

Jul 16, 2010

I tried with flex and java in the backend. In this, I am able to upload files till 100 MB using remote object (blazeDs) where we will read the file as byte array and send it to the java method. If the file size exceeds after that, then I get the run time error in IE.

View 1 Replies

Flex :: Cannot Create Project Using Remote Or LiveCycle Data Services

Jun 28, 2009

I'm trying out the FlasBuilder ide with ColdFusion 8 on OS X. When I try to create a new project, I get stuck at the server setup screen that forces you to validate your paths for your ColdFusion root folder and your webroot. Every combination I try says either "LiveCycle Data Services is not installed at the specified location" or "Invalid root. The WEB-INF/flex folder must contain either flex-config.xml or services-config.xml." The flex-config.xml file is sitting in that directory. Is there some trick to getting this to work?

View 1 Replies

Flex Consuming Java Web Services?

Sep 22, 2011

We are planning to use flex and Java Web Services, what is the best practice to consume web service from flex is it better to directly call the web service from Action scripts or to use remoting where java client will call the web services and later flex using remoting will the java client?

View 1 Replies

Actionscript 3 :: Flash Builder - Connecting To Remote Webservice Using SOAP And WSDL Using Flex?

Aug 16, 2011

The requirement is to get the method named getIncidentList() from web service using Soap and wsdl using Flex or Actionscript.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:WebService id="DirectoryService"
wsdl="http://cmuicds.rutgers.edu/uicds/core/ws/services/DirectoryService.wsdl"
useProxy="false"

[code].....

View 1 Replies

Flex Integration With Blazeds Using Java?

May 20, 2011

My name is Rahul.I am new to flex. I am trying to integrate flex with blazeds using java. I have written some code as per my knowledge. But it is not connecting to database. I am pasting my code here.Please look into this and let me know if i have done any mistakes over there:

[Code...

If i try to execute the Feedback.mxml then i am getting "Sorry your feedback is not entered" as output.I dont know where the problem is.I think flex is connected successfully but problem is in java code.

View 2 Replies

Java :: Bringing Together Flex And BlazeDS

Mar 16, 2012

I'm starting a flex+blazeds project. First I coded some server classes, and modified xmls (in WEB-INF). Now I want to test it with client. There (in Flash Builder) it's needed to specify path to folder where server lives. The problem is that I cannot find it. In the same time [URL] is found in browser.

View 1 Replies

Java :: Integrate Services With Flex UI Built Using Mate Framework

May 24, 2010

I am new to Flex and need to integrate Java services with Flex UI built using Mate framework. Can anyone point me to any website/links or show an simple example of integrating Flex UI on Mate framework with Java remote services? A simple integration of a "LoginService" will be good enough.

View 1 Replies

Java :: Changing Subtopics In BlazeDS And Flex?

Aug 14, 2009

I using messaging in Flex-BlazeDS. When the AIR client starts it connects to a destination and a specific subtopic. During runtime, the user can use a combo box to subscribe to different sets of live data coming in, this combo box change event changes the subtopic by:

messagingConsumer.subtopic = subtopicComboBox.selectedLabel;
messagingProducer.subtopic = subtopicComboBox.selectedLabel;
messagingConsumer.subscribe();

A message is then sent to the server with the new subtopic name as well so the server knows to send to a new subtopic. This whole mechanism seems very glitchy and I'm wondering if anyone else has tried this and succeeded? Most times it works the first time and the after that either the messages dont get sent or I get server errors like:

[BlazeDS]Endpoint with id 'my-streaming-amf' cannot service the streaming request as either the supplied FlexClient id 'B07F3285-A408-816E-4697-F13F9B17E32C is not valid, or the FlexClient with that id is not valid.

Also sometimes when I change subtopics it will cause the FlexSession and FlexClient to be destroyed instead of just the MessageClient. Once that FlexSession gets destroyed it messes up all kinds of things including logging out the user.

Perhaps I'm over complicating things by changing subtopics to listen to different sets of live data, if anyone has any other ideas on how to accomplish dynamic changing of destinations or subtopics please list those as well.

View 1 Replies

Java :: Flex - Date Not Serializing Using BlazeDS

Sep 30, 2009

When I pass a Actionscript Value Object that contains a Date variable using BlazeDS it is not getting transferring as a java.util.Date object correctly. When the setBaseDatefunction gets called on the Java side the baseDate value is NULL. The weird thing is if I rename the variable on the Java side to private Date date; and create a public void setDate( Date date) function it works. The problem is I need to pass 2 different dates so I can't uses this work around.

Here are my 2 classes:
AS3
package com.shua.flex.valueobjects {
[Bindable]
[RemoteClass(alias='com.shua.valueObjects.myVO')]
public class myVO {
public var label:String;
public var endDate:Date;
[Code] .....

View 3 Replies

Java :: Way To Secure A Flex-BlazeDS Application?

Feb 24, 2010

What's the best way to secure a Flex-BlazeDS application? I've googled it an several solutions came up.UPDATE after question from jsight:Flex would login, so on the RemoteObject I'll set Credentials I don't know if there comes authentication and authorization with BlazeDS (WebORB for instance does and WebORB looked at BlazeDS for their product) SSL not needed 've seen some links on the internet talking about spring security, so I'll check that out.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved