You need to check the transaction attribute for the component concerned.
Try "Requires Transaction".
"Paramahamsan, ArunPrasad (CTS)" wrote:
>
> Hi,
> I have a stateless bean to do an insert opearation. i open a
> transaction in the client using javax.tranasaction.UserTransaction and issue
> two calls to the bean to insert two records with the same primary key. In
> the client, iam expecting an exception for this and i call rollback. But
> even then, the first record gets inserted into the table and roll back
> method does not seem to have any effect on this.
> I want either both the calls to succeed or both to fail.
> Please help.
>
> Arun
> Cognizant Technology Solutions,
> Chennai.
> 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".
--
________________________________________________________________________________
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".