Prevent several editing sessions

I built an ad campaign, management tool with Coldfusion and mySQL that allows multiple users in various locations to monitor, modify and communicate advertisements that are scheduled for publication as part of a campaign. Recently, it came to my attention (duh!) that it is important to prevent multiple users open the same ad for editing. I could use CFLOCK on my INSERT or SELECT statements, but I think I might rather CFLOCATION to a page explaining that another user already has the announcement open for editing. I thought a lot variables scope application configuration each time a table row Announces gets opened for editing, then tests for this variable and delivering a message informing the user that the record is already changed. Am that I on the right track here? Or am I missing something obvious?

I considered the possibility for a user to open an announcement to modify, and then never submit or otherwise close the session, but a timeout on the application variable could handle this, couldn't it?

I built of many CMS and dynamic sites, but it's one with a realistic possibility of multiple concurrent administrative connections. Any help is very appreciated.

Max

Add a column named "edit_lock" at this table, by default it 0. Add a column named "last_edited".

When a user requests to edit any file, check if the value is 0. If this is the case, then update 1, update LAST_EDITED to #now () # and allow the user to edit the record. Add ID of record in a table that is stored in the application scope. When the user submits a change, update the record (UPDATE someTable SET foo = "wibble", EDIT_LOCK = 0 WHERE ID = #x # and EDIT_LOCK = 1), set the value of blocking to 0 and remove this element from the application variable.

Case 1:
UserA modifies a record.
UserB attempts to edit the same record.
UserB Gets a message that the record is being updated by another user.
The user submitted the update.
UserB attempts to edit the same record.
UserB modifies registration, see changes made by UserA.

Case 2:
UserA modifies a record.
UserB attempts to edit the same record.
UserB Gets a message that the record is being updated by another user.
UserA will lunch without submitting any changes.

Programmer has installed a scheduled task to check the table of database changes are not complete. It finds all records where the ID is in the application variable & EDIT_LOCK = 1 and the difference between LAST_EDIT and now() is greater than the session timeout value. Update the records of EDIT_LOCK = 0.

UserB attempts to edit the same record and finally is allowed to access it from the user's session has expired...
Wear back from lunch and clicks "submit" on its always open edit form.

UserA should having been expelled by the application by searching for an active session before dealing with anything else.
Just in case where, given that EDIT_LOCK will have been reset to 0, the UPDATE statement will always fail because its WHERE clause putting only updated records where EDIT_LOCK = 1.

Case 3:
UserA modifies a record.
UserB attempts to edit the same record.
UserB Gets a message that the record is being updated by another user.
UserA will lunch without submitting any changes.
UserB will use the catch on the door and told him: "Hey I need to update this record.
UserA goes back to his office and click on 'Cancel', who, rather than return to the record list page, he starts moving towards a page of cancel_edit.cfm? recordID = X, so EDIT_LOCK for this record can be deleted. (If UserA always click 'Cancel' is a matter of training.)

In addition, you can also create an Admin section where someone can replace all current changes by affecting to the EDIT_LOCK 0 at any time.

Tags: ColdFusion

