Java :: Reusing The Client Session Extraction Logic?
Jun 6, 2011
I want to be able to reuse my existing controller logic regardless of whether a request has been sent from a Flex client (using BlazeDS + Spring at the backend), or as a simple HTTP POST/GET request. For simple cases, things work OK, however, there are some occasions when I need to access some session attributes. At first, I almost exclusively used the FlexContext class, but then I realized that when one sends an HTTP request, then the Flex Context is obviously undefined.
My question is, what is the best approach to abstract the session extraction logic,regardless of the type of the request. In other words, I would make a class called SessionManager, which has a method getSession. This class will make a check whether there is a Flex context, if there is, it will return the session of that context. If not, it will simply return the current HTTP session (which I assume is the same as the Flex client session, but I was not sure)
View 1 Replies
Similar Posts:
Mar 18, 2010
In one web page we use a flash upload control but becouse a flash bug in the upload event the session is lost as its posted back with a new session. We have thought of using a table with ip and old session id or a query string with the old session id in order to reassign it in the uploaded event...Knowing the old session id how can i reassign it to the client? (In C#)
View 2 Replies
Jun 14, 2010
I am new to Flex. I am just wondering how to manage session and cookies for logging in, logging off in Flex? I am using Flex HttpService and Java servlet.
View 1 Replies
Jun 4, 2010
I have a java web application. When I log in to that application and navigate to a jsp which has flex chart embeded into it, the chart displayes just fine. I am using blaze ds remoting object mechanism. But when I want to navigate to a different page, it logs me out of application since the login session is lost.
View 1 Replies
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
Oct 5, 2011
We have deployed a flex application on Tomcat and it uses Blaze-DS to communicate with the Java side. However when using the deployed application we constantly get the 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. url...Within our Apache httpd.conf we have set up a proxy lookup so that rather than using particular ports (e.g 8082) we want to use port 80 (some of our customers operate in a locked-down environment).[code]
View 1 Replies
Aug 7, 2011
Since I'm developing a multiplayer card game for Facebook using Flex as client side and Java SE as server side, I wanted to know how do I actually make the connection between Flex and Java? the server and client should be able to send each other data(cards,movement,room information etc...) across and I wonder what's the easiest way to do it without complicating it. where to read about it ? I know JAVA but I find JavaEE hard to understand.
View 2 Replies
Nov 9, 2011
I am using blazeDS remote object. I need to get a client ip address from clien request. Is it any way to get ip address and system information in blazeDS java.
View 1 Replies
Apr 13, 2010
What technology are better (robust, stable, speed) for rich web app with flash movies, chat, etc. Somebody said that Red5 will drop down if more that 50 users try to suck video stream from it. Is there people who use Java on server side and Flash for client side?
View 1 Replies
Nov 3, 2010
I am building a Flex application which communicates with a Java server using BlazeDS.
What would be the best way to go about making the server aware of the client's hostname?
View 1 Replies
Apr 16, 2011
Am facing issue with session timeout. Say for instance, the user logs into the application and he waits for 30 mins (session timeout time) and then tries to get a service through remote object.Ideally speaking, since the session has timeout the user shouldn't be able to hit the remote object, but this is happening the other way round.
[Code]...
View 1 Replies
May 13, 2010
I have a Flex application that connects to a BlazeDS server using the StreamingAMF channel. On the server-side the logic is handled by a custom adapter that extends ActionScriptAdapter and implements FlexSessionListener and FlexClientListener interfaces.
I am asking how can I detect which "flex-client" has closed a connection when for example the user is closing the browser? (so I can clean some infos inside the database)
I tried using the following:
1. To manually manage the command messages:
@Override
public Object manage(final CommandMessage commandMessage) {
switch (commandMessage.getOperation()) {
[Code]....
View 3 Replies
Feb 20, 2011
I'm getting to work with with red5 and am trying to make a basic app that will stream a random video to the client. Let's say I have 3 flvs on my server, I'd like a client to connect to my red5 app and have 1 of these 3 videos streamed to them. The only streaming i've been able to figure out so far uses netStream.play("video.flv"), this doesn't work for me, I want the server to decide on the file to stream rather than the client.
View 1 Replies
Feb 22, 2011
I'm building a Flash-based Facebook game with a Java backend, and I'm planning to use a RESTful approach to connect the two of them (not a persistent socket connection). I'm using the AS3 library to connect the client to Facebook, so that's where I have my session information stored. However, how do I authorize client connections back to the server? I can't leave the callback URLs open since that'd let people manipulate game state without playing the game. I need to make sure that the calls are coming from a valid client and through a valid session.
At the moment, users have no direct login to the backend server -- it's all handled through the client frontend. Can I pass the Facebook OAuth2 access token to the backend in a way that the backend can verify its validity? Should that be enough to trust a valid frontend connection?
I could do a two legged OAuth signed request or just use a simple shared secret, but the keys would have to be packed in with the flash client, which makes that almost useless for this use case.
View 3 Replies
Mar 9, 2012
The question is about the following operation: Flash client sends TeX code (or file) to server. TeX is compiled into picture. Picture is sent back to client As far as I can see the best way to do that is to use flash+java remoting. But, there're several java servers (looks like BlazeDS and Red5 are the most popular). Which one do you advise to use for my purposes? Note that steps 1-3 are not final, picture will be changed after that (e.g. some marks will be made).
View 1 Replies
Dec 29, 2009
We're using :
JBoss 5
Flex SDK 3.5
BlazeDS 3, with integrated authentication (through JAAS and JBossSX)
Failed login are always indicated to the flex client by the same fault code : Client.Authentication
However, the underlying JAAS LoginModule throws a specific javax.security.auth.login.LoginException subclass.
How can we propagate the failed login reason to the flex client ?
View 1 Replies
Mar 26, 2010
I'm trying to create a client-side web app that generates music procedurally using some user-input parameters, so I'm looking for a framework (e.g. Flash, Silverlight etc.) that has the capability to play audio at a specified pitch. Whether it is playing a WAV/MP3 file, using MIDI output, or just playing beeps doesn't really matter -- I just need something that will enable me to generate arbitrary music client-side.
I've done a bit of searching and it appears that Flash might have the ability to change pitch with the help of a third-part plugin, but I couldn't find anything similar for Silverlight.
View 1 Replies
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
Dec 10, 2010
I am looking for an approach that will allow me to (somehow) dynamically pass the server name, server port, and web context to my Flex client so it can create a ChannelSet for it's RemoteObjects to use. These three properties are, of course, readily available to my Java server-side code so I just need a way to get them to the client.
By default, Adobe says you should compile your Flex application against the server configuration file "services-config.xml". This is a highly inflexible practice that Spring says should be avoided (I agree).
One popular approach is to use Flex's http service to download an XML configuration file. I like this idea, but I don't want to hard-code an XML file and keep it inside my WAR file. Is there a way to dynamically generate this from Java code?somehow use flashvars to pass the properties in from the containing HTML page to the SWF file. But again, I don't want to hard code them into the HTML page. Is there a way (maybe with Javascript?) to dynamically set the value of these when the page loads?
View 1 Replies
Feb 28, 2011
Is it possible to load a .properties file from a client computer using adobe flex? I have a flex app that needs to access a server and multiple URLs but the URLs may change frequently. So I think modifying and loading the URLs from a .properties file would be the easiest way update the URLs
I was able to use florians suggestion and I've added the code below if anyone else is interested. I used the example here URLLoader.
public function URLLoaderDataFormatExample(event:Event):void
{
var request:URLRequest = new URLRequest("file:///c:/temp/prop.properties");
var variables:URLLoader = new URLLoader();
[Code]...
View 3 Replies
Dec 9, 2009
I am using BlazeDS for data-push feature in my Flex application project. From the official tutorial, Getting started with BlazeDS, it shows messaging example with producer/consumer from API. but how can I implement server side which doesn't need to be invoke from Flex client, but from within server-side instead. I got some idea but I don't know how to do because I'm a Flex developer, not Java developer In Google, there's a tutorial show about I need to extend ServiceAdapter class in Java-side, which extends Invoke method. Do I need to extend other class instead of this to do what I want?
View 3 Replies
Jul 18, 2010
I am trying to send info using USLStream from flash client to JAVA server.Some of the info is Chinese so i have to use Unicode.
View 1 Replies
Dec 20, 2010
I have a server with some simple java objects running. I want to build the client with Flex and connect to the server data with BlazeDS. The problem is the Flash Builder is not generating the Classes correctly. Just the properties are being generated, the inheritance are not being generates.
View 1 Replies
Dec 30, 2011
how to make a policy file for a socket server made on java with a client made on as2.
View 21 Replies
Sep 16, 2010
My client is in Flash/Flex (game with chat) and it will be talking to a Java server. What is the best way (protocol / interface) for my Flash client to talk to my server? I heard about Flash Remoting MX, but it is a request / response mechanism. I could always request something and wait for asynchronous notifications from server. Then request again, implementing something like a Comet server.Anyways, what is the industry standard for this type of communication: Flash Client talking to Java server, supporting asynchronous "push" notifications from server.
View 4 Replies
Sep 24, 2011
We have a typical Flash+J2EE application that makes multiple requests from client to server (over Flex remoting), which is taking quite a long time on some client systems (and hence results in poor application performance on such systems).
Now, suspecting issues with network connectivity (latency) on such client system(s), we need to identify how far does it contribute to the slow response of the application (rather than performance issues in the application itself).
So, what are the best way(s) to diagnose this on a client system (Windows)?
Note that we have tried profiling our application, which does not indicate bottlenecks there, so we just need to clearly identify the possible network issues.
View 1 Replies
Jan 23, 2012
We are trying to create a sqlite db file using java on the server, and encrypt it.Then we send the encrypted db file to a client's pc, which has an Adobe Air desktop app running.The air app then needs to be able to open/read-from the encrypted db file (client is read-only).We are using java 1.6, flex/actionscript 4.5, and Air 3.1.We can create the sqlite db file on the server and send it to the client, and it can be read by the client without issues, when we do not encrypt it.But we are having trouble with the encryption part. We've read quite a lot of documentation about Actionscript's ability to open encrypted sqlite files using AES + CCM (URL...).And we're trying to use java's crypto package to encrypt the sqlite db file.The encryption is important because we don't want the client to be able to open the sqlite db file with any sqlite browser, only with our Air application.
View 1 Replies
Sep 28, 2009
I've been trying to find a straightforward use of CV for extracting a person's silhouette via webcam using AS3. I know this is achievable through either motion detection or background subtraction; I'm not versed enough on this to really start from scratch. I don't need examples referring only on motion detection or background subtraction, I need to know how to achieve a simple silhouette extraction from a neutral & binary background.
View 2 Replies
May 11, 2011
I was wondering if there is a current class or library in a web language (php, perl, etc.) that is able to extract audio from flash files or youtube links directly.
View 2 Replies
Oct 27, 2010
how can I find on fms server that client disconnected if if client disconnected due to power cut off. I client manually close the application then onDisconnect on server is called but if due to power cut off it does not called.
View 1 Replies