Hi Ramya,
try changing the Isolation level to READ UnCommitted. I think it should
work. Coz if Isolation level is other than this then Session bean is
locking the record while reading, so Entity bean fails to update the same
record.
or if u can not change the isolation level do following:
1. read method of session bean be in separate transaction.
2. Make sure that for update method of entity bean Transaction Attribute be
Required_New. in new transaction if any lock is there of previous
transaction will be
released.
Thanks,
Rajdeep
> -----Original Message-----
> From: Ramya_Sundaresan [SMTP:Ramya_Sundaresan@(protected)]
> Sent: Thursday, July 10, 2003 8:44 AM
> To: J2EEPATTERNS-INTEREST@(protected)
> Subject: Calling entity beans from Session beans
>
> Hi,
> I am using the following structure in my ejbs.
> I establish the connection with the db and retrieve the records using
> session beans.
> i loop through this resultset and try to insert the record in another
> table
> through the entity bean.
> but i get a isolationlevel change exception whenever an insert is made
> through this entitybean .
>
> Please help me out!!!
>
> ramya
>
>
> -----Original Message-----
> From: P i P O [mailto:wsellado@(protected)]
> Sent: Thursday, July 10, 2003 8:41 AM
> To: J2EEPATTERNS-INTEREST@(protected)
> Subject: EJB Calling a Servlet
>
>
> i know this is strange but.....i am
> just trying to adjust on the current
> system. a servlet is handling the login and
> logout which also initializes all the
> session for users. and here...i want to have
> a session bean that could login using that
> servlet. any idea from u? thanks in advance.
>
> pipo
>
> ====================================================================
> Community Web Site (Core J2EE Patterns Catalog - Online Version):
> http://java.sun.com/blueprints/corej2eepatterns
> Getting Started (Beta Version):
> http://developer.java.sun.com/developer/technicalArticles/J2EE/patterns/
> Get the book:
> http://www.amazon.com/exec/obidos/ASIN/0130648841/corej2eepatte-20
> List Archive:
> http://archives.java.sun.com/archives/j2eepatterns-interest.html
> Unsubscribing:
> email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)
> **************************************************************************
> This email (including any attachments) is intended for the sole use of the
> intended recipient/s and may contain material that is CONFIDENTIAL AND
> PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying
> or
> distribution or forwarding of any or all of the contents in this message
> is
> STRICTLY PROHIBITED. If you are not the intended recipient, please contact
> the sender by email and delete all copies; your cooperation in this regard
> is appreciated.
> **************************************************************************
>
> ====================================================================
> Community Web Site (Core J2EE Patterns Catalog - Online Version):
> http://java.sun.com/blueprints/corej2eepatterns
> Getting Started (Beta Version):
> http://developer.java.sun.com/developer/technicalArticles/J2EE/patterns/
> Get the book:
> http://www.amazon.com/exec/obidos/ASIN/0130648841/corej2eepatte-20
> List Archive:
> http://archives.java.sun.com/archives/j2eepatterns-interest.html
> Unsubscribing:
> email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)
====================================================================
Community Web Site (Core J2EE Patterns Catalog - Online Version):
http://java.sun.com/blueprints/corej2eepatterns
Getting Started (Beta Version):
http://developer.java.sun.com/developer/technicalArticles/J2EE/patterns/
Get the book:
http://www.amazon.com/exec/obidos/ASIN/0130648841/corej2eepatte-20
List Archive:
http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing:
email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)