Flex - Session Handling - Flex BlazeDS Java?

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


Similar Posts:


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

Java :: Flex - BlazeDS Not Handling Inner Class DTO?

Aug 19, 2011

I've noticed BlazeDS has certain things it does not support and it is often difficult to find this out. Ex: polymorphism is not.One must create methods with different names as methods with the same name with different parameters create a conflict.I'm trying to find out if BlazeDS does not support Java static and non-static inner classes.

public class UserDTO {
private String name;
private AddressDTO adddress;
private PhoneDTO phone;

[code]...

The example code above will compile and the getUser method will work. A call to the updateUser or updatePhone methods on the other hand results in a BlazeDS error. Is there a special way to use inner classes in Flex or are inner classes not supported?

Here is an example of the error messages produced:

[BlazeDS]Cannot create class of type 'com.test.dto.UserDTO.PhoneDTO'.
flex.messaging.MessageException: Cannot create class of type 'com.test.dto.UserDTO.PhoneDTO'. Type 'com.test.dto.UserDTO.PhoneDTO' not found.

Example Flex code:

var thisPhone:PhoneDTO = new PhoneDTO();
thisPhone.phoneNumber = "8885551212";
updateTagsResult.token = userService.updatePhone(thisPhone);

View 2 Replies

Flex :: Blazeds - Understand If The Session Is Timed Out?

Jul 25, 2011

my aim is to catch when the session is invalidated and send message to all destination that the FlexClient subscribed that the client wiht id .... has disconnected. I implemented a service which listens for

[Code]...

Problem is that i want to catch messageClientDestroyed and send to that destination a message that the user has disconnected.But blazeds destroys messageClient when you add a subtopic.So how to understand that if session is invalidated and all messageClient are being destroyed or the user just enter another place and add a subtopic to his consumer. I'am also open for other solutions to implement that mechanism.When user disconnected by session timeout or closed the site browser etc. i wanna catch it and send a message to subscribed destinations.

View 1 Replies

Flex :: Blazeds - Keeping Alive HTTP Session For Long

Oct 30, 2009

Any standard way to keep alive the http session as long user has open the flex app in the browser? I played around with the polling mechanism of blazeds. But it had no affect on the http session.

View 3 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

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

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

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 :: Blazeds - RemoteObject - Handling Multiple Requests?

Jul 11, 2009

I have a couple of remote object methods that I want to respond to in different ways depending on the context, but I'd rather not set up a bunch of different RemoteObject aliases.Some background: Let's say I have an admin application that displays sales stats in different ways. The remote method looks like:

<mx:RemoteObject id="rpt" destination="AMFServer">
<mx:method name="getSalesStats" fault="getSalesStatsFault(event)"
result = "getSalesStatsSuccess(event)" />[code]........

The getSalesStats method takes an employee ID and a sales type as its arguments. You'd call it like:

rpt.getSalesStats(120, "peanuts");
public function getSalesStatsSuccess(e:ResultEvent):void {
salesdata:ArrayCollection = e.result.rows as ArrayCollection;[code]......

I'd like to pass something through the remote method to the responding function, like:

rpt.getSalesStats(120, "peanuts", "clicked button one");

but that of course throws an error because the server doesn't want that last argument.

View 6 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

Flex :: Session Management With Java Servlet Using Httpservice

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

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

Java :: Deploy A Flex+blazeds Application?

Mar 23, 2010

I developed an application using flex+java+blazeds with tomcat that provide flex enviroment.I want to deploy my application using tomcat but I can't, how can I deploy my app?

View 2 Replies

Spring - Flex Blazeds Java NoSuchMethodException?

Aug 29, 2010

We have a Flex-BlazeDS-Spring-JMS application. The issue is sometimes we get a Blazeds error: NoSuchMethodException. It is not able to find the Java service. The weird issue with this it does not happen all the item...1 time it goes through and returns the result, the 2nd time it fails, 3rd time fails and so on. Also not all methods fail, only 2 method calls fail.

[Code]...

View 2 Replies

Custom Marshalling From Java To Flex Via BlazeDS?

Oct 29, 2010

My team are putting together a proof-of-concept Flex application sitting on top of a Spring-based server using BlazeDS.We do quite a lot of date calculations, so we use Joda Time extensively throughout the code and in our domain model.We're now trying to figure out how we can continue to use Joda Time in our DTOs that are sent back-and-forth with the Flex frontend via BlazeDS.

Our goal is to use the Actionscript 3 data type Date on the Flex side and have that map to our use of Joda time's DateTime, LocalDate and LocalTime types on the Java side.We can solve the problem of converting Actionscript 3's Date type when calling Java with a custom type marshaller plugged into BlazeDS, but this appears to only be invoked for the Flex->Java/BlazeDS direction and not for the Java/BlazeDS->Flex direction.

I'm now looking at custom PropertyProxy implementations for BlazeDS, but this doesn't look like the right thing either.The other idea was to implement Externalizable on our Java DTOs, but this seems like too much work, especially when I look at the BlazeDS rival GraniteDS and that shows plugging in Joda Time support in their documentation with a simple type converter!

View 3 Replies

Java :: Login Session Lost After Flex Chart Is Displayed From Jsp?

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

Flex :: Session Sharing Between BlazeDS Servlets And Http Servlets?

Apr 30, 2011

I'm developing a Flex application that employs BlazeDS with Tomcat on the backend. The Flex client authenticates through the ChannelSet which in turn creates an authenticated session on Tomcat. From then on, all of the client calls are authenticated transparently. However, I have a regular HttpServlet for uploading files, which does not get the session information from the BlazeDS servlets.

Is there a way that I can get the Principal object in the HttpServlet? I know that I can get the session ID from the BlazeDS servlet, pass it to the client, and then send that along with the upload request.

View 1 Replies

Java :: Support Both HTTP And HTTPS Channels In Flex/BlazeDS?

Jun 17, 2009

I've been trying to find the right configuration for supporting both http/s requests in a Flex app. I've read all the docs and they allude to doing something like the following:

<default-channels>
<channel ref="my-secure-amf">
<serialization>[code]..........

I'm running with Tomcat 5.5.17 and Java 5.The BlazeDS docs say this is the best practice. Is there a better way? With this config, there seems to be 2-3 retries associated with each channel defined in the default-channels element so it always takes ~20s before the my-amf channel connects via a http request. Is there a way to override the 2-3 retries to say, 1 retry for each channel?

View 4 Replies

Java :: Flex BlazeDS Dashboard - Use Spring / JDBC Or Hibernate?

Nov 4, 2009

I am developing a IT Monitoring Dashboard for the company I work at. The system will primarily perform monitoring of files, databases and servers. There will be a small part of the system which will allow the users to configure static data about the system eg: file locations, server names etc...

So as the app. will be a dashboard a lot of the application will consist of publishing data to the flex client to update all the monitoring views. So there will be limited database activity ie: insert/update/deletes.

[Code]...

View 4 Replies

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

Flex :: Connection Between Java / Using Blazeds Returns Error #2048

May 4, 2011

I have been developing an application(a website to be more precise) which consists of a flex front end which is constantly sending and receiving data from the back end which is programmed in java. The connection between the two components is being done through blazeds. This worked fine while I was running it locally, however when I uploaded both sides of the application to a tomcat server(online) the following error is being returned when a connection between the components should occur:URL...I have read around about this error and many seem to getting this error when making connections between different servers, unlike here, where the connection is occurring within the same server.

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 :: How Set Flex Server Location For BlazeDS Maven Build

Apr 1, 2012

As a first step getting a Hello World Flex-to-Java application to compile and run I followed: [URL] And it ran successfully. However now I wish to automate the build in Maven. How to specify the Flex Server location in the pom.xml?

View 1 Replies

Java :: Handling Custom Exceptions With Throwable Cause In Flex

Mar 8, 2012

I am using a custom java exception to provide the flex client with more info than the exception itself. My exception extends Exception and it has a attribute with the needed info for the client. Well, my problem is the following: when I build my exception if I invoke super() or super("message") the flex client can access all the info properly. But if I build the exception with a Throwable cause, super(cause), then the flex client can only access to stackTrace.

public class MyException extends Exception {
private String errorCode;
public String getErrorCode() {
return errorCode;
} public void setErrorCode(String errorCode) {
[Code] ......

By using MyException(String msg) the flex client can access to errorCode
By using MyException(Throwable cause) the flex client can't access to errorCode

In the flex side the code is:
var faultEvent : FaultEvent = FaultEvent( event );
var errorMessage:ErrorMessage = faultEvent.message as ErrorMessage;
var codeError:String = errorMessage.rootCause.errorCode;

View 1 Replies

Flex :: BlazeDS Accessing HTTPRequest/HTTPSession In Custom Java MessageAdapter

Nov 4, 2009

In a custom MessageAdapter written for a BlazeDS Java server, is there any way to access HTTPSession and HTTPRequest in a custom MessageAdapter.I'm trying to adapt an existing COMET JSON long-poll messaging system to BlazeDS and we use HTTPRequest parameters to specify message sending/polling paramers (such as a unique ContextID for any given page for a user). Is there any type of HTTPSession information we can retrieve in MessageAdapter receiveMessage()?

If I can't access the HTTPRequest (I'm not sure we can even customize it if we're using the standard Producer, Consumer Actionscript classes anyways), is there a way to uniquely identify a given FlexClient long-poll from another long-poll from that client (e.g. if the same HTTPSession user has a tab open to the same Flex application is there any way to uniquely identify that user?).

View 1 Replies

Java :: Spring/Flex/BlazeDS Messaging Service-adapter Not Called?

Nov 5, 2009

I have attached a service-adapter to a spring message-destination as follows:

<flex:message-destination
id="secured-chat"
send-security-constraint="trusted"

[code]....

View 2 Replies







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