Flex session using blazeds?
Hello,
Need help on managing the Flex session using blazeds. If source is available, it would help a lot.
Hi saisri2k2,
Instead of making use of Server side session you can make a logic of your own at the client side itself by making use of the FlexEvent.IDLE and doing the appropriate action accordingly.
You can google for the FlexEvent.IDLE keyword. So if the user stays idle for a particular time you can register a check in the eventListener registerd for FlexEvent.IDLE and navigate or redirect user to another page.
Thanks,
Bhasker
Similar Messages
-
Cannot destroy my flex session using FlexSessionListener
Hi all,
I have what I thought was a simple need: destroy a session once a user logs out of my application either via a logout button or by closing the browser.
I have implemented the body ... onunload="disconnectAll()" .. method which I found numerous examples of on the net and have my logout button call the same disconnectAll() upon click.
All this is good and my FlexSessionListener sessionDestroyed() gets called. However, I can see from my logs that a sessionCreated() also gets called straight after the call to sessionDestroyed!
Has anybody seen this or have any idea why this is happening?
Are there threads running or feeds from clients that are keeping my session alive through recreating another one?
Any help would be greatly appreciated!I'm in the same boat. Using the latest version (8.0.12 build 25282). Can not connect to the console session on either OSX 10.9.5 or 10.10.1. This did indeed work previously.
Looked at the "Send log" output and find multiple instances of this:
[2014-Dec-01 14:53:53] RDP (0): Final rdp configuration used: screen mode id:i:0
desktopwidth:i:1920
desktopheight:i:1200
use multimon:i:1
session bpp:i:24
full address:s:guy
audiomode:i:0
username:s:juan
disable wallpaper:i:0
disable full window drag:i:0
disable menu anims:i:0
disable themes:i:0
alternate shell:s:
shell working directory:s:
authentication level:i:2
connect to console:i:1
gatewayusagemethod:i:0
disable cursor setting:i:0
allow font smoothing:i:1
allow desktop comredirectprinters:i:0
bookmarktype:i:3
use redirection server name:i:0
The important part seems to be "connect to console:i:1". That seems to indicate that an integer value is set to 1 (True?).
Running "qwinsta" on the remote server show:
Microsoft Windows [Version 5.2.3790](C) Copyright 1985-2003 Microsoft Corp.
C:\Documents and Settings\juan>qwinsta
SESSIONNAME USERNAME ID STATE TYPE DEVICE
console 0 Conn wdcon
rdp-tcp 65536 Listen rdpwd
>rdp-tcp#452 juan 1 Active rdpwd
juan 3 Disc rdpwd
C:\Documents and Settings\juan>
Clearly, I'm not connected to the console.
Is there anything else that can be provided or checked? -
Can Flex get faster using BLAZEDS with JBOSS
how can i make the data push faster?
i develop an application on java that reads data from a gps located in a car, and other java receive this data. im actually sending the data to FLEX using BlazeDS and JBoss as application server, but i dont know why it's too slow,
flex receive the data push every 3 seconds or more, and i want to be able to receive as much data as i want!!
my question is, can i make flex faster receiving this data!?
i need to receive the data faster to actually show on real time the position of the car,
thanksLooks like you guys have blazeds up and running inside JBoss. I'm actually having trouble getting this up and running. Can you provide some info on how you set it up? Here are my configs:
activemq-jms-ds.xml:
jms/testTopic
jboss.jca:service=RARDeployment,name='activemq-ra.rar'
javax.jms.Topic
PhysicalName=test.topic
messaging_config.xml :
Topic
javax.jms.TextMessage
activemq/TopicConnectionFactory
jms/testTopic
NON_PERSISTENT
DEFAULT_PRIORITY
"true"
AUTO_ACKNOWLEDGE
1
What am I missing? Look forward to hearing from you guys. Thanks in advance. -
Developing flex apps that use blazeds with flexbuilder and eclipse
Hi all,
Im new to Flex. I'm trying to setup my development environment. What I've noticed is that when blazeds is started and I run a flex project, it creates a folder in the blazeds root folder named $ProjectName-debug (replace $ProjectName with the actual project name). Once this folder is created, and the flash page is accessed, it cannot be deleted until blazeds is actually stopped. The files on that folder seem to be locked. While this folder is locked, eclipse cannot seem to re-build the project (specifically clean). Thus every small change I make to the project, I'm currently having to stop blazeds, clean the flex project, start blazeds, run the flex project.What makes things worse is that I have to start our application along with blazeds so it can retrieve the data from the app (which takes a few minutes).
I'm wondering if other people are having to go through this pain or if they've figured out a way to get around this. I would ideally like to have a way where I'm able to rebuild the project and hit f5 and reload the page and see the changes. I understand this is not possible with debug.
If anyone has figured out a way to incorporate blazeds to their development environment in a more practical way, please let me know. We just switched from tapestry/gwt to flex. We used to be able to update on the go thus development was much simpler.
Regards,
UdamHi Udam. I don't seem to have that problem. I'm using the FlashBuilder 4 (formerly FlexBuilder) beta so maybe it is a bug in the version of FlexBuilder you are using, although it could also be something else in your environment.
When I clean the project in FlashBuilder 4 it deletes all the assets from the $ProjectName-debug directory and then rebuilds the project. It doesn't attempt to delete the $ProjectName-debug directory itself.
If you are not using the FlashBuilder 4 beta I would try using that and see if it resolves the problem for you. If that fixes things then you know it is an issue with the version of FlexBuilder you are using.
If that doesn't do it, it could be an issue with the application server you are using or maybe something else in your environment.
If you still have problems after trying this with FlashBuilder 4 please reply back with as much information about your environment as you can such as what application server you are using, what OS you have, what browser you are testing with, if you have FlexBuilder and BlazeDS running on the same machine or separate machines, etc.
Thanks.
-Alex -
Dashboard appln using Flex+Java+MySQL+BlazeDS
I need to develop a Flex Dashboard application contaning Bar charts, pie charts, line charts which should display the data from MySql Database.
These charts should be refreshed every 5 minutes. I am comfortable with Java as backend instead of PHP. Do I need to use BlazeDS?
Can somebody suggest me how to develop this application or send me some sample working code?
Thanks.For a Flex/Java/BlazeDS you can go to this blog http://coenraets.org/, there's a sample app named SalesBuilder that'll be very helpful for you I think. If you're looking for an example about the timer look at the docs what you need to do basically is add a timer setting the interval, add event listener when the timer gets the determined time and then call your services and so, then restart the timer.
-
Revision: 23961
Revision: 23961
Author: [email protected]
Date: 2012-06-15 04:42:44 -0700 (Fri, 15 Jun 2012)
Log Message:
Bug#3200562: New Flex Session Id generated while disconnect with streaming amf channel
While invalidating session, make sure a new one does not get created.
Modified Paths:
blazeds/branches/4.0.0_fixes/modules/core/src/flex/messaging/endpoints/BaseStreamingHTTPE ndpoint.java
Property Changed:
blazeds/branches/4.0.0_fixes/modules/You're trying to do this directly in ActionScript without using Flex, correct?
The mxmlc compiler for Flex adds some registerClassAlias calls to map types between the client and the server. This will be missing if try to use the messaging code outside of a Flex app.
Take a look at the mx.utils.RpcClassAliasInitializer class in rpc.swc. This has a static registerClassAliases method that will do the class registration for you. You should just need to call this before running your messaging code.
-Alex -
Flash Builder 4.6 Mobile Project Using Blazeds & Native Extension
Hi,
I'm building a Flex Mobile project in FB, that uses BlazeDS to access data through a Spring Project, and also uses an ANE file to access the device's contacts. I want to debug the application on a device connected with a USB cable, so had to set my root and output folders in Server Settings using UNC so it can be found from my device thru my wifi network. I also have added the native extension via the Build Path and Packaging tabs. When I debug from a desktop emulator, things launch OK and the extension correctly tells me it's not supported on the emulator. However, if I debug on the device, FB throws an exception at launch, complaining of a java null pointer exception. The Eclipse log, in part, looks like this:
com.adobe.flexbuilder.project.AbstractXMLModel$FileReadException: org.eclipse.core.internal.resources.ResourceException: Resource '/NewOne-debug/NewOne-app.xml' does not exist.
at com.adobe.flexbuilder.project.air.internal.xml.ApplicationXMLModel.<init>(ApplicationXMLM odel.java:102)
at com.adobe.flexbuilder.project.air.AppXMLCreator.init(AppXMLCreator.java:91)
at com.adobe.flexbuilder.project.air.AppXMLCreator.<init>(AppXMLCreator.java:80)
at com.adobe.flexbuilder.project.air.AppXMLCreator.<init>(AppXMLCreator.java:73)
at com.adobe.flexbuilder.project.ui.utils.ANE.AppXMLFileANEExtensionHandler.getAppXMLCreator (AppXMLFileANEExtensionHandler.java:153)
at com.adobe.flexbuilder.project.ui.utils.ANE.AppXMLFileANEExtensionHandler.retainExtensionI ds(AppXMLFileANEExtensionHandler.java:315)
at com.adobe.flexbuilder.project.ui.utils.ANE.ANEController.modifyAppXMLforPackaging(ANECont roller.java:371)
at com.adobe.flexbuilder.project.ui.utils.ANE.ANEController.modifyAppXMLforPackaging(ANECont roller.java:338)
at com.adobe.flexbuilder.project.ui.utils.ANE.AbstractANEPackageHandler.modifyAppXMLforPacka ging(AbstractANEPackageHandler.java:91)
at com.adobe.flexide.launching.multiplatform.launchhandlers.AbstractMultiPlatformLaunchHandl er.applyNativeExtensionDetails(AbstractMultiPlatformLaunchHandler.java:164)
at com.adobe.flexide.multiplatform.android.launching.ADBLaunchHandler.doPackage(ADBLaunchHan dler.java:424)
at com.adobe.flexide.multiplatform.android.launching.ADBLaunchHandler.launch(ADBLaunchHandle r.java:250)
at com.adobe.flexide.launching.multiplatform.MultiPlatformLaunchDelegate.launch(MultiPlatfor mLaunchDelegate.java:191)
at com.adobe.flexide.launching.AbstractFlexLaunchDelegate.launch(AbstractFlexLaunchDelegate. java:244)
at com.adobe.flexide.launching.AbstractFlexLaunchDelegate.launch(AbstractFlexLaunchDelegate. java:134)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:854)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:703)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:928)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1132)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.core.internal.resources.ResourceException: Resource '/NewOne-debug/NewOne-app.xml' does not exist.
at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:320)
at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:194)
at org.eclipse.core.internal.resources.File.getContents(File.java:287)
at org.eclipse.core.internal.resources.File.getContents(File.java:278)
at com.adobe.flexbuilder.project.air.internal.xml.ApplicationXMLModel.<init>(ApplicationXMLM odel.java:100)
... 19 more
I guess the problem is that when the application tries to run on my device, the extension is not finding the application descriptor file. Is there anything else I need to do?
I appreciate any help.
JayHere's the fix in case anyone else runs into this problem. When Flash Builder is building the deployment during launch, it converts the mapped path to a mangled local path for the ane to find the descriptor to a relative path, which can't be found and throws the null pointer. Making the Output Folder path actually local to the computer, as opposed to the default that FB creates, resolves the error, and still allows blazeds access from the device.
-
Flex session replication among cluster Help needed!
Hi,
I'am using Flex 3, LiceCycle Data Service 2.5.1, JBoss 4.2.1 in a web application. Our JBoss servers are in a cluster. We want to replicate Flex session among cluster, but it doesn't work. Did someone face issue with Flex session replication among application servers?
Thank you for your help
GerardGerard,<br /><br />You will need to cluster the LCDS 2.5.1 instances the same way you clustered <br />JBoss.<br /><br />Check out the "Configuring Data Services" chapter in the Admin guide:<br />http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/lcds/services_config_4.html<b r /><br />--<br />Tom Jordahl<br />Adobe<br /><br /><br /><[email protected]> wrote<br />> Hi,<br />><br />> I'am using Flex 3, LiceCycle Data Service 2.5.1, JBoss 4.2.1 in a web <br />> application. Our JBoss servers are in a cluster. We want to replicate Flex <br />> session among cluster, but it doesn't work. Did someone face issue with <br />> Flex session replication among application servers?<br />> Thank you for your help<br />><br />> Gerard
-
Flex Session implementation in Java
Hi
I am new to Flex. I have requirement like "store and retreiving a value in FlexSession instead of passing it to UI". The application in which I am working is an existing application where the value which I mentioned is generated from a service call and storinand reteiving it inside a DB. I neeed to modify it so that it should be from Flex Session.
I tried using FlexContext.getFlexSession().setAttribute("abc","value");
But while retreiving through FlexContext.getFlexSession().getAttribute("abc") it is returning null.
Could somebody help in finding a solution for this. It is urgent.Thanks for your reply Claudiu. FlexContext comes from flex-messgaing-core.jar and I don't think it is a custom class. And my issue got solved . I think I missed the below entry in web.xml,
<!-- Http Flex Session attribute and binding listener support -->
<llstener>
<listener-class>flex.messaging.HttpFlexSession</listener-class>
</llstener> -
I have a web application in flex with back end as LCDS. I want to execute a function in server when the client logs out/close the browser.
How can I implement this ( calling a severside function while user close the browser without properly logging out)?
Can anybody help me?thank you for your advice yogi, but I would be more understanding if tried in the form of training / tutorials, can you tell the link that discusses login / logout session using flex and java
thanks -
Revision: 23962
Revision: 23962
Author: [email protected]
Date: 2012-06-15 04:57:45 -0700 (Fri, 15 Jun 2012)
Log Message:
Bug#3200562: New Flex Session Id generated while disconnect with streaming amf channel
While invalidating session, make sure a new one does not get created.
Modified Paths:
blazeds/branches/4.6.x/modules/core/src/flex/messaging/endpoints/BaseStreamingHTTPEndpoin t.javaI thought the same that those devices simply are too old. However I would like to know what causes this capabilities change. We want to get rid of the old H/W, but at the moment it looks as if we would need to revert back to the 4402 in order to get those things working again.
I have not enough information, but those devices are some kind of handhelds. Their MAC OUI belongs to Newport Electronics.
Regards,
Patrick -
Revision: 23960
Revision: 23960
Author: [email protected]
Date: 2012-06-15 04:15:18 -0700 (Fri, 15 Jun 2012)
Log Message:
Bug#3200562: New Flex Session Id generated while disconnect with streaming amf channel
While invalidating session, make sure a new one does not get created.
Modified Paths:
blazeds/trunk/modules/core/src/flex/messaging/endpoints/BaseStreamingHTTPEndpoint.java -
Revision: 23948
Revision: 23948
Author: [email protected]
Date: 2012-06-13 06:11:35 -0700 (Wed, 13 Jun 2012)
Log Message:
Bug##3200562: New Flex Session Id generated while disconnect with streaming amf channel
On session time out, Flex Client is invalidated on the server side. It also results in Flex Session getting invalidated. In order to complete the client-server streaming connection handshake, the client ends up sending a CLOSE command. On the server side, for any work to be done, the MB first needs to creates a Flex Session (if none exists). After doing the necessary cleanup, the newly created Flex Session will also be invalidated. No stray Flex Sessions will left dangling...
Modified Paths:
blazeds/trunk/modules/core/src/flex/messaging/endpoints/BaseStreamingHTTPEndpoint.java -
Need help in Delete operation using blazeDS
Please find the flex client code and servlet code given below
Trying to call a DELETE methods on the servlet using BlazeDS.Configuration is perfect in the proxy-config.xml and services-config.xml
when DELETE is called with paramter user="krishna it is being printed as
received DELETE operation with parameternull
My Question is why the servlet printing null value for the user where it should print "someuser"?Can some one help me on this?
FLEX CLIENT
<?xml version="1.0" encoding="utf-8"?><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:Script><![CDATA[
import mx.controls.Alert;
import mx.rpc.http.HTTPService;
import mx.rpc.events.ResultEvent;
import mx.rpc.events.FaultEvent;
public function callServletDELETE():void {
var service:HTTPService = new HTTPService();
//service.url= "http://localhost:8080/examples/blazeDS";service.destination=
"BlazeDSHTTP"; //this is configured in proxy-config.xml fileservice.useProxy =
true; service.method =
"DELETE"; service.resultFormat=
"e4x"; service.addEventListener(
"result", billingCarrierResult);service.addEventListener(
"fault", httpFault); service.send({user:
'someuser'});}
protected function billingCarrierResult(event:ResultEvent):void{
serviceResultsTextArea.text =
"Success with BlazeDS!\n"+event.result;
protected function httpFault(event:FaultEvent):void{
serviceResultsTextArea.text =
"Failure trying to access service.\n"+ event.fault.faultString + "\n" + event.fault.faultDetail;}
]]>
</mx:Script> <mx:TextArea id="serviceResultsTextArea" width="50%" height="50%" />
<mx:Button label="DELETE" click="callServletDELETE()"/>
</mx:Application>
servlet
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
* Simple example intended to demonstrate BlazeDS with HttpService.
public class BlazeHttpExample extends HttpServlet
//excluded other methods GET,POST as they are working fine
* Handles the HTTP <code>DELETE</code> method.
* @param request servlet request
* @param response servlet response
@Override
protected void doDelete(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException
System.out.println("received DELETE operation with parameter"+request.getParameter("user"));
@Override
public String getServletInfo()
return "Simple intended to illustrate BlazeDS HttpService support.";in your java code you are considering user as the parameter.. but that is not a parameter..
When making a http call in flex try something like this
var obj:Object = new Object();
obj["user"] = 'someuser';
service.send(obj);
this should work hopefully. -
How to use BlazeDS and a JavaWeb app right
Hello,
I have a java backend app for a Flex front end app, all glued fine and dandy using blazeDS. I got it to work by copying all the config files and the jar files to my java app.
My question is, is this the right way to do it?
All the examples just say to deploy blazeDs.war additionally to the java app. I did not wanted this, so I ended up doing it the other way.That's quite alright! Just copy the following files to your web application and you are good to go:
BLAZEDS/WEB-INF/classes/commons-logging.properties to YOURAPP/WEB-INF/classes
All the .jar files from BLAZEDS/WEB-INF/lib to YOURAPP/WEB-INF/lib/
The BLAZEDS/WEB-INF/flex directory to YOURAPP/WEB-INF (i.e. your WEB-INF directory has to contain a flex sub folder with the xml configuration files)
Maybe you are looking for
-
Ever since the IOS8.2 update my iPad keeps popping up with 'Sign into Icloud' if I sign it it still pops up i I have changed my pw twice and it's still happeninf I even tried to turn off iCloud i have iPad 3rd gen does anyone have a solution? thanks
-
How do I access my iCloud calendar on my iPad
There is no icon for my calendar on my iPad. Siri can show me the calendar for the day, but there is no icon. Help!
-
Is there a fix for wifi hotspot
Hi all, I have used my hotspot in the past, However after upgrading to IOS 5.1 it no longer works with a Windows machine via wifi. Is there a known solution, or is it even possible to backdate my phone to a older IOS that will resolve the issue? Doe
-
How do you use a Gateway with Remote Resources on a Mac (8.0.5)?
I might be missing something obvious, but I have a Gateway configured in the OS X 8.0.5 client, but when connecting to remote resources it does not seem to use it. When you configure a connection to a specific machine there is a drop down for using o
-
I have an iPad mini, my phone number was avalible for use with iMessage and FaceTime last night and now it's just disappeared. I have tried everything to get it back. My email is there but when people text me it won't go to my ipad? Any suggestions?