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
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.
- 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 !
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?
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 ?
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?
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.