Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Struts - A MVC web framework
Tomcat - JSP/Servlet container
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
JSP - A mailing list about Java Server Pages specification and reference
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Can different clients access one same stateful session bean?

Can different clients access one same stateful session bean?

2003-10-21       - By Anand Raman

 Back
Reply:     1     2     3     4     5     6     7     8  

I think james is correct. Under what circumstances would anyone like to reuse
the remote instance of a stateful session bean. By there very defintion a
stateful session bean should be responsible maintaing the client state of only
one client.

If it for academic interest I can consider the scenario.

anand

__ ____ ____ ____ ____ ____ ____

From: An interest list for Sun Java Center J2EE Pattern Catalog on behalf of
BOWMAN, James
Sent: Mon 10/20/2003 2:43 PM
To: J2EEPATTERNS-INTEREST@(protected)
Subject: Re: Can different clients access one same stateful session bean?



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)



====================================================================
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)

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>

<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.6944.0">
<TITLE>Re: Can different clients access one same stateful session bean?</TITLE>
</HEAD>
<BODY>
<DIV id=idOWAReplyText32787 dir=ltr>
<DIV dir=ltr><FONT face=Arial color=#000000 size=2>I think james is correct.
Under what circumstances would anyone like to reuse the remote instance of a
stateful session bean. By there very defintion a stateful session bean should
be
responsible maintaing the client state of only one client.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>If it for academic interest I can consider
the scenario.</FONT></DIV>
<DIV dir=ltr><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV dir=ltr><FONT face=Arial size=2>anand</FONT></DIV></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> An interest list for Sun Java Center J2EE
Pattern Catalog on behalf of BOWMAN, James<BR><B>Sent:</B> Mon 10/20/2003 2:43
PM<BR><B>To:</B> J2EEPATTERNS-INTEREST@(protected)<BR><B>Subject:</B> Re: Can
different clients access one same stateful session bean?<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>I would strongly advise against using stateful session beans
for
this<BR>scenario.&nbsp; You would be better to pass a plain old java object in
the event<BR>to Client2.<BR><BR>Alternatively, use a stateless session
bean.&nbsp; You could then allow the<BR>shared data to reside in a database and
access it via entity beans.&nbsp; Then<BR>you could pass the primary key in the
event from Client1 to Client2.&nbsp; So<BR>that the logic contained in the
stateless session bean is working from the<BR>same data.<BR><BR>-- --Original
Message-- --<BR>From: peng wang [<A
href="mailto:wp0@(protected)">mailto:wp0@(protected)</A>]<BR>Sent: 18 October 2003
03:04<BR>To: J2EEPATTERNS-INTEREST@(protected)<BR>Subject: [J2EEPAT-INT] Can
different clients access one same stateful<BR>session
bean?<BR><BR><BR>Hi,<BR><BR>Image a scenario like this: there is a client,
C1,<BR>accessing a stateful bean, SB. C1 does some operations<BR>on SB and then
C1 sends an event to another client,<BR>C2,<BR>the remote ojb reference of SB
is
carried in the event<BR>(C2 and C1 are in different machines).When C2
receives<BR>the event, C2 get SB reference from event and C2 also<BR>does some
operations on the same SB, after that C2<BR>send a noticing event back to C1,
on
receiving the<BR>noticing event C1 then removes SB and done.<BR><BR>Is the
scenario able to realized by using stateful<BR>session bean? if not, which
mechanism should be used?<BR><BR>thanks in
advance!<BR><BR>wp<BR><BR>__ ____ ____ ____ ____ ____ ______<BR>Do you
Yahoo!?<BR>The New Yahoo! Shopping - with improved product search<BR><A
href="http://shopping.yahoo.com">http://shopping.yahoo.com</A><BR><BR>=========
===========================================================<BR>Companion
Site: <A
href="http://www.corej2eepatterns.com">http://www.corej2eepatterns.com</A><BR
>J2EE
BluePrints: <A
href="http://java.sun.com/blueprints/corej2eepatterns">http://java.sun.com
/blueprints/corej2eepatterns</A><BR>List
Archive:<BR><A
href="http://archives.java.sun.com/archives/j2eepatterns-interest.html">http:/
/archives.java.sun.com/archives/j2eepatterns-interest.html</A><BR>Unsubscribing:

email "signoff J2EEPATTERNS-INTEREST"
to<BR>listserv@(protected)<BR><BR>---<BR>Incoming mail is certified Virus
Free.<BR>Checked by AVG anti-virus system (<A
href="http://www.grisoft.com">http://www.grisoft.com</A>).<BR>Version: 6.0.525
/
Virus Database: 322 - Release Date:
09/10/2003<BR><BR>=============================================================
=======<BR>Companion
Site: <A
href="http://www.corej2eepatterns.com">http://www.corej2eepatterns.com</A><BR
>J2EE
BluePrints: <A
href="http://java.sun.com/blueprints/corej2eepatterns">http://java.sun.com
/blueprints/corej2eepatterns</A><BR>List
Archive: <A
href="http://archives.java.sun.com/archives/j2eepatterns-interest.html">http:/
/archives.java.sun.com/archives/j2eepatterns-interest.html</A><BR>Unsubscribing:

email "signoff J2EEPATTERNS-INTEREST" to
listserv@(protected)<BR></FONT></P></DIV>

</BODY>
</HTML>
====================================================================
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)

©2008 junlu.com - Jax Systems, LLC, U.S.A.