I would strongly advise against using stateful session beans for this
scenario. You would be better to pass a plain old java object in the event
to Client2.
Alternatively, use a stateless session bean. You could then allow the
shared data to reside in a database and access it via entity beans. Then
you could pass the primary key in the event from Client1 to Client2. So
that the logic contained in the stateless session bean is working from the
same data.
-----Original Message-----
From: peng wang [mailto:wp0@(protected)]
Sent: 18 October 2003 03:04
To: J2EEPATTERNS-INTEREST@(protected)
Subject: [J2EEPAT-INT] Can different clients access one same stateful
session bean?
Hi,
Image a scenario like this: there is a client, C1,
accessing a stateful bean, SB. C1 does some operations
on SB and then C1 sends an event to another client,
C2,
the remote ojb reference of SB is carried in the event
(C2 and C1 are in different machines).When C2 receives
the event, C2 get SB reference from event and C2 also
does some operations on the same SB, after that C2
send a noticing event back to C1, on receiving the
noticing event C1 then removes SB and done.
Is the scenario able to realized by using stateful
session bean? if not, which mechanism should be used?
thanks in advance!
wp
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com
====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive:
http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to
listserv@(protected)
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.525 / Virus Database: 322 - Release Date: 09/10/2003
====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)