dcsimg
Facing a Problem with EJB Transactions
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anurag_Govil
Posted On:   Thursday, January 1, 2004 08:52 PM

hi! i am facing this.. problem of Delayed EJB Store i have a Method having a Transaction (say Trans1) now this.. method.. in turn calls other helper Methods. In one of the Helper Methods i am getting a collection..using the findby.. method.. now i set some state for the EJBs i hav in this.collection. In the Next Helper Method dats called .. it does a findby.. for the State dat waz set... Here the Problem is.. i dont get the Objects.. for which i had set the state in the prev. method now i hav put soem debug in the ejbLoad and ejbStore due to which i come to know that as soon as the Transaction is complete.. the ejbStore for Beans Modified in the    More>>
			
hi!
i am facing this.. problem of Delayed EJB Store

i have a Method having a Transaction (say Trans1)
now this.. method.. in turn calls other helper Methods.
In one of the Helper Methods i am getting a
collection..using the findby.. method.. now i set some state
for the EJBs i hav in this.collection.
In the Next Helper Method dats called .. it does a findby..
for the State dat waz set...
Here the Problem is.. i dont get the Objects.. for which i
had set the state in the prev. method

now i hav put soem debug in the ejbLoad and ejbStore
due to which i come to know that as soon as the Transaction
is complete.. the ejbStore for Beans Modified in the
Transaction is called.

I am using Bean Managed Persistence , EJB 2 and Weblogic 6.1 sp4

Is this.. coz the container handles the Transaction using ejbStore.
I thot i usually leaves the Transaction Part to the
Database!

My Solution to this.. Problem Currently is i have placed a
Update Query in the Home Interface! Though it solves the
problem .. but... i cant go with this solution.. coz. hav to
Make Log Entries as and when each State is Updated!

Is there Any Solution??
wat must be the problem out here.
is it Caching Done by the container?
in dat case.. can i change soem setting to .. "not allow"
caching for this.. particular.. Class's Objects?

regards,
Anurag

   <<Less

Re: Facing a Problem with EJB Transactions

Posted By:   Srivatsa_Manjunath  
Posted On:   Thursday, January 22, 2004 08:58 AM

By default cache-between-transactions (with 7.1) is set to false unless you enable this explicitly. With WLS 6.x this setting is the same as db-id-shared. If this is set false the data from the database is not sychronized with the one in the cache. Turn this off and check to see if this works for you!


Also, if you are attempting the same from methods in the EJB bean, see if you have set this to true in you DD files?



true

About | Sitemap | Contact