How to detect if a user has changed a record using a custom method?

I am in the process of developing a test case application using ADF JSF and a collection of Java objects that are not populated by a database.
Details of what I have developed so far can be found on this post:
how to create a new record using a custom method?
Is it possible to detect if a user has changed the value(s) of a record?
I have set the edit page up (as described in the other post) and this works fine, but how could I tell if the user has changed something on that record. This is what I would like to do, but am not sure how to achieve it or whether it is possible....
when the user puts a record in edit mode, take a copy of that record
then when the user presses save or exit to navigate away from the edit page do a comparison between the original values and the potentially changed ones
then depending on the outcome of the comparison call an appropriate action
Thanks in advance for your help
David

If you just want to know if the value has changed you can put it in a while loop and use shift registers to see if the value has changed.
Brian
Attachments:
Changed.vi ‏22 KB

Similar Messages

  • How to verify that the user has changed table row data before db update

    Hi all,
    Iam using Oracle ADF with EJBs.
    I have a single selection table that displays rows of data returned from a function of my data control.
    The columns of my table are editable so that the user can change the data. The user selects a row, changes the data in one or more columns of the row and saves the data by means of a submit button. The code in the submit button, identifies the row of the corresponding iterator that the user clicked on and updates the data in the database (using the 'mergeEntity' function of the EntityManager)
    Before saving the data, I want to put some logic to check whether the user has actually changed some data to avoid unnecessary updates in the database . But for this I need a technique to detect that the user has indeed changed some data in the table row.
    One technique I have been using so far was to isolate the iterator row of the table and then query the corresponding row in the database table and compare their values.
    Except from dummy, this technique is not efficient if the table contains many rows.
    Moreover, in my case I have observed that on successive updates on the same row , the query on the database returns the new values (user changed values) and not the actual values contained in the database table. This means that when the user updates an iterator row the cached data affect also the results of the SELECT statement from the actual database table!!! Isn't this strange ?
    Can somebody propose me a neat method to detect when the user has changed the the data of an iterator row ?

    Hey Alan,
    The below solution seems overly complicated to me and can not be implemented without a custom screen and/or the use of JavaScript. Also, if your main concern is that a user may accidentally loose all their data because they closed the browser window or the session times out before they hit the save button then this solution does not help you.
    There are a couple of simpler approaches you can take here:
    # If the use of JavaScript is permissible you can hook into the windows 'onUnload' event, and pop-up a message box which gives the user the opportunity to cancel closing the window and save their case if they haven't already.
    # Implement an autosave feature by hooking into one of events provided by web determinations. A simple (but rather naive) way of doing this would be to hook into the OnRenderScreenEvent and call save on the interview session every time the event fires. This guarantees that all the data the user has submitted will aways automatically be saved, thereby removing the need to make sure the user manually saves their data before closing the browser.
    Automatically making Web Determinations close a browser window has to be done using JavaScript. However, doing so means that a) it won't work for people who turn off JavaScript, which is commonly done for accessibility reasons b) you'll likely run afoul of the browser's security mechanism (they generally won't let you close a window that you didn't open and some really don't like you doing that at all).
    Thanks,
    Kristy

  • How to create a new record using a custom method?

    Hi I want to create Jdev 11 a new record using the contructor following in the footsteps of http://www.oracle.com/webapps/online-help/jdeveloper/10.1.3/state/content/navId.4/navSetId._/vtAnchor.CACCIJAG/vtTopicFile.adfdevguide%7Cweb_adv~htm/.
    My problem is the following.
    Messages for this page are listed below.
    Error
    JBO-29000: Unexpected exception caught: javax.ejb.EJBException, msg=java.lang.IllegalArgumentException: Object: null is not a known entity type.; nested exception is: java.lang.IllegalArgumentException: Object: null is not a known entity type.
    Error
    java.lang.IllegalArgumentException: Object: null is not a known entity type.; nested exception is: java.lang.IllegalArgumentException: Object: null is not a known entity type.
    Error
    Object: null is not a known entity type.
    Someone can help me?
    Cristian.

    Hello Frank, this tutorial make it and was successful but, what I am trying to do is add a new record in the table departments. The steps undertaken are suguientes
    drag over page the contructor department, with a submit, this will drag on the button, the method presistencia, set binding action with "$ (bindings.Departments.result)", and when running the application gives me the error
    Nov 2, 2007 10:06:22 PM oracle.adf.controller.faces.lifecycle.FacesPageLifecycle addMessage
    WARNING: ADFc: JBO-29000: Unexpected exception caught: javax.ejb.EJBException, msg=java.lang.IllegalArgumentException: Object: null is not a known entity type.; nested exception is: java.lang.IllegalArgumentException: Object: null is not a known entity type.
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: javax.ejb.EJBException, msg=java.lang.IllegalArgumentException: Object: null is not a known entity type.; nested exception is: java.lang.IllegalArgumentException: Object: null is not a known entity type.
    I need to know if what I am doing is right, because I followed the steps of the tutorials and it is not functioning the insertion of a new record.
    Thank you thank you.

  • Identify when a user has change value in USEREXIT_CHECK_VBAP before saving

    I originally posted and closed this question, but I am still struggling with the code.
    The req is now to also update the value of VBAP-LPRIO, so I now have to use the Exit : USEREXIT_CHECK_VBAP.
    The issue is that my solution must take into account when a user manually overwrites a value and not replace it with a value determined in the user exit.
    My problem is that the user might do the following
    1 - Create a sales order and enter a new item line, press enter
    2 - The user exit is triggered, and I check that XVBAP-UPDKZ = I  (user add a new line)
    3 - The user-exit determines the new value and populates the field
    4- the user then click on the item line, and then manually changes the value of VBAP-LPRIO
    5- The user-exit is triggered again, and because  XVBAP-UPDKZ = I , my code is triggered and updates the field.
    What I want is to identify that a user has manually changed the value and not overwritte the value.
    1 - I have check YVBAP and it is blank, as the user has not saved the sales order.
    2- The values of VBAP and XVBAP are the same..
    3 - I cannot re-read the database (KNVV) table as the user could have populate the value with the same value.
    What I need is how to identify when a user has made a change to a field before they save the sales item, as YVBAP is never filled.
    Previous post----
    Hello,
    I am writing a bit of code that will overwrite the payment terms in a sales order item based on a number of factors. (ship-to, incoterms, document type, etc)
    I am using the following program MV45AFZB at Exit : USEREXIT_CHECK_VBAP. I am using this exit as the users need to see the payment terms after an item has been entered into the sales order and not have the value determined at sales order save.
    I am not using USEREXIT_MOVE_FIELD_TO_VBAP as it is only triggered once at the time of creation and not when I change the document. I need it in USEREXIT_CHECK_VBAP as users could change the incoterms in VA02, so the code must be redetermined.
    My code is working as expected, however, I have a problem when a user enters a sales order item line and then manually changes the payment terms, as my code then is over writes the users values.
    The flow is as follows
    As user creates a sales order
    They populate the sales order header
    They populate material number and qty
    User exit USEREXIT_CHECK_VBAP is triggered and correctly determines the payment terms
    The user then double clicks on the sales order item and decides to overwrite the payment terms.
    My user-exit is retriggered and check to see if XVBAP-UPDKZ = I (insert)
    As it is still an insert, my code triggers.
    I have tried to check YVBAP, but no entry exist as it stills is seen as in insert? What I really need to know that while it is still an insert, the user has change the field value and my code should not over write the users value.

    When do you need to update LPRIO ? When user makes the change at the Payment terms on line item?
    Regards,
    Naimesh Patel

  • Another user has changed the row with primary key -Table changed externally

    Hello,
    I am facing the error: "Another user has changed the row with primary key oracle.jbo.Key[94 ]." during the delete operation.
    User case scenario:
    1. Added new row in the table.
    2. Once new row is added to the the table, another application will update few columns in the newly added row based on some logic.
    3. On the same session I am trying to delete the newly added row and getting above mentioned error.
    I have added a "Button" in the table to partialRefresh the table to check the new values of the changed columns.
    I have checked the forum and found many similar errors and tried the following but nothing helped.
    1. By setting "Auto Refresh = True" for the view object.
    Issue faced-> It worked fine but after few add and remove my db is getting to inconsistent state after which, I am not able to do any add/delete from my page.
    Error: "Too many objects match the primary key oracle.jbo.Key". I have checked this and I am not getting this error when "Auto Refresh = False" even after multiple add and remove actions.
    2. By Setting "Auto Refresh" the iterator associated with the page.
    Issue -> Did not work at all.
    Looking forward inputs from gurus.
    Thanks
    Abhijeet

    Finally I found one solution to this problem at: [ http://www.avromroyfaderman.com/2008/05/bring-back-the-hobgoblin-dealing-with-rowinconsistentexception/|http://www.avromroyfaderman.com/2008/05/bring-back-the-hobgoblin-dealing-with-rowinconsistentexception/]
    Simply overriding the lock() method in the entity object resolved issue. Kudos to the author.
    Code:
    public void lock() {
    try {
    super.lock();
    } catch (RowInconsistentException e) {
    refresh(REFRESH_WITH_DB_ONLY_IF_UNCHANGED | REFRESH_CONTAINEES);
    super.lock();
    But, Now my refresh button is not working as depend on the "Auto Refresh = True" to update the table.
    Can anyone tell me how can I refresh the VO of my table from the button.
    Thanks
    Abhijeet.
    P.S: I have already added the partial trigger but it is work not working as the data is cached in the VO. Removing the Cached property for the VO is creating other problems.

  • How to check if the user has only the display authority of a message

    hi,
    How to check if the user has only the display authority of a message but does not have the change authority for a certain message?
    Best regards,

    hi blake
    though i am an application consultant and for authorisation u need to have help of BASIS person if u r not the one but still i can guide u regarding the same,
    Basically Authorization Management 
    Use
    You can use the following authorization objects to control the authorizations for maintaining business partner data:
    •        Authorization objects for the Business Partner:
    •             B_BUPA_GRP
    •             B_BUPA_ATT
    •             B_BUPA_FDG
    •             B_BUPA_RLT•       
    Authorization objects for relationships:
    •             B_BUPR_BZT
    •             B_BUPR_FDG
    In addition, you can assign an authorization group to a business partner in the dialog. The authorization group controls which users may maintain data for this business partner.
    You can also define authorizations for fields and field groups using the Business Data Toolset (BDT). Depending on the settings you have made, the system carries out the relevant authorization checks.
    In the dialog in the SAP GUI, you can display an overview of the authorizations assigned to you by pressing the button Settings.
    For more information on authorization management, see the Implementation Guide (IMG) of the Business Partner, as well as in the Developer’s Handbook for the BDT under  Authorizations.
    IntegrationAuthorization management for the Business Partner forms part of the  SAP authorization concept.
    Prerequisites
    You have made the necessary settings in Customizing of the Business Partner under Basic Settings--> -Address Management.
    Moving over
    AS ABAP Authorization Concept 
    The ABAP authorization concept protects transactions, programs, and services in SAP systems from unauthorized access. On the basis of the authorization concept, the administrator assigns authorizations to the users that determine which actions a user can execute in the SAP system, after he or she has logged on to the system and authenticated himself or herself.
    To access business objects or execute SAP transactions, a user requires corresponding authorizations, as business objects or transactions are protected by authorization objects. The authorizations represent instances of generic authorization objects and are defined depending on the activity and responsibilities of the employee. The authorizations are combined in an authorization profile that is associated with a role. The user administrators then assign the corresponding roles using the user master record, so that the user can use the appropriate transactions for his or her tasks.
    Authorization Checks 
    To ensure that a user has the appropriate authorizations when he or she performs an action, users are subject to authorization checks.
    The following actions are subject to authorization checks that are performed before the start of a program or table maintenance and which the SAP applications cannot avoid:
    •        Starting SAP transactions (authorization object S_TCODE)
    •        Starting reports (authorization object S_PROGRAM)
    •        Calling RFC function modules (authorization object S_RFC)
    •        Table maintenance with generic tools (S_TABU_DIS)
    Checking at Program Level with AUTHORITY-CHECK
    Applications use the ABAP statement AUTHORITY-CHECK, which is inserted in the source code of the program, to check whether users have the appropriate authorization and whether these authorizations are suitably defined; that is, whether the user administrator has assigned the values required for the fields by the programmer. In this way, you can also protect transactions that are called indirectly by other programs.
    AUTHORITY-CHECK searches profiles specified in the user master record to see whether the user has authorization for the authorization object specified in the AUTHORITY-CHECK. If one of the authorizations found matches the required values, the check is successful.
    Starting SAP Transactions
    When a user starts a transaction, the system performs the following checks:
    •        The system checks in table TSTC whether the transaction code is valid and whether the system administrator has locked the transaction.
    •        The system then checks whether the user has authorization to start the transaction.
    The SAP system performs the authorization checks every time a user starts a transaction from the menu or by entering a command. Indirectly called transactions are not included in this authorization check. For more complex transactions, which call other transactions, there are additional authorization checks.
    •             The authorization object S_TCODE (transaction start) contains the field TCD (transaction code). The user must have an authorization with a value for the selected transaction code.
    •             If an additional authorization is entered using transaction SE93 for the transaction to be started, the user also requires the suitable defined authorization object (TSTA, table TSTCA).
    If you create a transaction in transaction SE93, you can assign an additional authorization to this transaction. This is useful, if you want to be able to protect a transaction with a separate authorization. If this is not the case, you should consider using other methods to protect the transaction (such as AUTHORITY-CHECK at program level).
    •        The system checks whether the transaction code is assigned an authorization object. If so, a check is made that the user has authorization for this authorization object.
    The check is not performed in the following cases:
    You have deactivated the check of the authorization objects for the transaction (with transaction SU24) using check indicators, that is, you have removed an authorization object entered using transaction SE93. You cannot deactivate the check for objects from the SAP NetWeaver and HR areas.
    This can be useful, as a large number of authorization objects are often checked when transactions are executed, since the transaction calls other work areas in the background. In order for these checks to be executed successfully, the user in question must have the appropriate authorizations. This results in some users having more authorization than they strictly need. It also leads to an increased maintenance workload. You can therefore deactivate authorization checks of this type in a targeted manner using transaction SU24.
    •             You have globally deactivated authorization objects for all transactions with transaction SU24 or transaction SU25.
    •             So that the entries that you have made with transactions SU24 and SU25 become effective, you must set the profile parameter AUTH/NO_CHECK_IN_SOME_CASES to “Y” (using transaction RZ10).
    All of the above checks must be successful so that the user can start the transaction. Otherwise, the transaction is not called and the system displays an appropriate message.
    Starting Report Classes
    You can perform additional authorization checks by assigning reports to authorization classes (using report RSCSAUTH). You can, for example, assign all PA* reports to an authorization class for PA (such as PAxxx). If a user wants to start a PA report, he or she requires the appropriate authorization to execute reports in this class.
    We do not deliver any predefined report classes. You must decide yourself which reports you want to protect in this way. You can also enter the authorization classes for reports with the maintenance functions for report trees. This method provides a hierarchical approach for assigning authorizations for reports. You can, for example, assign an authorization class to a report node, meaning that all reports at this node automatically belong to this class. This means that you have a more transparent overview of the authorization classes to which the various reports are transported.
    You must consider the following:
    •     •         After you have assigned reports to authorization classes or have changed assignments, you may have to adjust objects in your authorization concept (such as roles (activity groups), profiles, or user master records).
    •     •         There are certain system reports that you cannot assign to any authorization class. These include:
    •     •         RSRZLLG0
    •     •         STARTMEN (as of SAP R/3 4.0)
    •     •         Reports that are called using SUBMIT in a customer exit at logon (such as SUSR0001, ZXUSRU01).
    •     •         Authorization assignments for reports are overwritten during an upgrade. After an upgrade, you must therefore restore your customer-specific report authorizations.
    Calling RFC Function Modules
    When RFC function modules are called by an RFC client program or another system, an authorization check is performed for the authorization object S_RFC in the called system. This check uses the name of the function group to which the function module belongs. You can deactivate this check with parameter auth/rfc_authority_check.
    Checking Assignment of Authorization Groups to Tables
    You can also assign authorization groups to tables to avoid users accessing tables using general access tools (such as transaction SE16). A user requires not only authorization to execute the tool, but must also have authorization to be permitted to access tables with the relevant group assignments. For this case, we deliver tables with predefined assignments to authorization groups. The assignments are defined in table TDDAT; the checked authorization object is S_TABU_DIS.
    You can assign a table to authorization group Z000. (Use transaction SM30 for table TDDAT) A user that wants to access this table must have authorization object S_TABU_DIS in his or her profile with the value Z000 in the field DICBERCLS (authorization group for ABAP Dictionary objects).
    please See also:
    •        SAP Notes 7642, 20534, 23342, 33154, and 67766
    guess this info will help you,there is one graphic which actually explain the hierarchy of authorisation,i will find some time out to let u know more info about the authorisation
    but if u sit with ur BASIS guy then u can learn lot of things in PFCG
    i guess u r a basis guy,then its not a problem
    best regards
    ashish

  • JBO-25014: Another user has changed .... can I change myViewRowImpl.java???

    Hi all,
    I'm noob working with jDeveloper and ADF and i'm finding a lot of problems building my application. The first one: "JBO-25014: Another user has changed .."
    I have been reading a lot about this problem and its different causes but seems that nothing helps me so i'm gonna tell you my problem and i hope that someone know how to solve it.
    My page shows a table and below it the details of each row selected in the table in read only mode.
    The table shows fields from a table in database and other fields with information not located in database (CMS). To build it i used the wizard to create a bussines component from a table . After i added the properties that are not located in database to the view and entity object.
    I generated java code for the view (myViewImpl.java & myViewRowImpl.java) and for the aplicacion module (myAmImpl.java) and in java class for the application module I overwrote some methods (findViewObject & getViewObjects) to add the source code needed to get data from CMS and add it to the data obtained from database.
    That works perfecly!
    Now, I wrote a new method in myViewImpl.java which get data from details form and update table in database (moreover other task: send mail, sms....). This method is executed with a command button. Method commits transaction after each operation. Again this works perfectly!
    The problem comes when i try to refresh the table with the new data after update. I tried different solutions:
    - Option 1: Clear cache after commit. Problem: When table is reloaded I'm losing data obteined from CMS and also this process is too heavy, i would like to avoid to go to CMS to reload whole table with every update of a row.
    - Option 2: Set new values directly in object myViewRowImpl.java. That could be the perfect solution, after every update i just inform the row object with the new values. The problem is that when i try to commit the transaction I'm getting a JBO-25014. If I set the new values before commit, the errors comes in this commit, if i set the values after the commit, the error comes in the next row to be updated.
    Any idea of how to avoid the problem in option 2????
    Other general sugestion????
    Thanks in advance!!
    Curro.
    PD: Sorry for my poor english

    Hi,
    Using ADF BC, the default locking behavior is set to pessimistic. Check the ApplicationModule configuration (right mouse click the AM and choose "configuration") and change the locking property to optimistic.
    Also you need to set the EO attributes to refresh after insert and/or refresh after update.
    ~Abhijit

  • Another user has changed the row with primary key oracle.jbo.Key

    Oracle Jdeveloper 11.1.2.1
    ADFbc + JSF
    I have a Page ( Purchase Order Status) (which show all PO to be approved) from this page (page1) the Supervison can call Regular PO (Page2) and change whatever he needs to change. (products, quantities, discounts,warehouse...)
    then on Page2 he invoke (commit) after his changes and return to page1, when supervisor change the status to Approved on page1. I get this Error (Another user has changed the row with primary key oracle.jbo.Key[#]).
    for sure there are no another user changing this PO.
    both page are based on same Entity Object (PO) , how can I solve this Issue? thank you

    hi,
    This occur due to pessimistic locking mode for ApplicationModule ,alter to optimistic and check following sample to get knowledge about locking mode.
    http://andrejusb.blogspot.com/2010/03/optimistic-and-pessimistic-locking-in.html-Suersh

  • Another user has changed the row with primary key exception

    Hi Experts,
    I have a method in AmImpl.java. I am calling this method from my bean. The method opens a JDBC connection(i know it is not a good approach, we should use AM instance, but this was the last option as had tried all) and updates a table in the database. I want the data to be refreshed on screen after update is performed. So, I am doing VO.executeQuery() after i commit the data in the database and that is when i get the exception "Another user has changed the row with primary key exception".
    Can you please tell me how to get rid of this error or any other way of doing the above process?

    I have a screen divided into two parts, i have used a Panel splitter for that. Each pane has a table. Say i edit a record in table 1 and on the basis of changing a flag, the record should move out of table 1 and should go to table 2 in the second pane. the records in table 1 have some priorities defined by the end user, so if a record moves out or is reordered within that table, the rest of the records' priority number also changes. I have achieved all this. Now, when I apply a filter on the table, the record set gets filtered and contains limited set of rows. Now, when i try to achieve the two processes i have mentioned above (moving out or reordering), I need to have a control over the entire rowset because i need to alter the priority numbers accordingly but the VO iterator contains only the filtered set of rows even if I do VO.executeQuery. I was not able to get the entire rowset, so thats when i decided to use JDBC and i am able to successfully update the database. Then after the update, i need to refresh the table on the screen, so I did Vo.executeQuery in the bean after the method was called and I encountered this error. Then, I removed this Vo refresh from the bean and did this.getVO.executeQuery in the AmImpl method, after i commit changes in the database, it was working fine for few days but now it has started flashing the exception "Another user has changed the row with primary key exception".

  • SPEL? make REASON field required if user has changed the value in SALARY

    I have a requirement to make REASON field required if user has changed the value in SALARY field. Is it possible using spel? what are my options?

    Karan,
    You can change the Rendered Property through personalization.
    But in your requirement you need to attach the Spell through personalization & extend the existing CO to set the value of the SPELL based upon the condition.
    Note - Refer this thread http://forums.oracle.com/forums/thread.jspa?threadID=2176729&tstart=0. If you have worked on SSHRParams kindly help the user.
    Regards,
    Gyan

  • JBO-25014: Another user has changed the row with primary key oracle.jbo.Key

    Hi,
    I am developing a Fusion Web Application using Jdeveloper 11.1.2.1.0. I have a home.jspx page that has a ADF table built on efttBilling View Object. . When you click on one of the rows in the table, it will take you to detail.jspx where you can edit the row and save. When 'save' is clicked, stored procedures are executed to update/insert rows into few tables , and then go back to home.jspx where you need to see updated content for that row.
    To get down to the exact issue, updates are made to the tables on which the efttBilling View Object is built using a stored procedure. Once this is done, I am trying to requery view object to see new content. But I keep getting JBO-25014: Another user has changed the row with primary key oracle.jbo.Key error. Following are the approaches I followed to query new results:
    a. Executed Application Modules Commit Method. Created 'Commit' Action binding and tied it to homePageDef.xml. Called this binding from a view scope bean.
        BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
         OperationBinding operationBinding = bindings.getOperationBinding("Commit");
        Object result = operationBinding.execute();
       if (!operationBinding.getErrors().isEmpty())
        return null;
    b. Marked 'Refresh on Insert' , 'Refresh on Update', 'Change Indicator' checkboxes for all the attributes in the entities associated with efttBilling View Object.
    c. Tried to Requery View Object. Created a refreshViewObject method in Application Module Impl.java file, exposed this method to the client interface and created a invokeMethod Action binding in home.jspx
    Code in Application Module:
      public void refresheftTransactionsforBillingAccountViewObj1View()
        System.out.println("In eftTransactionsforBillingAccountViewObj1");
      findViewObject("eftTransactionsforBillingAccountViewObj1").executeQuery();
    Code in view scope bean
            DCBindingContainer bindings =
           (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
            OperationBinding operation =
            bindings.getOperationBinding("refresheftTransactionsforBillingAccountViewObj1View");
            operation.execute();
    I have searched web, ADF forums and tried methods suggested in there but no sucess.
    Could anyone please provide some insight in this issue. I have been battling with this since quite some time. I can provide you with the log file too.
    Thanks!
    Shai.

    What code does your Commit method have .. can you try using the Commit executable from the AM itself instead ?
    Also -
    Shai wrote:
    'Change Indicator' checkboxes for all the attributes in the entities associated with efttBilling View Object.
    which all attributes you set this property for . it should just be for History columns as such.
    Did you also check if this could be your scenario ?
    Decompiling ADF Binaries: Yet another reason for "JBO-25014: Another user has changed the row with primary key orac…
    OR
    JBO-25014: Another user has changed the row with primary key oracle.jbo.Key
    OR
    Another user has changed the row with primary key -Table changed externally
    Message was edited by: SudiptoDesmukh

  • How to check if the user has log in when he log in again?

    Hi all,
    I was wondering how to track if the user has already log in?
    When this user using browser A to log in then he try to log in using a new browser, then hw I am I going to know that, and terminate his session?

    Hello!
    You can try this code if you want that if a user is login at a machine and tries to login from the other, then he can continue his processing at second machine ('cos it will get the high priority) but can not process from the first machine. This code allows to login but only second one will be active.
    <jsp:useBean id="monitor1" scope="application" class="java.util.HashMap"/>
    if(monitor1.containsKey(num)){
    HttpSession oldSession = (HttpSession) monitor1.get(num);
    oldSession.invalidate();
    monitor1.remove(num);
    monitor1.put(num , session);
    But if you want to restrict it at the time of second login then u can use any of the techniques discussed above.
    aNTUMNIHA

  • JBO-25014 : Another user has changed ....

    Hi
    This is something strange in my application, let me explain:
    I have an entity object (let's say Entity1) and two view objects created from Entity1
    (let say View1 & View2). View1 & View2 are defined exactly the same except
    each one is a detail(child) of another view object.
    The problem on view1 is : when i try to update or delete the same row that just added
    will receive JBO-25014 : Another user has changed the row with primary key oracle.jbo.key[....]
    Note: that work perfect on my development pc when run the application via JDeveloper,
    but this error comes when call the application on web server via browser (real life).
    Also the other view (view2) that i mentioned above works perfect either via
    JDev or via browser. And also i made sure that followed all the suggestions
    made by documention ( 1-frequently used executeQuery 2-Refresh after insert/update is checked 3-nobody else
    work with the application except me at testing time).
    Would appreciated to share me any idea comes in your mind.
    Thanks...Ali

    Ali:
    The most common reasons for this error are the following:
    1. Someone else really did change the row. This doesn't appear to be the case in your scenario.
    2. Some attributes in your row are of Java class whose implementation of equals() is incorrect.
    Let me explain #2 a bit further. When you update/delete a row, we lock the row in DB and then bring in the latest values to see if another user had changed the row since this user read the row.
    To compare the value in cache with that from db, we call equals() method. If equals() method returns false when in fact the two attrs are really equal, you could get this error unexpectedly.
    So, I would suggest checking attribute types to see if there are some 'estoeric' attr types and see if the equals() method is misbehaving.
    Thanks.
    Sung

  • JBO-25014: Another user has changed the row with primary key...

    Hello,
    could you help me please with resolving this error "JBO-25014: Another user has changed the row with primary key..." - I am just getting a row from a view by bind "filter" variable, then I am assigning new values for some of the attributes - and trying to commit ..unsuccessfully..
    View is based on Entity.
    I saw directive for setting Entity's attributes as "update after insert / update" - but this did not help me.
    Thanks in advance.

    Hi
    Please try this solutions:
    One solution is to change the ADF BC locking behavior to optimistic instead of pessimistic. Choose the AM and click the Configuration context menu option. Select the LocalAM entry and go to the Properties. Scroll down to the locking setting and change the existing entry
    If there is a trigger changing values, you need to mark those attributes (the ones that may be changed) as refresh after insert and/or refresh after update in your Entity Object.

  • Error on commit: Another user has changed the row with primary key : Rec_10

    i am using jdev 11g R2
    i implemented a master form and two detail tables on a jspx page
    added createInsert, commit and rollback buttons
    actions from these buttons all are executed from a bean
    for entity attributes: refresh after insert and update are marked as checked
    i am using login page for authorizing the user by getting the user information from user table
    and then using the userid i am applying the setVisible property on some components at bean code
    when i am inserting a new row there is no problem, here i am generating the new id like 'Rec_10', using a database sequence
    but when i am trying to update a current record, it is showing the error --> Error on commit: JBO-25014: Another user has changed the row with primary key oracle.jbo.Key[Rec_22 ]
    on clicking the commit button and also it is not updating the record on database
    Thanx in Advance
    kumar
    Edited by: user10922309 on Nov 18, 2009 3:25 AM
    Edited by: user10922309 on Nov 18, 2009 4:28 AM

    Hi John
    thnq for your quick responce.
    here are the attribute details:
    Attribute Name: RecID, Type: String, Value Type: Expression, Value: 'Rec_' + (new oracle.jbo.server.SequenceImpl("Rec_SEQ_AN", object.getDBTransaction())).getSequenceNumber()
    Updatable: While New and Primary Key, Queryable, Persistent, Mandatory, Refresh After: Update, Refresh After: Update and Insert are markded as checked
    error details:
    oracle.jbo.RowInconsistentException: JBO-25014: Another user has changed the row with primary key oracle.jbo.Key[APP_22 ].
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelectForAltKey(OracleSQLBuilderImpl.java:1062)
         at oracle.jbo.server.BaseSQLBuilderImpl.doEntitySelect(BaseSQLBuilderImpl.java:548)
         at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:7762)
         at oracle.jbo.server.EntityImpl.lock(EntityImpl.java:5554)
         at oracle.jbo.server.EntityImpl.beforePost(EntityImpl.java:6057)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:6229)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:3127)
         at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:2935)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:1991)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:2233)
         at oracle.adf.model.bc4j.DCJboDataControl.commitTransaction(DCJboDataControl.java:1580)
         at oracle.adf.model.binding.DCDataControl.callCommitTransaction(DCDataControl.java:1404)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1289)
         at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2120)
         at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:693)
         at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:394)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:217)
         at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:201)
    --> at Index.saveApplicationAll(Index.java:6246)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(AstValue.java:157)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcastToMethodBinding(UIXComponentBase.java:1245)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:183)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:673)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:273)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:165)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:85)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:54)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.wls.JpsWlsFilter$1.run(JpsWlsFilter.java:96)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.wls.util.JpsWlsUtil.runJaasMode(JpsWlsUtil.java:146)
         at oracle.security.jps.wls.JpsWlsFilter.doFilter(JpsWlsFilter.java:140)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:202)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3588)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2200)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2106)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1428)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    --> on click commit button Index.saveApplicationAll method will invoked.
    Thats it.
    Kumar
    Edited by: user10922309 on Nov 18, 2009 4:32 AM

Maybe you are looking for

  • Photoshop CS5 crashes when using certain function

    Hi, I have just downloaded the trial version of Adobe CS5 and it appears to crash when you use specific tools.  Particularly the program crashes when I try to perform a photomerge or view System Info.  There is no exact error message except a generic

  • Issue with inbound xml..

    Hi All, We have an issue with inbound XML : XML structure is as follows: <?xml version="1.0" encoding="UTF-8" ?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">    

  • Pitft touchscreen support for raspberry pi

    HI I am just a beginner who wants to have touch screen support for the raspberry pi. Also can you give me a simple way of activating it? Thanks

  • What is "other" and why is it taking all my phones memory?

    I have only used 1gb of my phones memory, but theres this "other" thats taking up more than 4.5gb of my storage. I have backed my phone up to icloud, deleted my recent calls, all my messages, all my music, my safaris data & cookies, anything I can th

  • Apex working ...but very strange thing happening

    hi, My forms is working ok in apex. I am able to click button and generate new id and save the record,i can see the new id in the table in the db .But the problem is when i checked the same record using oracle forms 6i ,i was able to search the recor