BTW I meant 'columns' not 'rows' in my reply on PK classes. :)
Dave Wolf
Internet Applications Division
Sybase
> -----Original Message-----
> From: A mailing list for Enterprise JavaBeans development
> [mailto:[EMAIL PROTECTED]]On Behalf Of Murthy, A (CAP, GEFA,
> Contractor)
> Sent: Thursday, August 17, 2000 2:12 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Life cycle of beans(Session and entity)
>
>
> Hi everyone,
> I don't know know whether it is a silly question, but I want to know the
> answer for the following questions.
>
> I have a doubt. How can we insert a row in database using Entity Beans?
> First of all, Suppose I have a primary key having ,say, 100 coulmns. and
> suppose my table has 100 more columns which are not part of the
> primary key.
>
> So in that case, first I have to create a primary key class with the 100
> columns as primary key. is it?
> Now my question is, when I call the create method, I need to pass
> these 100
> columns to the Create method. then How the bean is going to insert a row
> into the database?
> And also, how do we need to manage the entity beans if I have a composite
> primary key, suppose if I need to join 5 tables then how to do that and
> insert or update the tables?
>
> Please explain me this situation? In this case, which
> persistence mechanism
> do i need to use? is it CMP or BMP?
>
> I hope every one understood my question.
>
> Murthy A Suryanarayana
> mailto : [EMAIL PROTECTED]
>
>
>
> -----Original Message-----
> From: Sonia [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 17, 2000 2:14 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Life cycle of beans(Session and entity)
>
>
> You can create a Bean with a class as primary key, in that class
> you can put
> as many attributes as you want, be careful with the names, the name of the
> attribute must be the same in the class and in the bean.
>
> In the Deployment you have to say that the primary key is a class
>
> Bye
>
> Sonia
> ----- Original Message -----
> From: Murthy, A (CAP, GEFA, Contractor) <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, August 16, 2000 11:22 PM
> Subject: Re: Life cycle of beans(Session and entity)
>
>
> > How do we create or design entity beans if the tables have composite
> primary
> > keys?
> >
> > Murthy A Suryanarayana
> > GE Financial Assurance
> > LTC - OPS2000 Project
> > ------------------------------------------------------------------------
> > -------------------
> > Day : (415) 492 7834
> > Dial-Com : 8 * 277 7834
> > Fax : (415) 492 7699
> > mailto : [EMAIL PROTECTED]
> >
> >
> >
> > -----Original Message-----
> > From: Dave Wolf [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, August 16, 2000 2:07 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Life cycle of beans(Session and entity)
> >
> >
> > Failover of stateful EJB's is a feature of some servers not of the code
> you
> > write or of EJB itself. Sybase EAServer can manage failover of stateful
> > Session beans and will automatically recover the in-memory state of the
> > bean. However this is generally a container feature rather then a
> > developer's work.
> >
> > Dave Wolf
> > Internet Applications Division
> > Sybase
> >
> >
> > > -----Original Message-----
> > > From: A mailing list for Enterprise JavaBeans development
> > > [mailto:[EMAIL PROTECTED]]On Behalf Of Murthy, A
> (CAP, GEFA,
> > > Contractor)
> > > Sent: Wednesday, August 16, 2000 4:20 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: Life cycle of beans(Session and entity)
> > >
> > >
> > > Hi,
> > > Suppose I have a stateful session bean. USer is logged into the
> > > aplication
> > > and doing his work. Suppose, in between application server crashed or
> > > shutdown. In that case, if we restart the server, can I
> restore or load
> my
> > > previous state of my stateful session bean before server crash /
> shutdown
> > > back after the server restarted again ? Can we store the state in
> > > the disk?
> > >
> > > Murthy A Suryanarayana
> > > GE Financial Assurance
> > > LTC - OPS2000 Project
> > >
> ------------------------------------------------------------------------
> > > -------------------
> > > Day : (415) 492 7834
> > > Dial-Com : 8 * 277 7834
> > > Fax : (415) 492 7699
> > > mailto : [EMAIL PROTECTED]
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Vivek Singh [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, August 16, 2000 3:35 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: Life cycle of beans(Session and entity)
> > >
> > >
> > > what u say seems quite logical to me....but the says otherwise
> > > e.g. Ed Roman
> > > matering EJB.
> > > I can copy and paste as these things r diabled in the book.
> > >
> > > another question:
> > > Can we have stateless session bean having ejbCreate method with
> > > arguments....
> > >
> > > If we can do that then we can manage session on our own....i
> am stating
> a
> > > probability where ejbCreate() method of stateless session bean need to
> be
> > > called everytime...
> > >
> > > Can someone clarify the confusion....
> > >
> > > Thanks
> > >
> > > Vivek
> > >
> > > -----Original Message-----
> > > From: Rajesh Balu [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, June 02, 2000 1:19 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: Life cycle of beans(Session and entity)
> > >
> > >
> > > While it is true that create() and ejbCreate() methods for a
> > > stateless bean
> > > cannot take any parameters, but when a client calls create()
> method on a
> > > stateless bean, ejbCreate() is not called on the bean instance.
> > > When an EJB
> > > server starts up, it creates a certain amount of stateless bean
> instances,
> > > calls the ejbCreate() method for each of them and stores them
> in the poo
> l.
> > > Subsequently, when a client invokes create() method on the home,
> > > the server
> > > simply picks up an instance randomly and associates it to the
> EJBObject.
> > > This
> > > is significantly different from Entity and Stateful beans for
> which, the
> > > create() method is despatched to the corresponding ejbCreate() method.
> > >
> > > I hope my understanding is correct. If there is anything wrong, please
> > > correct
> > > me. Thanks.
> > >
> > > Vivek Singh wrote:
> > >
> > > > The container pools the instances of the beans. When multiple
> > > clients call
> > > > create()......ejbCreate method of the bean will be called in all the
> > > > instances of the pooled bean......then the client is handed over an
> > > > EJBObject.
> > > > Same happens for statefull session beans...the difference is u can
> pass
> > > > parameters to the create method and the matching
> > > ejbCreate(.....) will be
> > > > called in that instance. Same for entity beans.......the
> instance can
> be
> > > > cached in this case if used before.
> > > >
> > > > -----Original Message-----
> > > > From: Samuel Abraham [mailto:[EMAIL PROTECTED]]
> > > > Sent: Monday, August 14, 2000 6:07 PM
> > > > To: [EMAIL PROTECTED]
> > > > Subject: Life cycle of beans(Session and entity)
> > > >
> > > > Hi all,
> > > > I have a doubt regarding bean life cycle(Session and Entity).
> > > > Assume that many clients are calling the create() method of a
> stateless
> > > > session beans.
> > > > Will the ejbCreate() be called whenever the create() method
> is called?
> > > > What will be the scenario in the case of stateful and entity beans?
> > > > TIA
> > > > Samuel
> > > >
> > > >
> ________________________________________________________________________
> > > > Get Your Private, Free E-mail from MSN Hotmail at
> http://www.hotmail.com
> > > >
> > > >
> > > ==================================================================
> > > =========
> > > > 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".
> > >
> > > ==================================================================
> > > =========
> > > 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".
> > >
> > > ==================================================================
> > > =========
> > > 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".
> >
> >
> ==================================================================
> =========
> > 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".
>
> ==================================================================
> =========
> 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".