-
1. Re: Share Stateful session bean between web and applet
ever Apr 10, 2008 8:00 PM (in response to ever)What is in general the best solution when different technologies access the same context.
Logically the the HTML content and applet belong to the same conversation and the same session. It make sense that they could access the same stateful bean.. the only difference is in the way they do it...SOAP and JSF
Did I maybe overlook something about this type of realization???
Would be thankful for any hint
Best regards
-
2. Re: Share Stateful session bean between web and applet
tom_goring Apr 10, 2008 8:59 PM (in response to ever)Hi,
I'm not sure how you are going to get this to work.
The applet is running in the client JVM and so you won't be able to use any seam context there. When your applet talks to the server it will be over some kind of remote interface and will bypass the JSF stuff and so I'm not sure how seam will know where this request is coming from.I suggest
- do you really need an applet ? have you looked at the richfaces controls?
- Jump though some hoops on the remote side to tie your sessions back together.
I'm no applet expert though !
-
3. Re: Share Stateful session bean between web and applet
ever Apr 10, 2008 9:31 PM (in response to ever)unfortunately I can't use JavaScriptor richfaces because the java applet is already there and quite complex... (visual graph)
So my question is how can I share the content of s session bean between applications? or how can I access a SFSB Component.getInstance(seesionID,cid).
The general problem about SFSB is that they are not multi threaded each thread has its own SFSB.
One vague idea I have is to wrap the content of the SFSB bean (a List) to a Message Driven Bean along with session id and cid. The applet which is connected via SOAP to jboss will pass seesion id and cid to the webservice and get the content.
Question: What alternatives do I have, if I would like to share the content of a SFSB with other sessions?
-
4. Re: Share Stateful session bean between web and applet
tom_goring Apr 10, 2008 10:53 PM (in response to ever)If your using web services for your applet communication read chapter 20 in the seam manual:
20.2. Conversational Web Services
Maybe that will help you ?
-
5. Re: Share Stateful session bean between web and applet
ever Apr 11, 2008 12:15 AM (in response to ever)thank you !
If I use the description from the manual I end with the situation having two SFSB containing two different lists. two sessions that are separated from each other.
I need to find a way to share the same content in one SFSB between applet and JSF.
can somebody give a hint on realization of this? is the approach via MDB and JMS the only way?
thank you...
-
6. Re: Share Stateful session bean between web and applet
pmuir Apr 14, 2008 12:30 AM (in response to ever)This isn't really related to Seam in anyway - if you can share the session between the browser and the applet, then that is fine (and you'll need to find out how to do this), otherwise, the applet and the browser will be in different sessions and you would be best making the lists stateless.