0

What's the best way to develop JBoss/Seam/Flex/BlazeDS based applications?

The problem that I'm facing is in having an easy and clean way of having a deployed ear while having Flex/BlazeDS still debuggable from Flex Builder.

Everything works just fine if I'm working on an exploded war deployed under "JBOSS_HOME/server/default/deploy" directory. The same is not true if the war is deployed on an exploded ear on the same folder.

The way that I've so far found around this issue is in having a BlazeDS service stub in a different war that will allow me to work with the Flex front-end application. The problem is that I also have to replicate and maintain the Entity bean POJOs that are being serialized by BlazeDS remote services.

This is obviously very annoying. I've tried several things but so far without any success. Any help would be appreciated.

I'll be upgrading to Flash Builder 4 sometime soon. Does anyone know if these issues are better handled in it?

Thanks, B.

Bruno Santos
  • 1,530
  • 1
  • 15
  • 22
  • In the ear case is the war in the exploded ear also exploded? Is the debugging not working on the Flex side or on the Java side? Is the Flex app in the ear still the debug version of the app? – James Ward Apr 08 '10 at 18:00
  • Yes, the war in the ear is also exploded. Debug not working on Flex Builder side. And yes, everything is in its debuggable version. – Bruno Santos Apr 08 '10 at 22:35
  • Do you get an error message when you try to launch the debugger? Is it launching the right URL? – James Ward Apr 09 '10 at 17:24
  • James, no, I don't even get that far if using an ear. This is basically because I'm not being able to set Flex Builder 3 + BlazeDS within an exploded ear under the JBOSS_HOME/server/default/deploy directory. – Bruno Santos Apr 12 '10 at 14:06

1 Answers1

0

So this morning I went back and tried to deploy the ear and flex war together using Flex Builder 3. After some more testing I've realized that the problem is not with Flex. The error that I'm getting while making a remote call seems to be caused by the Seam Framework:

ERROR [[MessageBrokerServlet]] Servlet.service() for servlet MessageBrokerServlet threw exception java.lang.IllegalStateException: Attempted to invoke a Seam component outside an initialized application at org.jboss.seam.contexts.Lifecycle.getApplication(Lifecycle.java:36) ...

Once I've removed Seam from the project, BlazeDS calls were successfully placed.

This is still really strange because if I deploy it packed as opposed to an exploded ear then everything works just fine (except that I will not be able to use Flex debugger).

I guess that for now the solution is to not use the Seam Framework. I've tried this with both Seam 2.2.0.GA and 2.2.1.CR1 but without success.

Bruno Santos
  • 1,530
  • 1
  • 15
  • 22
  • It seems like Seam is trying to apply a filter to BlazeDS's MessageBrokerServlet. You can certainly get Seam and BlazeDS working together. Just make sure that you don't have a Filter or something acting on the MessageBrokerServlet. – James Ward Apr 13 '10 at 14:04