| Author |
reg. container transactions
|
sujatha laki
Greenhorn
Joined: Mar 19, 2008
Posts: 2
|
|
Hi all, I need a favor from you all. The container is not committing the transaction. Even i tried with User Transaction but the record is not getting persisted in the database. Can anyone suggest me how to commit the container transaction, if any possible way exists? Regards
|
 |
Roger Chung-Wee
Ranch Hand
Joined: Sep 29, 2002
Posts: 1683
|
|
Please post your code and deployment descriptors. What DB are you accessing?
|
SCJP 1.4, SCWCD 1.3, SCBCD 1.3
|
 |
sujatha laki
Greenhorn
Joined: Mar 19, 2008
Posts: 2
|
|
hi, I am using TopLink to persist the data and sending the descriptor for the method for which its not committing. <session> <description>Session Bean ( Stateless )</description> <display-name>WorkOrderEJB</display-name> <ejb-name>WorkOrderEJB</ejb-name> <home>WorkOrderHome</home> <remote>WorkOrderRemote</remote> <local-home>WorkOrderLocalHome</local-home> <local>WorkOrderLocalRemote</local> <ejb-class>WorkOrderEJB</ejb-class> <session-type>Stateless</session-type> <transaction-type>Container</transaction-type> </session> <container-transaction> <method> <ejb-name>WorkOrderEJB</ejb-name> <method-intf>Remote</method-intf> <method-name>createPendingDetails</method-name> <method-params> <method-param>long</method-param> <method-param>java.util.ArrayList</method-param> </method-params> <trans-attribute>Required </trans-attribute> </container-transaction> Query is getting fired and the count(for insertion) is coming but not getting committed. can you guide me how to proceed further. thanks
|
 |
Roger Chung-Wee
Ranch Hand
Joined: Sep 29, 2002
Posts: 1683
|
|
Some more questions ... 1. Please post your code, including that which obtains the DataSource and JDBC connection, and which closes the connection. 2. Which EJB server are you using? There may be a server-specific setting needed. For instance, WebLogic Server requires the use of a Tx Data Source for EJB-managed transactions. 3. Does your log show any errors?
|
 |
 |
|
|
subject: reg. container transactions
|
|
|