This content has been marked as final. Show 5 replies
doh, use FlexContext.getFlexSession().isUserInRole('foo') instead.
I also have problems using security with destination. I secured the /messagebroker/* url in the web.xml with basic authentication. When I access a DataService destination, I get a popup for credentials.
After the user is authenticated, I get a 'unhandled failure on server' message on the client. After enabling all logging on the server, I finally figured out the problem is caused by a NullPointerException in Flex's LoginManager.checkRoles() method.
When I put security constraints in the data-management-config.xml, the error occurs directly. My Assembler is not used.
If I remove the security constraints from the data-management-config.xml and put this code in my Assembler class :
FlexSession fs = FlexContext.getFlexSession();
Principal p = fs.getUserPrincipal();
boolean inRole = fs.isUserInRole("role1");
.. I see the FlexSession is retrieved succesfully. The principal can also be retrieved. But the check if the user is in a role also caused a NullPointerException in LoginManager.checkRoles()
I tried this on both Tomcat 5.5 and JBoss 4.0.5 GA and have the same problem on both servers.
What is the cause and how to fix it ?
I need a solution fast !
I posted here yesterday (it follows yours) about getting JOTM so that I can run FDS samples and begin the lessons. Since you are able to run FDS on Tomcat, I'm assuming you were able to download the JOTM, JTA, JMX (etc.) files. Would you mind listing the URL you used for download?
This link (following the instructions from Adobe)
does not work.
The Tomcat Testdrive of Christophe Coenraets is a good start for using Tomcat and FDS. It has Tomcat, FDS, JOTM, Spring, Hibernate, etc integrated in one.
Much thanks to you, Joost. I will check out the URL you list.
I surfed the web for several hours last night to find a way to download the JOTM. Most listed the objectweb.org website where all the links for downloading JOTM are broken. Also, came across several threads where folks were having same trouble as me. I would like to post your link giving reference to you for your help, Joost.
One last thing. Here are a few links to help others with configuration. They look very helpful.
To get JOTM configurate correctly with flex samples
If you need to configure JDBC and transactions in Tomcat with JOTM