Transaction does not commit
I have a JDBC transaction that is not committing to the database, but is also not throwing an error.
The scenario is this:
JMS message arrives on transactional queue
Message processed by MDB
MDB calls several Sybase ASE stored procedures
JDBC transaction is rolled back, JMS message is not.
I believe this to be specific to WLS 8.1. I set up two test environments where everything was the same except for the WLS version.
Same OS (windows), same JDBC driver, same database, same application code. WLS 8.1 SP4 and SP5 do not work. WLS 9.1 works.
I tried using JTS debugging, and the log says it commits the transaction. A query just prior to the MDB exiting confirms that the data is in the database and correct, but as soon as the MDB exits the data rolls back, despite the JTS commit message.
The biggest roadblock here is that I am unable to upgrade our production environment to WLS 9.1, so I need to get this working on WLS 8.1.
Can anyone offer some insight into this? I'd really appreciate it.
Craig
Further testing has revealed that I can get it to work on WLS 8.1 by <i>disabling</i> connection testing in the pool.
<p/>
Enabling <i>any one</i> of the connection testing options (test reserved, test created, or test released) causes the JDBC transaction to get silently rolled back.
<p/>
We're using Sybase Adaptive Server Enterprise/12.5.3/EBF 12868 ESD#4/P/Sun_svr4/OS 5.8/ase1253/1923/32-bit/FBO/Thu Sep 8 14:14:28 2005.
<p/>
Is there a known "Test Table Name" that works?
<p/>
I've tried several different options including:
<ul>
<li>SQL SELECT 1 from sysobjects</li>
<li>SQL SELECT @@version</li>
<li>SQL SELECT count(*) from tablename</li>
<li>SQL SELECT count(*) from db..tablename</li>
<li>SQL SELECT count(*) from db.user.tablename</li>
</ul>
Any help would be greatly appreciated.
Similar Messages
-
ST06N transaction does not exist
Hi
We have upgraded the SAP NetWeaver 2004s support package stack level from 23 to 26, after that when we are executing the transaction ST06N - we are getting error message below the screen "ST06N transaction does not exist"
for that the program name we can able to execute in T code SA38 Program name RSHOST1N
thru the T code its showing the Message ST06N transaction does not exist,
Could pls guide us
Regards
SriramHi Rupali
Thanks for your support as per your advice we can do that with help of Abaper
As of now we have upgraded the Support package 26 in Dev & QA. in the Production still i can able to execute the T code ST06N, My query's are Is this any bug or ST06N Tcode obsolete?
is this any one face the same issue ?
Regards
Sriram -
Intercompany transaction does not exists
Hi,
I am have posted entry in F-02 and also i have asigned a new company code to the transaction and also document got created.
now i need to reverse the document for the reversal reason 1 in T.Code FBU8.
I am getting error message " Intercompany Transaction does not exists".
Please help me with this issue.dear
check settings in OBYA. is clearing account configured for intercompany postings
and check that in OBA7 for the document type you using allow intercompany postings.
regards
rohit
Edited by: ROHITBALI on Nov 19, 2011 7:28 AM -
"An autonomous transaction does not see any changes made by main transact"
Hi,
I'm trying to reproduce the "An autonomous transaction does not see any changes made by main transaction" reffered on :
Oracle® Database Application Developer's Guide - Fundamentals
10g Release 2 (10.2)
Part Number B14251-01
chapter 2 SQL Processing for Application Developers
Paragraph : Autonomous TransactionsI set up a simple case...
create table emp_ as select * from emp
begin
update emp_ set hiredate=hiredate+100 where empno=7934;
end;
create or replace trigger trg_emp_
after insert or update on emp_
for each row
declare
pragma autonomous_transaction;
emp_var emp.hiredate%type;
begin
select hiredate
into emp_var
from emp_
where empno=:new.empno;
dbms_output.put_line('empno: '||:new.empno);
dbms_output.put_line('old hiredate: '||:old.hiredate);
dbms_output.put_line('new hiredate: '||:new.hiredate);
end;Prior to any change...
SQL> select empno,hiredate from emp_;
EMPNO HIREDATE
5498 21/4/1982
5499 11/10/1981
5411 10/10/1981
5410 10/10/1982
7369 17/12/1980
7499 20/2/1981
7521 22/2/1981
7566 2/4/1981
7654 28/9/1981
7698 1/5/1981
7782 9/6/1981
7788 19/4/1987
7839 17/11/1981
7844 8/9/1981
7876 23/5/1987
7900 3/12/1981
7902 3/12/1981
7934 23/1/1982After the change...
SQL> begin
2 update emp_ set hiredate=hiredate+100 where empno=7934;
3 end;
4 /
empno: 7934
old hiredate: 23/01/82
new hiredate: 03/05/82
PL/SQL procedure successfully completedAccording to the Oracle doc the select of the autonomous transaction should not see the change made to the hiredate column of the table in the main transaction(in the anonymous block)....
What may i do wrong..????
Thank you,
SimSimon:
As Tubby pointed out, your dbms_output commands do not display the value you selected in the trigger. Your trigger based demonstration needs to be more like:
SQL> SELECT * FROM t;
ID DT
1 05-SEP-2009
2 17-JUL-2009
SQL> CREATE TRIGGER t_ai
2 AFTER INSERT OR UPDATE ON t
3 FOR EACH ROW
4 DECLARE
5 PRAGMA AUTONOMOUS_TRANSACTION;
6 l_dt t.dt%TYPE;
7 BEGIN
8 SELECT dt INTO l_dt
9 FROM t
10 WHERE id = :new.id;
11 DBMS_OUTPUT.Put_Line ('ID: '||:new.id);
12 DBMS_OUTPUT.Put_Line ('Old dt: '||:old.dt);
13 DBMS_OUTPUT.Put_Line ('New dt: '||:new.dt);
14 DBMS_OUTPUT.Put_Line ('Aut dt: '||l_dt);
15 END;
16 /
Trigger created.
SQL> UPDATE t SET dt = sysdate WHERE id = 2;
ID: 2
Old dt: 17-JUL-2009
New dt: 25-OCT-2009
Aut dt: 17-JUL-2009
1 row updated.So, the automomous transaction select did not see the changed value of dt.
I know you are just trying to understand automomous transactions here and would never do sometihg like this in production right? :-)
Your trigger, as written, has some interesting side effects because of the automomous transaction. For example:
SQL> INSERT INTO t VALUES(3, sysdate - 25);
INSERT INTO t VALUES(3, sysdate - 25)
ERROR at line 1:
ORA-01403: no data found
ORA-06512: at "OPS$ORACLE.T_AI", line 5
ORA-04088: error during execution of trigger 'OPS$ORACLE.T_AI'
SQL> UPDATE t SET id = 3 where trunc(dt) = TO_DATE('05-Sep-2009', 'dd-mon-yyyy');
UPDATE t SET id = 3 where trunc(dt) = TO_DATE('05-Sep-2009', 'dd-mon-yyyy')
ERROR at line 1:
ORA-01403: no data found
ORA-06512: at "OPS$ORACLE.T_AI", line 5
ORA-04088: error during execution of trigger 'OPS$ORACLE.T_AI'John -
Call to concurrent program in a pl/sql block does not COMMIT data to table
I have the following PL/SQL block.
apps.create_po(x_org_id,x_document_num,x_agent_name,x_vendor_id,x_vendor_site_id,x_ship_to_location,x_bill_to_location,x_creation_date,new_isbn,new_print_key,new_unit_setup_cost,new_unit_run_cost,x_item,x_category_id,x_item_description,x_unit_of_measure,x_quantity,x_unit_price,x_ship_to_org_id,x_promise_date,x_qty_rcv_tolerance, x_deliver_to_location,x_destination_org_id, x_destination_subinventory,x_segment2,x_segment4);
COMMIT;
FND_GLOBAL.APPS_INITIALIZE(v_user_id,v_resp_id,201);
v_po_req_id := apps.fnd_request.submit_request('PO','POXPOPDOI',NULL,NULL,NULL,
NULL,'STANDARD',NULL,'Y',NULL,'APPROVED',NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL
DBMS_OUTPUT.PUT_LINE('Request ID is:' || v_po_req_id);
IF v_po_req_id <> 0 THEN
dbms_lock.sleep(60);
dbms_output.Put_line('Sleep executed');
COMMIT;
select PHASE_CODE,STATUS_CODE INTO v_phase_code,v_status_code
FROM FND_CONCURRENT_REQUESTS
WHERE REQUEST_ID = v_po_req_id;
dbms_output.put_line('After commit Phase and status codes are = '||v_phase_code || v_status_code);
ELSE
ROLLBACK;
END IF;
dbms_output.put_line('New Po is' || x_document_num);
dbms_output.put_line('Quantity Is'|| x_quantity);
apps.receive_po(x_document_num,x_quantity);
v_rcv_req_id := apps.fnd_request.submit_request('PO','RVCTP',NULL,NULL,NULL,
'BATCH',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL
DBMS_OUTPUT.PUT_LINE('Request ID is:' || v_rcv_req_id);
IF v_rcv_req_id <> 0 THEN
COMMIT;
DBMS_OUTPUT.PUT_LINE('COMMITED RECEIVING');
ELSE
ROLLBACK;
END IF;
Presently when this block runs, i can see the new PO number created. Commit is also successfully executed. The last output for the program is
New Po is 20651
Quantity Is 450
But due to some reason, the receiving program(receive_po) cannot retrieve the same PO from the base table.
But once this pl/sql block is complete, and i call the receving procedure from a different session, the Po is retrieved and receiving against the PO is executed successfully.
Can someone please suggest a work around ? Is the code missing something ? Since POXPOPDOI is a concurrent program which is executed as an asyncronous process, the commit statement after the call to concurent program does not work but the commit is executed only after it exits the pl/sql block.Thanks for responding.
receive_po() program just inserts the data into RCV_HEADERS_INTERFACE and RCV_TRANSACTIONS_INTERFACE tables based on the PO that is created in the previous step. So basically the new PO created has to be received and the receive_po() just inserts data into the interface tables so that RVCTP can be called after that for receiving.
Here is the code for the procedure.
SET SERVEROUTPUT ON;
--FND_GLOBAL.APPS_INITIALIZE(3,20707,201);
--Procedure for receiving interface to load data to RCV_HEADERS_INTERFACE and RCV_TRANSACTIONS_INTERFACE
CREATE OR REPLACE PROCEDURE receive_po (x_ponum IN VARCHAR2,x_quantity IN NUMBER) AS
v_vendor_site_id NUMBER;
v_vendor_id NUMBER;
v_agent_id NUMBER;
v_ship_to_organization_id NUMBER;
v_item_id NUMBER;
v_uom_code varchar2(25);
v_subinventory varchar2(25);
v_ship_to_location_id NUMBER;
BEGIN
--header information in variables
dbms_output.put_line('Entering Receiving Insert Procedure');
dbms_output.put_line('Po number ='||x_ponum||'$');
dbms_output.put_line('Quantity is ='||x_quantity||'$');
select pvsa.vendor_site_id into v_vendor_site_id
FROM po_headers_all pha,po_vendors pv, po_vendor_sites_all pvsa
where pha.vendor_id = pv.vendor_id
and pv.vendor_id = pvsa.vendor_id
and pha.segment1 = x_ponum;
dbms_output.put_line('Vendor Site ID is' ||v_vendor_site_id);
select pv.vendor_id into v_vendor_id
FROM po_headers_all pha,po_vendors pv, po_vendor_sites_all pvsa
where pha.vendor_id = pv.vendor_id
and pv.vendor_id = pvsa.vendor_id
and pha.segment1 = x_ponum;
dbms_output.put_line('Vendor ID is' ||v_vendor_id);
select plla.SHIP_TO_ORGANIZATION_ID into v_ship_to_organization_id
from PO_HEADERS_ALL pha, PO_LINE_LOCATIONS_ALL plla
where pha.PO_HEADER_ID = plla.PO_HEADER_ID
and pha.segment1 = x_ponum;
dbms_output.put_line('Ship to org is' ||v_ship_to_organization_id);
select agent_id into v_agent_id
FROM po_headers_all
WHERE segment1 = x_ponum;
dbms_output.put_line('Agent ID is' ||v_agent_id);
--printing header table information
dbms_output.put_line('vendor id is:'||v_vendor_id);
dbms_output.put_line('vendor site id is:'||v_vendor_site_id);
dbms_output.put_line('agent id is:'||v_agent_id);
dbms_output.put_line('ship to organization id is:'||v_ship_to_organization_id);
--line information in variables
--derive item id
select pla.item_id into v_item_id
from po_headers_all pha, po_lines_all pla
where pha.po_header_id = pla.po_header_id
and pha.org_id = pla.org_id
and pha.segment1 = x_ponum;
--derive uom
select pla.unit_meas_lookup_code into v_uom_code
from po_headers_all pha, po_lines_all pla
where pla.po_header_id = pha.po_header_id
and pla.org_id = pha.org_id
and pha.segment1 = x_ponum;
--derive subinventory
select pda.destination_subinventory into v_subinventory
from po_headers_all pha, po_lines_all pla,po_distributions_all pda
where pha.po_header_id = pla.po_header_id
and pla.po_header_id = pda.po_header_id
and pla.po_line_id = pda.po_line_id
and pha.org_id = pla.org_id
and pla.org_id = pda.org_id
and pha.segment1 = x_ponum;
--derive ship to location id
select ship_to_location_id into v_ship_to_location_id
from po_headers_all
where segment1 = x_ponum;
--printing transaction table details
dbms_output.put_line('item id is:'||v_item_id);
dbms_output.put_line('UOM is:'||v_uom_code);
dbms_output.put_line('subinventory is:'||v_subinventory);
dbms_output.put_line('ship to location id is:'||v_ship_to_location_id);
--insert data into the receiving interface header table
INSERT INTO RCV_HEADERS_INTERFACE
HEADER_INTERFACE_ID ,
GROUP_ID ,
PROCESSING_STATUS_CODE ,
RECEIPT_SOURCE_CODE ,
TRANSACTION_TYPE ,
LAST_UPDATE_DATE ,
LAST_UPDATED_BY ,
LAST_UPDATE_LOGIN,
CREATION_DATE ,
CREATED_BY ,
VENDOR_ID ,
VENDOR_SITE_ID ,
SHIP_TO_ORGANIZATION_ID ,
EXPECTED_RECEIPT_DATE ,
EMPLOYEE_ID ,
VALIDATION_FLAG
SELECT
RCV_HEADERS_INTERFACE_S.NEXTVAL,
RCV_INTERFACE_GROUPS_S.NEXTVAL,
'PENDING',
'VENDOR',
'NEW', -- 'CANCEL',
sysdate,
3,
3,
sysdate,
3,
v_vendor_id,
v_vendor_site_id,
v_ship_to_organization_id,
sysdate+5,
v_agent_id,
'Y'
FROM DUAL;
commit;
--insert data into the interface transaction table
for i in 1..1 loop
INSERT INTO RCV_TRANSACTIONS_INTERFACE
(INTERFACE_TRANSACTION_ID ,
HEADER_INTERFACE_ID ,
GROUP_ID ,
LAST_UPDATE_DATE ,
LAST_UPDATED_BY ,
CREATION_DATE ,
CREATED_BY ,
LAST_UPDATE_LOGIN,
TRANSACTION_TYPE ,
TRANSACTION_DATE ,
PROCESSING_STATUS_CODE ,
PROCESSING_MODE_CODE ,
TRANSACTION_STATUS_CODE ,
QUANTITY ,
UNIT_OF_MEASURE ,
ITEM_ID ,
AUTO_TRANSACT_CODE ,
RECEIPT_SOURCE_CODE ,
SOURCE_DOCUMENT_CODE ,
SUBINVENTORY ,
DOCUMENT_NUM ,
SHIP_TO_LOCATION_ID ,
VALIDATION_FLAG
SELECT
RCV_TRANSACTIONS_INTERFACE_S.NEXTVAL,
RCV_HEADERS_INTERFACE_S.CURRVAL,
RCV_INTERFACE_GROUPS_S.CURRVAL,
SYSDATE,
3,
SYSDATE,
3,
3,
'RECEIVE', --'RECEIVE', -- 'SHIP', --'06-JAN-1998',--question here
sysdate,
'PENDING',
'BATCH',
'PENDING',
x_quantity,
v_uom_code,
v_item_id,
'DELIVER', -- 'RECEIVE', --'DELIVER',
'VENDOR',
'PO',
v_subinventory,
x_ponum,
v_ship_to_location_id,
'Y'
FROM DUAL;
end loop;
commit;
END receive_po;
I am really stuck and looking out for work arond. Please help.
Thanks,
Natasha -
Statement in Transaction Does Not Roll Back
I have a group of MySQL statements in a method of a Java application.
I include an SQL error in the last statement to test the rollback of the transaction.
All the statements roll back, EXCEPT for the one detailed below.
The MySQL table:
CREATE TABLE Counter (
number INT( 4 ) NOT NULL DEFAULT 0,
account_id VARCHAR( 12 ) NOT NULL PRIMARY KEY
) ENGINE = InnoDB;I have run the staement as a PreparedStatement and a Statement:
PreparedStatement:
String updateCounterStr =
" UPDATE Counter " +
" SET number = number + 1 " +
" WHERE account_id = ? "
updateCounter = con.prepareStatement ( updateCounterStr );
updateCounter.setString( 1, accountID );
int uc = updateCounter.executeUpdate(); Statement:
Statement updateCounterStatement = con.createStatement();
int updatecounter = updateCounterStatement.executeUpdate(
"UPDATE Counter SET number = number + 1 " +
"WHERE account_id = \'" + accountID + "\'"
con.setAutoCommit( true ); // ------------------------------------ Transaction ENDS
updateCounterStatement.close();
// updateCounter.close();
... several more
con.close();
} catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
if (con != null) {
try {
System.err.print("Transaction is being ");
System.err.println("rolled back");
con.rollback(); // < ------------------------------------ con.rollback() HERE
} catch(SQLException excep) {
System.err.print("SQLException: ");
System.err.println(excep.getMessage());
} // ---------------------------------------- END the methodIn both cases Counter is incremented, but does NOT roll back.
The other statements in the transaction do roll back,
I am using:
mysql Ver 14.12 Distrib 5.0.18, for apple-darwin8.2.0 (powerpc) using readline 5.0
on Mac OS X 10.4.x
I would greatly appreciate a solution to this problem.
Many thanks in advanceI think autocommit is true by default. Also, it looks like your'e setting it to true, and then executing more SQL.
Explicitly set it to false, and DON'T set it back to trueif there's any chance you're going to want to rollback after that. -
Command button does not commit unless hit twice
I'm using ADF/BC, 10.1.3.2 jdev. I have the following code in my backing bean:
public String cardLost() {
inputText12.setValue("1");
BindingContainer bindings = getBindings();
OperationBinding operationBinding =
bindings.getOperationBinding("Commit");
Object result = operationBinding.execute();
if (!operationBinding.getErrors().isEmpty()) {
return null;
return null;
The command button is defined as follows:
<af:commandButton
text="Save" disabled="false"
binding="#{find_student_mb.commandButton4}"
id="commandButton4"
action="#{find_student_mb.cardLost}"
immediate="false"/>When I hit the Save button the first time, the input text field (inputText12) changes to 1, but the data does not get commited to the database. (I have verified this in the database) If I hit the Save button again, the data gets committed.
Is there a way to update the field and commit the data with one button?
Thanks,
BobHi,
commit doesn't execute before a field is submitted. So what you do is you submit a page then update the field (which then is not yet reflected in the submit) an call commit, which basically executes on no new data. In the second call you now submit the data shown in the field that then also gets commited. To get it commited on the first button press, set the field value to the binding layer (attribute binding or iterator binding )
Frank -
Delete exposure in THMEX and FTREX12 - error "Transaction does not exist"
I have transferred by error an exposure (using TFREX12) to HM. In THMEX I have deleted the newly created exposure that has a transaction Nber. Then in TFREX12 I try to reverse this transfer by using in the menu Position the function "Reverse transfer" but get an error message "Transaction xxx does not exist". How can it be deleted so that I can transfer the exposure to the appropriate Hedge Plan??
Thanks
G.Hi,
correct procedure is to reverse transfer in FTREX12 without deleting the exposure in THMEX. If you deleted it in THMEX first, then the error is justified. To solve the problem, you can manually create an exposure with the same transaction directly in THMEX, then transfer reversal should be possible.
Rgds,
Tomislav -
The transaction does not die after the kill and I have to restart Oracle
Hi,
I have this very hard issue with my production environment.
A transaction started from java hangs after the user has closed the browser before the transaction was completed. The transaction remains in wait for "latch free" in v $ transaction.
When the WebSphre is stopped the transaction is not closed. Neither the kill on Oracle or on Unix conclude the transaction. The restart of the DB is required.
The rollback segment pointed to by the transaction is always the same. Although the procedure call by java is always the same.
The database does not have performance problems and only one transaction per day waits for "latch free" and do not closed.
The problem could be the rollback segment? Why Oracle is unable to resolve the transaction even if the client is dead and the WebSphere off?
Regards,
BingoBongoThe average duration of the transaction is 10/15 seconds.
When it lasts longer the client is closed and the transaction remains locked. But not always only in a particular case.
From this moment the transaction is waiting for "latch free" and the value of the field USED_UBLK/USED_UREC does not increase and not decrease.
The wait event is always the "latch free".
The kill (Unix, Oralce) has no effect on the transaction.
The rollback segment is always the same.
The procedure call is always acts the same.
The value of "SECONDS_IN_WAIT-WAIT_TIME/100" increases up to a certain point and then start over again.
This is a snapshot of a transaction that requires restart of the DB:
STATUS
SECONDS_IN_WAIT-WAIT_TIME/100
CR_CHANGE
XIDUSN
SECONDS_IN_WAIT
WAIT_TIME
STATE
EVENT
USED_UBLK
USED_UREC
OSUSER
CLIENT_INFO
ROW_WAIT_BLOCK#
ROW_WAIT_OBJ#
PROGRAM
MODULE
ACTIVE
399,99
178
10
400
1
WAITED KNOWN TIME
latch free
11
738
was5a
0
56204
JDBC Thin Client
JDBC Thin Client -
I deployed an EJB Stateless and Container_Managed into 8i 8.1.7.
The bean contains a method with a simple SQLJ insert statement and works fine, except for no commit is triggered by the Bean Container when method call is finished.
I can see that the insert was done, because the counter for my table is increased!
So the fault has to be that there is no commit!
Why does the Bean Container not commit, as it states in the EJB Online Documentation??Is it NT or solaris 8.1.7 ?
On solaris it should have worked. On NT it wouldn't work, unless you explicitly lookup
the datasource and do a ds.getConnection(), the container doesn't know what to commit. In general, hereafter, the bean code needs to explicitly lookup datasources and call getConnection() on the datasource so that the datasource is enlisted. Using the default kprb connection isn't going to work unless you explicitly set default-enlist tag to true in the XML deployment descriptor. -
EJB3 : suspend JTA transaction does not release the connection in the XA DS
Hi all,
I did a test and after suspending a JTA transaction I note that in the xa datasource the activeconnection = 1.
So is it normal because I was thinking that when I suspend the transaction the teh connection is released and then after a transaction resume I could continue the transaction with another connection of the xa datasource ?
Thank you for all..
Christophe.It's a long time ago, but did you ever solve this problem?
I'm having the same issue with OSB writing to a WLS8.1 JMS queue.
I have a development OSB server which works fine.
Pete -
EF6 does not commit changes to Database
Hey Guys.
Actually it looks quite simple, but I won't get it right.
I try to save changes made to an object from an project-included DB using EntityFramework 6. the changes are correctly updated in the local objects instance and the EnitityEntry - State is set to "modified", but after calling Entities.SaveChanges()
(which does return 1 for one affected row, which is right) does not persist it to the DB, because after Project relaunch the Updated Data is gone. Please can you help me.
Thanks in advance.
Thomas
if (!HasEmptyFields())
Constants.ATLAS_ENTITIES.Entry(Selected).State = System.Data.Entity.EntityState.Modified;
else
Constants.ATLAS_ENTITIES.Entry(Selected).State = System.Data.Entity.EntityState.Added;
int result = Constants.ATLAS_ENTITIES.SaveChanges();
//result = 1 after execution which should be rightHi Stocki44,
According to your description, the issue can be caused by that the setting of the Copy to Output Directory is not configured properly. I recommend you choose the appropriate option according to the following link. Also you can review this
FAQ to troubleshoot this issue.
How to: Manage Local Data Files in Your Project:
http://msdn.microsoft.com/en-us/library/ms246989.aspx
Thanks,
Lydia Zhang -
Hi!
I just began trying to add transactions to my project.
I use jboss and stateless session bean.
All my transaction attributes were set to "supports", and all was ok.
Now I try to put the transaction attribute of one method in one bean to "required" or "requireNew", and I have a problem:
The transaction began well at the call of the method, but it is never commited after the end of the method. (nor rollbacked). So all the followwing calls to my other beans just add commands in the transaction.
My question is: do I have to do something at the end of the method (that I put to "required") to commit the transaction?
Did I miss something?
Thanks
MichelInfo:
I tried the "required" attribute. And it works as expected. In fact, I have to correct my first statement: when I said that the transaction was never committed, I was wrong. The transaction was in fact committed, but the system was left in "autocommit false" state, and even after the end of the first transaction, another was started even if it wasn't necessary (as attribute was set to "support").
Now the problem is: there are other beans that are deployed on the same server. Not all are written by me, but they share the same connection pool. So they receive the connections that my beans left in "autocommit false" state. Even if all my beans are with the "required" attribute, I can't assume that all the other beans are deployed with this same attribute.
Now the question is: is there a way to avoid creating a new transaction after the first one has ended?
It will maybe clearer If I describe what I observe:
b1 was set to "required", b2 was set to "supports".
client calls b2: there are no transaction started (expected)
client calls b1: the transaction is started (expected)
b1 calls b2: the sql statements from b2 adds to the transaction (expected)
b1 ends: transaction is commited (expected)
client calls b2: a new transaction seems to implicitly exist, and sql statements adds to this transaction, and will be only committed when the client calls another bean with the "required" attribute.
The problem is: there are maybe b3, b4...bn written by other people that also inherit the transaction that is pending. And that may lead to a big deadlock situation...
I will try to solve the problem by using Bean Managed Transaction, starting a new transaction at the start of the method and commiting it at the end, then setting the autocommit of the connection to false myself. More info later. -
My Account Account Transactions does not show all transactions
I set up a test Webtools site based on OEC Computers backend db and created a WT user linked to Account C41000.
When logged in using this user I see that
there are three transactions dated in 2005 on that account which did not come accross to WT in the Account Transactions display however current transactions dated in 2008 are being pulled accross fine.
Does anyone know if there is a restriction on the records pulled across on initial synch or if there are additional criteria in play here?by way of note ....
the missing 2005 invoices do appear when I log in as a superuser in the Business Partners>Transactions>Invoices screen. -
Method CMD_EI_API MAINTAIN does not commit
Hi gurus,
I tried to use the method MAINTAIN in the class CMD_EI_API to create a new customer, I tried both from transaction se24 and from a report to call it. No error message and a new customer number generated but when a look for it in transaction XD03 I get the error message: Customer 10002 has not been created.
Any help will be appreciate
LeoHi ABAPers,
this is my example code for updating two KNVV-fields of a single customer.
As you might notice, one of the fields is a ZZ-field, which requires to do some additional
work to get it updated (Refer to my post at [CMD_EI_API usage together with KNVV append;).
Regards
Daniel Klein
DATA is_master_data TYPE cmds_ei_main.
DATA: es_master_data TYPE cmds_ei_main.
DATA: es_error TYPE cvis_message.
DATA: wa_customers TYPE cmds_ei_extern.
DATA: lt_sales TYPE cmds_ei_sales_t.
DATA: wa_sales LIKE LINE OF lt_sales.
* Check obligatory fields for KNVV
CHECK gp_vkorg IS NOT INITIAL AND gp_vtweg IS NOT INITIAL
AND gp_spart IS NOT INITIAL.
* Control parameters
wa_customers-header-object_instance-kunnr = '0006206900'. "customer number
wa_customers-header-object_task = 'U'. "update customer
APPEND wa_customers TO is_master_data-customers.
* Read customer
cmd_ei_api_extract=>get_data( EXPORTING is_master_data = is_master_data
IMPORTING es_master_data = es_master_data ).
* Change the read-data
CLEAR is_master_data.
is_master_data = es_master_data.
READ TABLE is_master_data-customers INDEX 1 INTO wa_customers.
DELETE is_master_data-customers INDEX 1.
lt_sales = wa_customers-sales_data-sales.
READ TABLE lt_sales WITH KEY data_key-vkorg = gp_vkorg
data_key-vtweg = gp_vtweg
data_key-spart = gp_spart
INTO wa_sales .
wa_sales-data-kvgr1 = 'BB'. "new field value
wa_sales-datax-kvgr1 = abap_true. "flag: change this field
wa_sales-data-zzbemerkung = 'MAINTAIN-Bemerkung'. "new field value
wa_sales-datax-zzbemerkung = abap_true. "flag: change this field
wa_sales-task = 'U'. "Maintaining-mode: update
CLEAR wa_customers-sales_data-sales.
APPEND wa_sales TO wa_customers-sales_data-sales.
APPEND wa_customers TO is_master_data-customers.
* Testing update on customer
cmd_ei_api=>maintain( EXPORTING is_master_data = is_master_data
IMPORTING es_error = es_error ).
IF es_error-is_error IS INITIAL.
* No errors? Commit work
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = abap_true.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
ENDIF.
Edited by: D. Klein [GER] on Nov 18, 2011 3:16 PM + Rollback
Maybe you are looking for
-
How does someone request reconsideration of rejected posts
While I usually just read other people's posts, I sometimes I start a discussion when I think there is something important that is missing or confusing. About 25% of the time something (my posts are always polite) causes a mod to take the post down.
-
%n not working in leopard iChat?
For some reason, people who use "%n" to pull up your screen name for their status messages in iChat are not working ...... it just shows %n, instead of showing my screen name in place of it? anyone else with this issue?
-
Table is not centering in Firefox/Mozilla
Hi, I am using theme 9 for a simple report. I am using the "Standard, alternating row colors" as the report template. I have added align=center in the <table> and <td> tags of "Before Rows" of this template to center the report table. This works for
-
Im sorry if this is the wrong place to post this but I dont know what else to do. When i use AME or Export as Movie Im getting the ugly [..\..\Src\pp\\PPixHandleUtilities.cpp-114] error! Afterwards i get an unable to compile error. i have scoured the
-
English with Arabic support option in installation ?!
how will the English with Arabic support option in installation works, I try it but no new options to support ME shows up in AE interface or preferences!