Similar Questions

  • I HAV been trying to update my expiration date of credit card for 3 months.  When I go to lelien for "Update payment Details" and edit the expiration date and < click > save, I get an error saying my address in invalid.  I have several chat sessions

    Can someone please help...  Suggestions, how can I overcome this problem, in which case my Adobe Creative cloud subscription will expire today due to and credit card.

    I tried to update my expiration date of credit card for 3 months.  When I go to the "Update payment Details" link and change the expiry date then < click > save, I get an error saying my invalid address.  I had several chat sessions with support, called support and logged a ticket with support and every time they tell me to go to a particular link to update my contact information.  I do and I get the same error...   "My coordinates are not valid."  Now I'm in the position where my creative cloud membership will expire today everything simply because the Adobe address validation do not think that my address is valid.

    I got 'Cat' sessions with the support,

    I made a phone call to the support and

    I logged a ticket with support.  I'm really trying to pay my subscription.  Support ticket No. 0216009991

    Whenever I have contact the support they gave me a link to the site where I supposedly can I enter my credit card details.

    Whenever I went on the link provided, I'd get the same error.  "My coordinates are not valid."

    What I checked on my address.

    1. I look out the window and the view I get is the same as it was yesterday and the day, and in fact several years ago.

    2. I go out in the street, Yes, the street sign says the name of my street

    3. I go to my mailbox and it does not say the number of my mailing address

    4. yes I get the email to the address registered with Adobe

    5. yes I received the email from adobe delivered to the address

    6. I get the address of Google, yes I can find it on Google

    7. I converted to use the satellite view Google maps

    8. Yes, it's my house, with the 12 solar panels on the roof

    9. Yes, that's my black car in the driveway

    10. I check my reviews for my address Board rate, Yes, this is the address that I recorded with Adobe

    11. Yes, I had this same address registered at Adobe for the past 3 years.  So far I have not had a problem with my address

    12. I work with a software company that actually uses the address of Google, under license validation, built-in in their application.  I used this software to check to see if my address is recognized as valid.  You guessed it is recognized as valid.

    I did check my credit card

    12. Yes, I have, every time checked the status of my credit card with the Bank

    a. the card is valid

    b. the card's not over it's credit limit

    c. the card is not due

    d. the address registered to my credit card with the Bank is the same address that I recorded with Adobe

    Since the last link Adobe support gave me two weeks ago, to change my credit card details, I was able to key a new credit card in the fields (Yes it's good that I was forced to get a new credit card only for Adobe!   If I am that everything would be fine.

    But wait...   The details I provided this link have not been updated on the Adobe site.  (So I check the link... I was scammed to get my card number?)

    After investigation of the link, I'm fairly confident of the link provided is a true link to Adobe.  www.adobe.com/go/Secure

    Did anyone else had this type of problem when you try to update the expiration date of a credit card?

    The question is about to have an impact on my ability to process pictures for my photography business, it affects my ability to earn an income.

    So you could say I'm getting angry some of the stuffing!

    In summary...  I knew that my credit card had a new expiration date and I tried to update the expiration 3 months 3 months.

    Simply because the use of the validation of addresses, Adobe, has a few flaws, I was not able to update this information.  So Adobe today will stop my subscription.

    As I said in previous support tickets, chat sessions and telephone.  I'll be more disappointed if I am prevented from using software and Adobe cloud features.

    It is copied from an email I received during the night from Adobe...

    Continue to create with us

    Hi Thomas,

    Your Creative cloud membership will expire on August 23, 2015 (PT). We hope that you have been getting the best out of all that creative cloud has to offer. To extend your subscription, please update the billing for your account information, or add a prepaid card.

    Update your billing information (there is a link to where I can update the expiry date) pocztek sigh...   I still get the same error telling me that my address is not valid!

    Thank you for being a part of the creative cloud,

    The creative team Cloud

    Good creative team...  I REALLY WANT TO STAY IN THE TEAM, AS YOU CAN SEE FROM THE FOREGOING, THAT I REALLY TRIED TO SOLVE THIS PROBLEM SEVERAL TIMES OVER THE PAST 3 MONTHS.

    I tried to include as much information as possible in what I said earlier, I expressed in a way that will hopefully provide a little humor, but at the same time to portray the frustration I'm feeling right now.

    Honestly, I don't know what more I can do.  It seems that I have no other recourse start litigation for loss of income coming from Adobe address Validation errors.  There is a real chance that I will be litigated against because I won't be able to complete contracts.

    There must be a healthier solution of mind that court proceedings.

    Kind regards

    Thomas Croll

    (Tom)

    Tom, let me some time. I I will get these verified case and will contact you.

  • How to make a link to send to my website for an elegant form fillable and electronic for several signing sessions and downloads from our Web site?

    How to make a link to send to my website for an elegant form fillable and electronic for several signing sessions and downloads from our Web site?

    Hi stacey1246,

    You can create an interactive PDF form & publish it on your website interactive Edition PDF web forms. Use the same to collect data of forms using Adobe Acrobat and form on the web.

    Kind regards
    Nicos

  • For some reason that I do not see the developer at the bottom of the page links (Page Edit, Session, debug, etc.) How can I fix? Request Express 4.2.2.00.11

    For some reason that I do not see the developer at the bottom of the page links (Page Edit, Session, debug, etc.) How can I fix? Request Express 4.2.2.00.11

    I hope someone could help me!

    Thank you

    -Fury

    It could be caused by a known bug...

    Oracle Application Express 4.2.2 - known issues

    See: 16769040

    Concerning

  • Several alter session and SQL * Net message from dblink in APEX

    Hello

    I have Apex 4.2.3 and I use Glassfish more listener of the Apex.

    Database is 11.2.0.4 under linux

    Looking for the session active database, I see that apex run several alter session with a lot of expectation as SQL * Net message from dblink the.

    Ex:

    ALTER session set NLS_TERRITORY = "AMERICA."

    call the query of disc elapsed to cpu count current lines

    ------- ------  -------- ---------- ---------- ---------- ----------  ----------

    Parse 58 0.00 0.00 0 0 0 0

    Run 58 0.06 3.53 267 58 0 0

    Fetch        0      0.00       0.00          0          0          0           0

    ------- ------  -------- ---------- ---------- ---------- ----------  ----------

    Total 116 0.06 3.53 267 58 0 0

    Chess in the library during parsing cache: 0

    The analysis of the user id: 277 (recursive depth: 1).

    Elapsed time are waiting on the following events:

    Event waited on times max wait for the Total WHEREAS

    ----------------------------------------   Waited  ----------  ------------

    SQL * Net message to dblink 174 0.00 0.00

    SQL * Net message from dblink 174 3.47 0.03

    ********************************************************************************


    Why he is doing a lot to change session? Why the wait is SQL * Net message from dblink the?

    We have recently to load a new language, but I'm not sure that this is the main problem.



    I think that you have the link db in the workspace schema and data requested by the Apex of this link. For example, it may be

    report which uses db link. Check dba_db_links or user_db_links for the existing links. Check if this link used by Apex.

  • How come back initially on an editing session without closing the entire program and start again?

    How come back initially on an editing session without closing the entire program and start again?

    Hello

    There are two answers to this. If you have not saved the image since the opening, you can restore the file Menu-Revert or F12 and that will bring back you at the beginning. A more elegant solution is the historical Panel.

    Photoshop has a history panel (Windows Menu-history) that keeps track of everything you do on an image and allows you to go back in the flow of work and in effect then go ahead if you change your mind. The original image is always registered as a snapshot and then subsequent action recording. So you can come back not only the original image, but any previous change after opening. You can even take your own snapshots which is a useful feature.

    Hope that helps

    Terri

  • prevent an editable region once in British Colombia.

    Hi all, so once a site is published in British Colombia (because I'm a premium partner) how to prevent the change on the regions?... (like the logo of the company for example)

    is it possible to Muse or to change the html code of BC'editor (or another text editor) and remove the ' here: editable "in all regions, we do not want to be editable?

    hope to hear from you guys soon.

    YD.

    Hi Yd,

    You are right when you say you want to change the HTML of BC admin code to disable the ice for desired regions. This post on the forum will give you detailed information on this: http://forums.adobe.com/docs/DOC-1807#main_Restricting_editing_capabilities_on_specific_pa GHG

    See you soon!

    Aish

  • Find several riding session and County

    Hello:

    How can you find all/many sessions overlapping and its counts? For example, lets say you have an overlap_session table with cus_id, session_start_tmstp, session_end_tmstp with the data as follows:

    There could be several session that overlap in 1 session etc.

    CUST_ID SESSION_START_TMSTP SESSION_END_TMSTP

    000000001 04/01/2010 09:36:43 04/01/2010 19:42:37
    000000001 04/01/2010 09:42 04/01/2010 10:42
    000000001 04/01/2010 13:17:58 04/01/2010 15:05:39
    000000001 04/01/2010 15:48:40 04/01/2010 19:06:50
    000000001 04/01/2010 18:42:21 04/01/2010 22:10:35
    000000001 04/01/2010 21:15:27 04/01/2010 23:27:03
    000000001 04/01/2010 22:30:27 04/01/2010 23:15:03

    Expected results:

    CUS_ID SESSION_START_TM SESSION_END_TM NUM_SESSIONS
    000000001 04/01/2010 09:42 04/01/2010 10:42 2
    000000001 04/01/2010 13:17:58 01/04/2010 15:05:39 2
    000000001 04/01/2010 15:48:40 01/04/2010 18:42:20 2
    000000001 04/01/2010 18:42:21 01/04/2010 19:06:50 3
    000000001 04/01/2010 21:15:27 01/04/2010 22:10:35 2
    000000001 04/01/2010 22:30:27 01/04/2010 23:15:03 2

    So why not closw the wire by the marker as a response.
    Saves a lot of time for other volunteers.

    G.

  • Shopping cart - preventing same ref session being reused after an order?

    Whenever a user enters the site and new session is created with a ref to session unique (uuid).

    Various household is performed when the session expires

    BUT how to prevent a user who is just to order and return to the site to re-use the same ref session?

    What is the best solution? I can prematurely expire the session, or maybe start a new and attach this user?

    Out of curiosity, why is it a problem if they *?

    Seems a little odd to have to manually end a session, so maybe you are looking at the right place for a solution, that's all.

  • Several editing cascading errors or program issues

    My laptop has Windows Vista 64-bit and has recently been having several odd errors.

    -L' connection icon in the systray shows that it is not connected, regardless of their actual situation

    -L' power icon will not charge real-time level display (IE when it falls to 25%, I still see a full charge until it shuts down suddenly

    -Windows Live Onecare does not work or has stopped... (I can't uninstall and update to the point...)

    -I'm unable to install or uninstall a program for this machine.  It starts, then hang up

    -I can not also run programs like msconfig, etc..  Just does not open (looks like he took the command of cmdprompt, but never gives me a screen to interact with.)

    -I can also run most of the control panel (backup and restore, etc.).  I can open the control panel and click on the items, but get a blank screen that hangs unless I close it through Task Manager.

    Thank you!

    Thanks for the reply. It turns out that OneCare has been hung up it all along.  Once we understand how going beyond the issue of One Care, all the others have disappeared.

    Darrell.

  • ISO of Windows 8 N need (several editions)

    I had windows Pro 8, N x 64 installed on my PC, but I had to replace the hard drive and lost my installation. I don't have the ISO and impossible to find a place to get the ISO from Microsoft. Is there a way I can get it from Microsoft?

    MSDN keys are retail licenses, well, what you originally downloaded was Windows 8 N, which is for Europe. I think that Windows 8 ' n and editions of "n" not use unique product keys, so unless you can connect in MSDN I think its safe to say that, indeed, you are out of luck.

  • How to prevent several facesMessage error messages

    Hi my jdev - 11.1.1.7.0 version

    I use the custom exception handler that is registered in the descriptors > ADF-Meta-Inf > services.

    So, as soon as excepstions occurs in any application he catches in the custom handler code and displays as facesMessage with severtiy error and the message is "service unavailable".

    But in the case of several exceptions, it shows the same error several times on the page of the user that is not intuitive.

    How can I keep showing the same message several times?

    If there are several error, how can I display a single message in time?

    error123.PNG

    Before adding a message, you can check if the same message is already present in the list of messages. See FacesContext (Java EE 6)

    If the same message is already present, you ignored it.

    Timo

  • Several view sessions, same PC?

    View 6.0.1 Client 3.3.0

    Can I have multiple sessions to see from the same computer? In other words

    • Launch customer Horizon View, connection and access your desktop
    • Launch customer Horizon still seen once, to connect under a different name and access another computer in office
    • Repeat this until I have open at the same time

    The reason that I ask is that we are migrating from Exchange to Gmail. Google provides a utility called RANGE that, in a larger environment, can be run from multiple machines with each machine migration from one part of the alphabet. Instead of using 10 physical machines, I would use rather 10 desktops from view. This work slick if my real PC I can access all the desktops of 10 reviews. I'll use a different login account to access each office.

    Yes you can do it with new clients, but with older clients, you need to use the switch - standalone.

    You are not able to?

  • At the same time a project on several editing systems

    We have two editors, access the same project at the same time on our local network. Are there traps or mines that we should be aware of?

    ======================

    The name edited by moderator for clarity. 'First Pro CC' is a little generic...

    I would say that you ask for the sentence to work on the same project simultaneously on separate computers. You will be better off working in separate projects and then import sequences of one into the other.

    Or consider alternative to Adobe for collaborative editing: Adobe anywhere.

  • How to create the View object with several editable entity objects

    I want the two entities in the view object to support the creation of new lines, but when I give create insert that it allows to insert only on the parent and not the child. I found this link
    http://docs.Oracle.com/CD/E21043_01/Web.1111/b31974/bcadvvo.htm#CEGCAJCI which replaces the outgoing class. but I would like to do declarative. Is there another way to do it?

    I use Jdeveloper 11g 2 version.

    Thanks in advance,
    Rakesh

    Hello
    There is a checkbox in the tab "Updatable" entity objects, mark it checked and look in your vo
    Then, you can create the ViewObject also editable attribute
    Make sure that the Association is here.

    Rognard

Maybe you are looking for