Also given the fact that entity beans can be shared by multiple clients
while session beans cannot.

Lets say I have a stateful session bean and the create method being
ejbobject create(int accId)

A person logs in with accountId 1 (A stateful session bean instance created
- SF1)
At the same time his wife logs in accessing this account(Another stateful
session bean created - SF2)

now SF1.isIdentical(SF2) will return false.

while if is an entity bean they will share the same primary key and hence
the same entity bean instance.

I was wondering if this can cause any issues!!!
Any comments??

- Rajeev Dave

-----Original Message-----
From: Evan Ireland [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 25, 2002 4:39 AM
To: [EMAIL PROTECTED]
Subject: Re: SFSB Question


Use an entity bean with BMP.

Take all the data you wanted to pass as a parameter, make a
primary key class containing that data.

ejbLoad/ejbStore can be empty, as you don't need any persistent fields.

In your business methods where you want to access the data that was passed
to ejbCreate, call entityContext.getPrimaryKey() to get the values.

Biske, Todd wrote:

> On the project I'm working on, we've got a situation where it would
> extremely valuable to be able to have parameterized ejbCreate() methods
> on our stateless session beans, but the spec doesn't allow for this (we
> could put them in, but they'd never get invoked).
>
> One alternative would be to use stateful session beans, which allow this
> type of functionality.  The client would still be using the session bean
> in a stateless manner, however, e.g. one method call and it's done.  Is
> anyone aware of the potential overhead implications of making all of the
> session beans stateful versus stateless?  If it matters, the beans would
> be deployed under WL 6.1.
>
> The other alternative that we're currently heading down is to take the
> parameter we'd like to pass in to ejbCreate() and add it to all of the
> business methods defined in the remote/local interface.
>
> Thoughts?
> -tb
>
>
>
>
****************************************************************************
***********
> WARNING: All e-mail sent to and from this address will be received or
> otherwise recorded by the A.G. Edwards corporate e-mail system and is
> subject to archival, monitoring or review by, and/or disclosure to,
> someone other than the recipient.
>
****************************************************************************
***********


--
____________________________________________________________________________
___

Evan Ireland            Sybase EAServer Engineering
[EMAIL PROTECTED]
                           Wellington, New Zealand                +64 4
934-5856

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to