Urgent transaction issue

Hi,
In my project, i have a sessionbeanA, it has methodA(). In methodA(), i call classB's methodB(). In methodB(), I first call classC's methodC() and then classD's methodD(). In methodC() will call entitybeanE's methodE(); in methodD() will call entitybeanF's methodF(). methodE() will insert record to table1, and methodF() will insert record to table2.
What i want: when exception happen in classD's methodD(), inserted record in table1 will rollback.
What i do:
1. Transaction is container managed transaction.
2. Set transaction attribute for sessinbeanA,entitybeanE,entitybeanF as 'Required'.
3. Exception in methodD(), will be finally caught in sessionbeanA's methodA(). code in methodA() is as following:
try
bla bla
catch(AppException ex)
sessionContext.setRollbackOnly();
What i get: inserted record in table1 is still there, not rollback.
What's wrong?? Any correction is highly appreciated and highly duke dollared.

Hi,
Since the record inserted is not getting rolled back. It can be due to foolowing reasons. As in case of EJB in case of exceptions: System Exceptions or Business exceptions following strategy is to be used:
try{
your code....
} catch(SQLException eSQLE){
throw new EJBException(eSQLE);
} catch(Exception e){
throw new EJBException(e);
Unless and until u don't throw EJBException your inserted records won't rollback.
For your reference I am also sending an excerpt of how to handle exceptions in case of EJB.
Handling Exceptions
The exceptions thrown by enterprise beans fall into two categories: system and application.
A system exception indicates a problem with the services that support an application. Examples of these problems include the following: a database connection cannot be obtained, a SQL insert fails because the database is full, or a lookup method cannot find the desired object. If your enterprise bean encounters a system-level problem, it should throw a javax.ejb.EJBException. The container will wrap the EJBException in a RemoteException, which it passes back to the client. Because the EJBException is a subclass of the RuntimeException, you do not have to specify it in the throws clause of the method declaration. If a system exception is thrown, the EJB container might destroy the bean instance. Therefore, a system exception cannot be handled by the bean's client program; it requires intervention by a system administrator.
An application exception signals an error in the business logic of an enterprise bean. There are two types of application exceptions: customized and predefined. A customized exception is one that you've coded yourself, such as the InsufficentBalanceException thrown by the debit business method of the SavingsAccountEJB example. The javax.ejb package includes several predefined exceptions that are designed to handle common problems. For example, an ejbCreate method should throw a CreateException to indicate an invalid input parameter. When an enterprise bean throws an application exception, the container does not wrap it in another exception. The client should be able to handle any application exception it receives.
If a system exception occurs within a transaction, the EJB container rolls back the transaction. However, if an application exception is thrown within a transaction, the container does not roll back the transaction.
bye !! Hope this helps you.
Thanks & regards
Paritosh

Similar Messages

  • Purchasing Document Output - Transaction issue Purchas Order

    Hello colleges
    we want to use Transaction issue Purchas Order for output PO ,
    we find that we cant preview PO from this Transaction before printing  and all so we can not have the possibility to  print some POu2019S  when we print use the output manually.
    Can some one help ??
    Is there possibility to mark several POu2019S and print them whit one push button ??
    Can we have the possibility to preview PO data before print it? We need your advise u2026  
    Best regards
    Gil Shinar

    Hello ,
    1.For the first question of printing multiple PO's at the same time you can use the report RSPPFPROCESS using SE38 transaction. You have the possibility of defining the PO number range that you want to output in one Go.
    2. There is no possibility to preview and print in 'Issue Purchase Order' transaction. You can achieve the same  only in 'Process Purchase Order' (BBP_POC) transaction .
    Best Regards,
    Sapna

  • A very urgent deployment issue about DBAdapter

    Hello All,
    I have a very urgent deployment issue about DBAdapter.
    That DBAdapter is connect to DB2 AS400 Database. I have a developing database (jdbc:as400://server01/TEST) and a production database (jdbc:as400://server01/PROD).
    During developing, I used DBAdapter wizard to create it, and import some tables, and set the Adapter to use jabc/DB2DS as connection information for easily deployment later.
    Then I deploy to Production. I configured Data-source.xml and oc4j-ra.xml rightly; I set DB connection point to production database. But the DBAdapter still write into developing Database.
    I checked the DBAdapter, the imported tables are something like this, TEST.table1, TEST.table2. And there are a lot "TEST" located in DB2Writer_toplink_mapping.xml, DB2Writer.xml, TEST.schema, DB2Writer.table1.ClassDescriptor.xml.
    This TEST is refrer to the TEST in connect String jdbc:as400://server01/TEST.
    I think this might be the reason cause the problem. As to production database, "TEST" should replaced by "PROD". If I changed it manually, I have to change every time when switch between TEST and PROD. And I also don't know if it is safe to do it? (I tried, and bring some toplink mapping problem)
    By the way, for Oracle Database, because we use 2 instances for testing and production with same schema name, and do not have this issue.
    Anyone could help and many thanks.
    Kerr
    Message was edited by:
    Kerr

    Hi Kerr,
    The idea is to set up all connections in the BPEL or ESB services with logical names, e.g. typically of the form eis/DB/MyFinancialSystem or eis/DB/MyLogisticsSystem. This way, you do not have to modify code when deploying it onto different environments that serve different purposes.
    When moving your services through their lifecyle, on every environment you deploy these to you will have the same logical connections configured on each instance, e.g. for DEV, QA, SIT, UAT and PROD. Only, in case of QA the actual physical connection is configured to point to the QA instance of the systems that your services interact with whereas in case of UAT it points to the UAT instance of the same system.
    Maybe your problem is caused by connecting as user "SomeUser" when running the DB Adapter wizard during development and actually selecting objects from a different schema than you used to connect with, e.g. "Test" in your case.
    Hth,
    Sjoerd

  • ITunes Store Transaction Issue

    Can someone tell me how to contact iTunes for Transaction issues?
    PROBLEM:
    As you know, when we buy something from iTunes, it the "transaction details" says something like:
    "OUTSTANDING TRANS#****-****-****-**** MISCELLANEOUS DEBIT DEBIT". (The "****" being the card number).
    It has said that for the past several day in my "Transation History".
    How do I know its iTunes? My Bank told me + Everytime iTunes stuffs up (as in I buy something, and its not registsredt rpoperly I have to give the security number on the back of your debit card). So this time, I put the Security Number in maybe a few times, thinking I had to, and each time I did. They took $1 debit from me.
    Has anyone else encountered this?

    Try redownloading it via iCloud.
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    If the problem persists, see this article.
    How to report an issue with Your iTunes Store purchase
    B-rock

  • Multiple records for a single transaction - Issue in LSMW

    Hi,
    i'm facing a issue in LSMW
    i have the data coming up in the flat file. the data which constitutes the single transaction consists of  data from multiple records from the flat file..
    suppose we have 10 records in the flat file... and all the 10 records related to ony  2 transactions i.e say 6 records to first transaction and next 4 records to next transaction.
    we have a direct input method to handle this data like field1 for first record, field2 for 2nd record and so on...
    while uploading, we will get all the records one by one into our source structure. My question is can we handle this scenario in lsmw? if yes, pls suggest
    Thanks in advance
    Shekhar

    Hi Kris,
    this is regarding the asset creation via AS01..
    we are getting the flat file in that way. Lets assume like this:
    suppose for one transaction we may need to fill 5 depreciation keys and for another option only 3 dep. keys we need to fill.
    then in the flat file, we can get like 5 records for first transaction i.e asset and 3 records for 2nd transaction
    Can we handle this via lsmw
    Regards
    shekhar

  • Cancellation of Goods Receipt with Credit Memo Transaction Issue

    Dear SAP Expert and Guru,
    Normally cancellation of goods receipt cannot be done when invoice has been issued. Cancellation of Goods receipt can only be done when there is the credit memo being issued in MIRO.
    The problem now is that is there any table that can tracked the linkage between Credit Memo and the Cancellation of Goods receipt?
    The goods receipt with the invoice linkage can be found in both table EKBE and BKPF. But not the credit memo and cancellation of Goods receipt.
    Thank you
    Regards
    Leonard Tan

    Dear Jeya and SAP expert and Gurus,
    You are correct, but with the document number, how am I going to get the Cancellation of GR document?
    In table BKPF and EKBE. With the invoice number (34*******) then pass it to table BKPF to get the invoice number (52*******),
    Then get the invoice number (52*******) pass it to table EKBE to get the Goods Receipt document (61*******).
    However, this only can track the transaction goods receipt and Invoice but not the credit memo with cancellation of goods receipt.
    Kindly asvise on that.
    Thank you
    Regards
    Leonard Tan
    Note : Do not quote previous reply every time,simply reply for member you want to respond.
    Edited by: Jeyakanthan A on Jul 8, 2011 3:23 PM

  • (Urgent) Sysdate issue in Oracle applications scheduler.

    Hi All
    I have used the query 'SELECT SYSDATE FROM DUAL' for a parameter in concurrent request. If I execute this concurrent as a single request, then it returns exact sysdate (current date) in a parameter.
    If i schedule this program for daily execution using scheduler, then the sysdate is always giving value of the date when i have configured the scheduler.
    For example,
    My Requirement :The scheduler configured such a way that it should run everyday.Whenever it runs my query has to return the current date.
    Current Issue: I schedule the scheduler on 23-Dec-2008. If it runs on 24-DEC-2008,it returns as '23-DEC-2008', If it runs on 28-DEC-2008 also,it returns as '23-DEC-2008.However If I execute this as a single request, it works fine.
    Can anyone help me please,,It is very urgent.
    Thanks in Advance

    Hi,
    I can confirm that this does work properly on 11.1.0.6 . Here is the code I used
    -- create a table for output
    create table job_output (log_date timestamp with time zone,
            output varchar2(4000));
    begin
      dbms_scheduler.create_job (
        job_name => 'myjob',job_type => 'plsql_block',
        job_action =>
      'insert into job_output values(systimestamp, ''myjob runs'');',
        repeat_interval=>'freq=minutely',
        number_of_arguments => 0, enabled => true);
    end;
    exec dbms_lock.sleep(130);
    select * from job_output order by log_date ;The table job_output clearly shows dates increasing by one minute every run. If you use "freq=daily" instead then the job will run once a day instead of once a minute.
    Does this example work for you ? If not could you post output from the job_output table and tell us what version database you are using.
    Thanks,
    Ravi.

  • Very Urgent-transaction is failed after record is added.

    Hi Gurus,
    This is Urgent requuirement that-
    1) i have a search page-in that detail icon to navigate detail page . in detail page i have a advance table contains(Supplier, Supplier Site Code,City State,Country,Status,StatusUpdateDate)
    these rows- at this moment all the rows of columnns are empty data.
    2)in detail page i have add supplier button to navigate to one more page, in add supplier page, i have a Supplier name Drop down list contains list of suppliers. user can select any one supplier from Drop down list
    and click the go button to get all records(Supplier, Supplier Site Code,City State,Country,Status,StatusUpdateDate) in advance table, up to this OK.
    3)now user click any of one check box associated with that row in advance table,click the button and come back to detail page with this records and store the table also.
    4)now new supplier added to the detail page.again user want to add one more supplier to click the add supplier button to navigate add supplier page, in add supplier page the supplier which i have selected first time is appeared in table and drop down list.
    actually it should have to come up with clean.
    Exactt problem is, first time  when i run the page add supplier page comes up with clean.after adding the supplier to detail page means after one transation i want to- Add supplier page in, supplier dropdown list and  table should come clean not old data.
    i hope requirement is clear you guys. please kindly any one help me regarding this.
    Thanks in advance,
    vamshi krishna

    hi vamshi
    in the controller of your supplier page go in in this way
    in processRequest method
    clear your VO like this
    OAApplicationModule am1 = pageContext.getApplicationModule(webBean);
    OAViewObject oav=(OAViewObject)am1.findViewObject("your VO");
    oav.setWhereClause(null);
    oav.setWhereClauseParams(null);
    oav.setWhereClause("1=2");
    oav.executeQuery();
    and in
    processForm request method set the where clause null again like this
    OAApplicationModule am1 = pageContext.getApplicationModule(webBean);
    OAViewObject oav=(OAViewObject)am1.findViewObject("your VO");
    oav.setWhereClause(null);
    hope this will resolve your issue
    thanx
    Pratap

  • Very urgent Decimal issue in ADF page

    Hello friends,
    i have an issue in ADF page which was weight field, issue has below.
    1) weight filed was validated that without entering 5 digit value in filed, example suppose i enter 12345 in weight it is showing that in small dialog box -weight value should be 0 to 9999.999 only. but it is let me to go next field and submit button. it is happening only in create page only.
    2)but when i go to detail page , same weight fild is populated there - i enter invalid weight something 12345, it is showing that in small dialog box -weight value should be 0 to 9999.999 only. but here let me not go to another filed until i ENTER valid value.
    create page weight filed need to work same as detail page.i am new to ADF development, how to check where this validation done and how to fix this.
    very very urgent.
    Thanks,
    vamshi.

    If you use ADF BC, open the entity and choose "Business Rules". You can then add validation rules such as range limits under the attributes. It is usually best practice to include validation rules in the entity (model layer), this way they apply automatically to all view objects based on the entity and you are guaranteed to have only valid values in the database. (View layer validation may have its place as a convenience supplement.)
    Read more about business rules in the developer's guide: http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcvalidation.htm

  • Paypal Transaction Issue

    I recently made a transaction to one of the sellers on paypal. The invoice shows the payment to be completed although I have not recieved any confirmation email and neither has the seller. However when I check the Paypal history it shows the transaction as completedPlease Help ASAP

    Hello,
    Using some else's thread is not only unfair to the thread starter but can lead to confusion and cause difficulty for those who are trying to assist you.
    You have a different issue to that which is being discussed there. Please start your own thread .
    Thank you.
    If you have a payment issue please contact Skype customer service as users here on the community can't help you with those. To help you find the right place for these types of questions please feel free to use the following links:
    Refund requests
    Problems with credit card/ PayPal payments
    Other payment issues
    General Payment and prices help
    TIME ZONE - US EASTERN. LOCATION - PHILADELPHIA, PA, USA.
    I recommend that you always run the latest Skype version: Windows & Mac
    If my advice helped to fix your issue please mark it as a solution to help others.
    Please note that I generally don't respond to unsolicited Private Messages. Thank you.

  • Urgent:Transaction  not working.

    Hi all,
    I have developed a report program.The report has a selection screen.It displays the report in ALV grid using "REUSEALVGRID" function.The program runs successfully from ABAP editor.But when i created a transaction for the program and tried to run the same using the created transaction code,the program returns to
    SAP easy access screen after the selection screen display.
    I tried in debugging mode,The program does not enter the
    START-OF-SELECTION event block.
    It is urgent.Can anyone throw more light into this problem.
    Thanks,
    G.Jayaprakash

    Hi,
    I think I may have discovered the problem. In SE93 when you define the transaction code, you must create it as a report transaction. ( choose the option <i><b>Program and Selection Screen (report transaction)</b></i> ).
    I suspect that you would have defined it as a dialog transaction ( the <i><b>Program and Screen (dialog transaction)</b></i> option ) and given the screen number as 1000.
    Hope I have identified the problem correctly.
    Regards,
    Anand Mandalika.

  • Urgent:Transaction Variant

    Hi All,
    I was trying to create a Transaction Variant using SHD0. I am facing 2 problems now.
    1.When i try to create a variant for the transaction s_alr_87013326 in SHD0 it says 'Variants are possible only for dialog transactions'. How can i create a variant for this transaction code.
    2.There is an initial pop up screen for this transaction which ask for the controlling area, i want to hide that field too.My client want me not to show that field as we are goin to assign the trns code to a role.how can i do that?.
    Very urgent.Points will be awarded for useful answers.
    Thanks
    Regards
    Andrew

    Hi Muthu,
    Thanks for the reply.
    If possible can you give me your mail id.I will send you the screenshots.
    Anyway it is a interactive report for Profit center accounting, Profit Center Grp:Plan/Actual/variance.In this trrns the initial screen is a dialog box where i will be giving the Controlling area and it proceeds to the selection screen.Now i need to hide this dialog box or the Controlling area Field and pass a default value for it.
    Any other way to do it? Need your valued suggestions.
    Regards
    Andrew

  • Urgent : Export issue

    Hi,
    I had an export script to export my database full. It was running well every day until this morning I met this issue. If someone can help me, it's very urgent !
    Thanks
    bash-3.00$ ${ORACLE_HOME}/bin/expdp system/xxxxxxx full=y directory=EXPORT_DUMP_M3PROD dumpfile=${DUMPFILE} logfile=${LOGFILE}
    Export: Release 10.2.0.4.0 - 64bit Production on Monday, 18 May, 2009 11:06:13
    Copyright (c) 2003, 2007, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, Data Mining and Real Application Testing options
    ORA-31626: job does not exist
    ORA-31650: timeout waiting for master process response

    So, I opend a SR in Metalink.
    They ask me to rerun catproc.sql and give me a note to delete orphaned jobs
    Frist of all the CATPROC component should not be INVALID in the database
    For this you have to rerun the catproc.sql script which can be found in $ORACLE_HOME/rdbms/admin
    ACTION PLAN
    ============
    1. startup restrict
    2. spool catproc.log
    3. @?/rdbms/admin/catproc.sql
    4. spool off
    Second please use Note.336014.1 Gen Ext/Pub How To Cleanup Orphaned DataPump Jobs In DB
    A_DATAPUMP_JOBS to cleanup the data pump jobs and then retry to export
    Thank you !!
    oldschool

  • URGENT: Transaction / Screen Variants

    Hi,
    I faced new problem....
    When i m going inside the CO01 t.code...click on Component Overview (F6)...
    It display the Error:-----
    Error in variant: Screen SAPLCOMK 0120 was processed more than 100 times
    Message no. MS419...
    Wat is this......now i am unable to go inside Component Overview, after clicking on this problem it comes on initial screen....
    Plz Help Me, Its very URGENT ....
    Prince

    check which function group that program and screen are in  and view thru SE80, and select the screen number... u might get some more insight on the issue.

  • ME41  Transaction -Issue Output

    How to issue print out from transaction ME41 for Purchase RFQ?

    HI,
    In the initial screen of ME41
    define the following fields
    rfq type
    language key
    rfq date
    quotation deadline
    RFQ
    Under Organisational Data
    purchasing orgn:
    purchasing group
    Under Default data for items
    delivery date : T
    and execute the screen
    inside define the material table control data.
    from here this is similar to ur nor purchase order transaction.

Maybe you are looking for