Hi All
I have a Bean Managed Persistence Bean
and I have to connect to database using data source (JNDI look up) ,
so do i connect to database in every method and close the connection in all
the methods
or can can i declare somewhere so that it is visible through out
> -----Original Message-----
> From: Dey, Raj [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, February 13, 2001 6:45 PM
> To: [EMAIL PROTECTED]
> Subject: Re: EJB for inquiry.............
>
> Thanks Miranda.
> -Raj
>
> -----Original Message-----
> From: Claudio Miranda [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 12, 2001 4:40 PM
> To: [EMAIL PROTECTED]
> Subject: Re: EJB for inquiry.............
>
>
> Yes, you can have just a EJBObject ejbObj =
> Home.findByPrimaryKey(pk);
>
> --
> Claudio Miranda
> ___________________________________
>
>
> Raj wrote:
> >
> > Hi
> >
> > I am new to the EJB world and have a question which
> > may appear too simple/fundamental but would appreciate
> > some clarification.
> >
> > I need to write EJB's for an inquiry application which
> > does not store or delete data from an already existing
> > database.
> > As per the specifiction, there should be one or more
> > Create methods, Finder methods and destroy methods; as
> > I will be writing the data access code within the
> > bean( which is typical of BMP), is it mandatory that
> > the create and post create has to be written with all
> > the necesssary arguments(pl. bear in mind that I need
> > not create any rows in the database).
> >
> > When I need to make a reference to the bean using
> > home.create, I do not want any row to be created - is
> > this possible ? ( but I believe that I do need to
> > start with home.create to have a reference bean)
> > As I need to retrieve data only, is it possible to
> > directly call the finder methods?
> >
> > Any clarifications to the above is appreciated.
> >
> > THanks,
> > RD
>
> ==========================================================================
> =
> 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".
This e-mail and any files transmitted with it are for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and
destroy all copies of the original message.
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or
copying of this email or any action taken in reliance on this e-mail is strictly
prohibited and may be unlawful.
Visit us at http://www.cognizant.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".