About passivate/activate state in BC4J

Hi,Does anyone know this question about passivateState/activateState in BC4J?
the result of passivateStateForUndo(or passivateState) was not expected if I do the
activateStateForUndo after do postChanges. for example:
// create a View Object "deptVO"
ViewObject deptVO = applicationModule.findViewObject("DeptView");
//modify the first row then post.
Row aDept = deptVO.first();
aDept.setAttribute("Deptname", "testname1");
appModule.getTransaction().postChanges();
// Passivate the Application Module state
appModule.passivateStateForUndo("snapshot1", null, 0);
//Activate the Application Module state
appModule.activateStateForUndo("snapshot1", ApplicationModule.ACTIVATE_REMOVE_FLAG);
//Get the Deptname, but the returned value is not "testname1" that was put before Passivate.
aDept = deptVO.first();
System.out.println(aDept.getAttribute("Deptname"));
the result is right If I change the performance sequence of postchanges and passivateStateForUndo.
Thanks much.

See Re: BC4J: activateStateForUndo rolling back to before the passivateStateForUndo

Similar Messages

  • Every time a passivate/activate!

    I've noticed some unexpected behaviour of stateful session EJBs in a
              WL6.0 cluster. Trace lines in the lifecycle methods reveal that when the
              ejb is first invoked the following sequence occurs (without any
              intervening time gaps):
              create / passivate / activate / run-the-method / passivate / activate
              and then subsequent method calls cause:
              run-the-method / passivate / activate
              The ejb is defined with replication type=in-memory,
              max-beans-in-cache=100 (only 1 in there during the test), and idle
              timeout seconds=3600.
              TIA
              Chris
              

    You are correct except that the changes are replicated at the end of each
              transaction...
              Michael Reiche wrote:
              > makes sense to me... to implement replication, passivate is called to
              > replicate the changes to the secondary server whenever the EJB is modified
              > (maybe). Then activate is called to get the bean back to a working state.
              >
              > Mike
              >
              > Chris Palmer <[email protected]> wrote in message
              > news:[email protected]..
              > > I've noticed some unexpected behaviour of stateful session EJBs in a
              > > WL6.0 cluster. Trace lines in the lifecycle methods reveal that when the
              > > ejb is first invoked the following sequence occurs (without any
              > > intervening time gaps):
              > >
              > > create / passivate / activate / run-the-method / passivate / activate
              > >
              > > and then subsequent method calls cause:
              > >
              > > run-the-method / passivate / activate
              > >
              > > The ejb is defined with replication type=in-memory,
              > > max-beans-in-cache=100 (only 1 in there during the test), and idle
              > > timeout seconds=3600.
              > >
              > > TIA
              > > Chris
              > >
              

  • [SOLVED]Attempt to passivate/activate custom user data not working

    Hi
    I have an ADF BC application written in JDev 10.1.3.3 and our customers are reporting intermittent "Missing param at index xxx" error messages. I gathered that this could be related to passivation/activation problems in our application. I switched the app module jbo.ampool.doampooling=false and found that app failed repeatedly with the error even after patch 6215854.
    I tried converting to 10.1.3.4 and found that the application ran without error even with jbo.ampool.doampooling=false. However on one of the pages I am using a tree object which utilises a View Link Accessor that contains a bind variable. To set the value of the bind variable I am using VO client interface methods as per Steve Muench's example 113
    http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html
    The variable I am passing to the VO client interface methods is stored in a session scope bean and doesn't survive the activation/passivation process.
    So I followed the instructions here
    http://download-uk.oracle.com/docs/html/B25947_01/bcstatemgmt005.htm#sm0495
    and put my value into the user session hash table and try to write that value to the passivation snapshot.
    The problem comes in the activation stage. Processing does not pass the line in bold tags because the length of the nodeList = 0. It seems to find a nodeList from "custId" but its length is zero. Any ideas why that could be?
                if (elem != null) {
                  // 1. Search the element for any <jbo.counter> elements
                   System.out.println("@activate state wanal 1 2");
                  NodeList nl = elem.getElementsByTagName("custId");
                  if (nl != null) {
                    // 2. If any found, loop over the nodes found
                    System.out.println("@activate state wanal 1 3 <"+nl.getLength()+">");
    for (int i=0, length = nl.getLength(); i < length; i++) {
                      // 3. Get first child node of the <jbo.counter> element
                       System.out.println("@activate state wanal 1 4");
                      Node child = nl.item(i).getFirstChild();
                      if (child != null) {
                          System.out.println("@activate state wanal 1 5 <"+child.getNodeValue()+">");
                        // 4. Set the counter value to the activated value
                        getDBTransaction().getSession().getUserData().put("custId",new Integer(child.getNodeValue()));                   
                        break;
                }thanks
    paul
    Message was edited by:
    paul.schweiger

    Thanks Timo that debug output was really useful
    My initial error was that I was setting a property custId and then trying to retrieve custID - oops
    It turns out that the session scope bean data was surviving passivation/activation but the value in the bind variable in the view link accessor was not surviving. I now ensure that the bind variable is set by calling the method that populates the bind varaible on activation and use the data from session user data hash table
    thanks
    paul

  • I have photoshop elements 12 and it shows elements 11 on my icons and also when hitting about elements it states 11 and not 12 ? however the cd shows 12 , I'm confused

    i have photoshop elements 12 installed and it shows elements 11 on my icons and also when hitting about elements it states 11 and not 12 ? however the cd shows 12 , I'm confused as why it shows elements 11 and not 12...

    Where did you buy the CD? Was it a boxed, seal unbroken?

  • HT5071 when a user buys my ibook in iTunes store, how can I find out more about the user, state purchased in, email it downloaded to, etc ?

    when a purchaser reads my email message in mailchimp, I am provided with the user details, email address used, state located in, etc.....why can't I get the same information from Apple iTunes when a purchaser downloads a paid copy of my iBook from the Itunes bookstore.?????  in order to complete the download of a purchased iBook, that information is gathered by Apple, but is not provided to the iBook author.....any solutions out there...

    All Apple will give you are sales counts and other such general information. Personal information about individual purchases will not be available to you.
    Regards.

  • Urgent: About Obsolete ABAP statements in Netweaver 4.0?

    Can any body please help us about the obsolete ABAP statements in Netweaver 4.0 corresponding to SAP 4.6?

    Hi,
    Pls read first the rules of engagement.
    Anyway, open an editor and choose Utilities->Help on->New features in ABAP.
    Or check notes like
    367676 and 689951
    Eddy

  • Need help about switch & case statements

    Dear friends
    I am new student of Java
    Our University gave us project to make a program. Here is the program:
    a- Write a java program ,so the user can input the monthly salary then compute the net salary of an employee after deducting the tax ,use the following table to calculate the tax .Note use switch statement .
    Annual salary Tax
    100- 999 0
    1000- 1999 5%
    2000- 3999 7%
    4000- 7000 10%
    7000 13%Please help me how could I use switch statement.
    All I know about switch statement is that I have use Integers for selection.
    Kindly help me. I have only 2 days to submit my assignment.
    Thanks in Advance
    Edited by: syedejaz on Aug 13, 2008 8:09 AM
    Edited by: syedejaz on Aug 13, 2008 8:10 AM

    Hello every body:
    I tried to make my first program using if then else but the problem is that no calcuation is happinig
    /*  TMA01 ITC250, Part-III, a
      Program which gets input monthly salary and shows net salary after deducting given tax.
    File: netSalary.java
    import javax.swing.*;
    import java.text.*;
    public class netSalary {
    public static void main(String[] args) {
           int Salary=0,Tax=0,monthlySalary=0;
           monthlySalary= Integer.parseInt(JOptionPane.showInputDialog(null, "Enter Monthly Salary:"));
           if ((monthlySalary>=100) && (monthlySalary<=999)) {
                Tax = (monthlySalary*(0/100));
          Salary = (monthlySalary-Tax);
         JOptionPane.showMessageDialog(null, "Net Salary is:" +Salary);
            } else if ((monthlySalary>=1000) && (monthlySalary<=1999)) {
                Tax = (monthlySalary*(5/100));
         Salary = (monthlySalary-Tax);
         JOptionPane.showMessageDialog(null, "Net Salary is:" +Salary);
            } else if (monthlySalary>=2000 && monthlySalary<=3999) {
                Tax = (monthlySalary*(7/100));
         Salary = (monthlySalary-Tax);
         JOptionPane.showMessageDialog(null, "Net Salary is:" +Salary);
            } else if (monthlySalary>=4000 && monthlySalary<=7000) {
                Tax = (monthlySalary*(10/100));
         Salary = (monthlySalary-Tax);
         JOptionPane.showMessageDialog(null, "Net Salary is:" +Salary);
            } else {
                Tax = (monthlySalary*(13/100));
         Salary = (monthlySalary-Tax);
         JOptionPane.showMessageDialog(null, "Net Salary is:" +Salary);
    } The tax is not detuting. please tell me the mistake
    Edited by: syedejaz on Aug 13, 2008 2:49 PM

  • About java.sql.Statement

    Hi friends, i want to ask if there is any way to display the complete statement as a string after setting it's parameters(that is for debuging purpose).

    Hi friends, i want to ask if there is any way to
    display the complete statement as a string after
    setting it's parameters(that is for debuging purpose).JDBC related questions should be asked in the JDBC forum.
    Your subject line is contraindicative to your question which is about PreparedStatements.
    The answer to your question is no. You can however use a tracing driver that will log your queries so that you can see what is going on. Look at http://www.p6spy.com/

  • About the import statement

    Hi, im trying to use NumberFormat to format a double variable.
    How do i know if i need to use the "import java.someclass" statement or not? thanks for reading.

    NumberFormat is in the java.text package, so you either have to import it via:
    import java.text.NumberFormat;
    or
    import java.text.*;
    or else everywhere you use it fully qualify it as java.text.NumberFormat

  • Difference about the SQL Statement

    Hi,
    I have a doubt, It in one of my application i wrote a select query like this
    sql> select * from quartz;
    but my DBA told me not to use the *(star), instead he told me to use the column names. when i asked him, he said there will be performance issues.
    Now my question is can u explain me the difference.
    Thanks in advance,
    Siva

    Did the DBA explain what performance issue he was concerned about? Obviously, Oracle has an extra step to resolve the * to the appropriate column list, but this is likely to be an imperceptibly small portion of the time required to execute the query.
    In an actual application, you would normally want to explicitly list column names so that your code isn't affected when new columns are added to the tables.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Sorry to ask about Invalid Cursor State again...

    I am getting this error which is really frustrating because I can't figure out why it is happening.
    I am connecting to a csv file using jdbc:odbc Microsoft Text Driver.
    I instantiate the ReadFortySite class in the GUI class.I then click on a jList in my main GUI and this passes the selected object to the code below. It works fine the first time but if I try to select another jList element, it throws the Invalid Cursor State error..Any Ideas??
    public class ReadFortySite {
    private String file;
    private String path = null;
    private Connection conn = null;
    private Statement stmt;
    private ResultSet results, col_results;
    private ResultSetMetaData rsmd;
    private ArrayList test_names,columnHeads;
    private Object List_Selection;
    /** Creates a new instance of ReadFortySite */
    public ReadFortySite(String file) {
    this.file = file;
    ReadFile();
    public void ReadFile()
    try{
    //path = file.getPath();
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    // create a connection.
    /* NEED 2 TAKE HARD CODED VALUE OF E: OUT!!!! */
    conn = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Text Driver (*.txt; *.csv)};Dbq=E:/;Extensions=csv");
    // create a Statement object to execute the query with
    stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
    // Select everything from the specified csv file
    results = stmt.executeQuery("SELECT * from ("+file+")");
    //ArrayLists used to manipulate and hold test name values
    columnHeads = new ArrayList();
    // get column heads
    rsmd = results.getMetaData();
    for ( int i = 4; i <= rsmd.getColumnCount(); i++ ) {
    columnHeads.add( rsmd.getColumnName( i ) );
    }//end try
    catch(Exception e)
    System.out.println("Error " + e);
    }//end method
    public ArrayList getArrayList()
    return columnHeads;
    public ArrayList getTestValues(Object obj){
    ArrayList TestValues = new ArrayList();
    try{
    List_Selection = obj;
    //have an object representing the value selected
    //need to get test results associated with that value
    for(int i=1;i<rsmd.getColumnCount()+1;i++)
    if(obj.equals((Object)rsmd.getColumnName(i)))
    while(results.next()){
    String vals = results.getString((String)obj);
    TestValues.add(vals);
    //System.out.println(TestValues.toString());
    }//end while
    }//end for
    }//end try
    catch (SQLException sqle)
    System.out.println("Error " + sqle);
    return TestValues;
    }

    You should use code formatting when you post code, and you should also post the stack trace that you get when you run the code.
    /Kaj

  • About at new statement with offset/length

    Hi All,
    I have following source code:
    data:
      begin of tab occurs 3,
              fcode(4) type c,
          end of tab.
    append 'aaaa' to tab.
    append 'babb' to tab.
    append 'abaa' to tab.
    append 'cdef' to tab.
    data:
      lv_test(4) type c.
    loop at tab.
      at new fcode+1(1).
      move tab-fcode+1(1) to lv_test.
      write / lv_test.
      endat.
    ENDLOOP.
    The excution result is:
    a
    a
    b
    d
    My question is:  why the offset/length of 'fcode+1(1)' doesn't work at all.
    Any help is appreciated!

    AT for group change
    Change of group when processing loops of extracts and internal tables.
    Syntax
    AT NEW <f>.
    AT END OF <f>.
    AT FIRST.
    AT LAST.
    AT <fg>.
    The statements are used to process group levels within a loop using an extract dataset or an internal table. They introduce statement blocks that must be closed with ENDAT. The statements between AT and ENDAT are only executed if the corresponding group change occurred.
    When ever you use the control events and display the data you get some scrapped values.
    So, to avoid it use <b>READ TABLE <table name> INTO <WA></b>. and then print the values.
    Regards,
    Pavan P.

  • Question about this case statement...Never seen it written this way

    I have this case statement written by a developer and i am trying to understand what he was trying to accomplish with writing it in this manner
    CASE t_CELL
                    WHEN 'XML' THEN
                        'Mods'
                    ELSE
                        CASE WHEN t_CELL IS NOT NULL THEN
                            t_Cell
                        ELSE
                            CELL
                        END
                    END
                = CELL OR CASE t_CELL
                    WHEN 'XML' THEN
                        'Amps'
                    ELSE
                        CASE WHEN t_CELL IS NOT NULL THEN
                            t_Cell
                        ELSE
                            CELL
                        END
                    END = CELL);What is throwing me off is the = CELL that was included..Kindly note, this is just a sample code

    Hi,
    If x and cell are strings, then I trust you understand what it means to compare them by saying:
    x = cellx can be any kind of expression that returns a string.
    For example, do you understand what it means if x is a string literal, like this?
    'Amps' = cellDo you understand what it means when x is another string column, like this?
    t_cell = cellDo you understand what it means when x is a function that returns a string, like this?
    TO_CHAR (SYSDATE, 'Dy') = cellIn the code you posted, the CASE expression is just another way of specifying a string value for x:
    CASE ... END = cellA CASE expression is just another kind of expression, that is, another thing that can replace x on the left of the = sign.
    It looks like the condition you posted is equivalent to:
    (     (     t_cell     = 'XML'
         AND     cell     IN ('Amps', 'Mods')
    OR     (     t_cell     != 'XML'
         AND     cell     = t_cell
    OR          t_cell     IS NULL
    )

  • Need help about distributed sql statement

    Hello everybody
    Enviroment:
    Oracle 11g R1.
    This Database was fine, 'till some days ago that a new system was deployed on other database. New system runs some SELECT querys to a my database using db_links. These statements are blocking some resources and 'cause that they are blocking many users of my database. I can see on Enterprise Manager this wait event : "enq: TM contention".
    Now my question is, why are these querys are blocking resources and users if they are only of type SELECT??? I thought that querys that did this were DML and DDL statements.
    Does this behavior is related with that those querys are executed by a distributed way (using dblinks)??
    Thanks a lot

    user652447 wrote:
    Distributed Transactions require commit even if a Select. See the following FAQ post from Jonathan Lewis for some basic information.
    http://www.jlcomp.demon.co.uk/faq/dblink_commit.html
    HTHNot always true though, it depends. The article you are linking to is quite old and covers, as stated, Oracle version(s): 7.0 – 9.2. Whereas the OP is on 11.
    http://download.oracle.com/docs/cd/B10500_01/server.920/a96521/ds_txns.htm
    In the section "Read-Only Response"
    Note that if a distributed transaction is set to read-only, then it does not use rollback segments. If many users connect to the database and their transactions are not set to READ ONLY, then they allocate *rollback space* even if they are only performing queries.
    In the OP's version
    http://download.oracle.com/docs/cd/E11882_01/server.112/e17120/ds_txns003.htm#ADMIN12226
    Note that if a distributed transaction is set to read-only, then it does not use undo segments. If many users connect to the database and their transactions are not set to READ ONLY, then they allocate *undo space* even if they are only performing queries.
    However that doesn't account for the types of lock the OP is experiencing.

  • Exact  function about this RMAN  statement

    What does the statement 'BACKUP VALIDATE CHECK LOGICAL DATABASE ' in RMAN internally performs? As per docs at http://docs.oracle.com/cd/E11882_01/backup.112/e10642/rcmvalid.htm#BRADV89562, it checks for logical corruptions in addition to physical corruption. Now my query is - does it also clearly indicates successful completion of last RMAN backup also as I have seen in past in status 'completed ' in dynamic performance view 'v$rman_status' , but to my utter surprise, backup pieces are not there physically in backup location.
    Any inputs/advices will be highly appreciated.

    In response to : "but to my utter surprise, backup pieces are not there physically in backup location."
    It doesn't matter if you have "CHECK LOGICAL" or not added. A BACKUP VALIDATE does not produce backup sets -- meaning that it does not create backup pieces.
    Hemant K Chitale
    Edited by: Hemant K Chitale on Feb 28, 2013 10:36 AM
    Edited by: Hemant K Chitale on Feb 28, 2013 10:36 AM

Maybe you are looking for

  • Regarding a report

    hi all, i want my report in the following format. company name: company address: heading of the report: Emp id        Emp name      Emp address             Emp phone E001         ram                      Park street, Chennai.              765465646 E

  • Acrobat Reader 11.0.03 causes all programs to open in Reader

    I installed 11.0.03 update, and all my other computer programs are being forced to open in Acrobat Reader.  I had to uninstall Reader to be able to open my other programs.  Now I am without a pdf reader.  Any solutions?

  • Ask for debugging when customize authorization in the security extension sample of report server

    I have tried the sample of reporting service provide in MSDN http://msdn.microsoft.com/en-us/library/ms160724.aspx I successfully deploy the sample in my report server. But I want to know what happen in the authorization in order to authorize right t

  • Dynamic SQL an Form values in formatted Search

    Hi all, Can I create Dynamically the where clause of a query (for a Formatted Search) finding that into a UDF of another table, and then store all in a Varchar(300) variable and use that variable as parameter of an EXEC? Sorry for my bad explanation,

  • How to provide links to Table rows

    Hi I hava a scenario like this i will be displaying BAPI Data in the Table in web dynpro application in one view. if i click each line item (row) in the table. it will show the all the row values in a seperate view in PDF form format with Print optio