AW: EJB questions

"Sahu, Manoj" <[email protected]> Wed, 29 Mar 2006 14:58:55 +0200
Newsgroups gmane.comp.java.sun.ejb.general
Message-ID <[email protected]>
Comments below

-----Urspr=FCngliche Nachricht-----
Von: A mailing list for Enterprise JavaBeans development =
[mailto:[email protected]] Im Auftrag von SUBSCRIBE EJB-INTEREST =
anonymous
Gesendet: Mittwoch, 29. M=E4rz 2006 14:51
An: [email protected]
Betreff: ***SPAM*** EJB questions

Hi,
I am  new to EJB.I use stateless sessionbean.
I have the below questions.Could anyone give me your suggestions / =
comments?

1.My ejb method calls a Data Access Object class's method. In my Data
Access Object's class method can I catch Exception?  Is this ok?

Yes it is.  You might want to hide the underlying SQL exception , =
potentially can be DB vendor specifics, and raise only say =
DataAccessException to the caller. =20

2. My ejb method performs single row insert into database.Is it ok if i =
set
the transaction attribute to NotSupported?

If you are using Transactional Data Source, you need to have a =
transaction for every DB operation.


Thanks in advance,

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=

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".

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
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".