Add ON DELETE CASCADE

Hello world.

I want to add the "ON DELETE CASCADE" constraint on the foreign key value in the child table as.

ALTER table employees
Add CONSTRAINT cscade_dept_no ON DELETE CASCADE (Deptno)

but it displays the error message, so please help me in this matter.


Thank you

Published by: BilalKhan on February 7, 2011 23:53

In general, will be useful look the displayed error.

Example:

ALTER table employee Add CONSTRAINT cscade_dept_no ON DELETE CASCADE (Deptno);

Error SQL: ORA-00904: :
00904. 00000 -  "%s: invalid identifier"
*Cause:
*Action:

Then we can tell you... Your syntaxis is incorrect, you must use

ALTER TABLE table_name
Add CONSTRAINT constraint_name
FOREIGN KEY (column1, column2,... column_n)
REFERENCES parent_table (column1, column2,... column_n)
WE DELETE CASCADE;

example of

ALTER TABLE employee
add CONSTRAINT cscade_dept_no
  FOREIGN KEY (Deptno)
  REFERENCES Department (Deptno)
  ON DELETE CASCADE;

Tags: Database

Similar Questions

  • Cannot delete the Parent folder - On Delete Cascade is set

    Hi all
    I have a table parent and child, and when I try to delete the parent record, I get the following error:

    ORA-02292: integrity constraint (WFSTEADMAN. INCIDENT_NOTES_TBL_FK) violated - book of the foundling
    Error failed to process row in the MYTEST_INCIDENTS table.

    I have the FK is defined on the ON DELETE CASCADE, so I'm not sure of what could be the issue.

    Here are the structures of my parent and child tables:

    I use apex.oracle.com for the version is: Application Express 4.0.2.00.06

    Any help would be appreciated.
    Wally

    PARENT TABLE:
    =============================================================

    CREATE TABLE 'MYTEST_INCIDENTS '.
    (ACTIVATE THE "INCIDENTID" NUMBER NOT NULL,)
    "INCIDENTCREATED" DATE NOT NULL ACTIVATE.
    ACTIVATE THE "INCIDENT_OWNER" VARCHAR2 (200) NOT NULL,
    "DTGSTART" DATE NOT NULL ACTIVATE.
    DATE OF THE "DTGEND."
    VARCHAR2 (4000) "INCIDENT_SERVICES."
    VARCHAR2 (4000) "INCIDENT_CUSTOMERS."
    VARCHAR2 (4000) "INCIDENT_DESCRIPTION."
    VARCHAR2 (4000) "INCIDENT_TIMELINE."
    VARCHAR2 (500) "INCIDENT_TRACKING."
    VARCHAR2 (4000) "INCIDENT_RESTORE."
    VARCHAR2 (4000) "INCIDENT_FOLLOWUP."
    NUMBER OF "INCIDENT_LEVEL."
    VARCHAR2 (500) "INCIDENT_TITLE."
    VARCHAR2 (4000) "EMAIL_NOTIFY."
    VARCHAR2 (4000) "TEXT_NOTIFY."
    VARCHAR2 (25) "LEVEL_TYPE."
    ENABLE 'MYTEST_INCIDENTS_PK' CONSTRAINT PRIMARY KEY ('INCIDENTID')
    ) ;


    CREATE OR REPLACE TRIGGER "BI_MYTEST_INCIDENTS".
    Before Insert on 'MYTEST_INCIDENTS '.
    for each line
    Start
    If: NEW. "' INCIDENTID ' is null then
    Select 'MYTEST_INCIDENTS_SEQ'.nextval in: NEW. "' INCIDENTID ' from dual;
    end if;
    end;
    /
    ALTER TRIGGER 'BI_MYTEST_INCIDENTS' ENABLE;


    CHILD TABLE
    =============================================================

    CREATE TABLE 'MYTEST_INC_NOTES '.
    (ENABLE THE "NOTEID" NUMBER NOT NULL,)
    ACTIVATE THE "INCIDENT_ID" NUMBER NOT NULL,
    DATE OF THE "NOTE_DTG."
    VARCHAR2 (200) "NOTE_OWNER."
    VARCHAR2 (4000) "NOTE_COMMENTS."
    ENABLE 'MYTEST_INC_NOTES_PK' CONSTRAINT PRIMARY KEY ('NOTEID")
    ) ; ALTER TABLE 'MYTEST_INC_NOTES' ADD 'MYTEST_INC_NOTES_CON' OF CONSTRAINT FOREIGN KEY ('INCIDENT_ID')
    REFERENCES "MYTEST_INCIDENTS" ("INCIDENTID") ON DELETE CASCADE ACTIVE;


    CREATE OR REPLACE TRIGGER "BI_MYTEST_INC_NOTES".
    Before Insert on 'MYTEST_INC_NOTES '.
    for each line
    Start
    If: NEW. "" NOTEID ' is null then
    Select 'MYTEST_INC_NOTES_SEQ'.nextval in: NEW. "" NOTEID ' from dual;
    end if;
    end;
    /
    ALTER TRIGGER 'BI_MYTEST_INC_NOTES' ENABLE;


    CREATE OR REPLACE TRIGGER "MYTEST_INC_NOTES_T1".
    FRONT
    Insert or update on 'MYTEST_INC_NOTES' REFERENCING NEW AS NEW OLD AS OLD
    for each line
    Start
    : NEW. NOTE_DTG: = SYSDATE;
    end;
    /
    ALTER TRIGGER 'MYTEST_INC_NOTES_T1' ACTIVE;

    I suppose that you use the provided script to create your tables:
    the error message indicates that the FK INCIDENT_NOTES_TBL_FK is vioalated
    And your script creates a cascade of delete on FK MYTEST_INC_NOTES_CON

  • View, add or delete background jobs on the system on the taskbar tray

    When I install some applications they but the background tasks on the system tray on the taskbar that initiates at the start.  How view, add or delete?

    Generally, the best way to manage applications that start at Windows startup is to use each such application 'options' or 'preferences' menu instead of directly editing the Windows registry entries.

    Also, remember that not all tasks that start at Windows startup in fact are using much in the way of your computer's resources.  Many tasks have a burst of activity at startup right and then are paged out the file paging and just sitting there waiting do not use cycles CPU or RAM.

    Notwithstanding the foregoing, there are sometimes when you change a registry entry for an application that starts with Windows.  The best tool for this is Autoruns.  Because it shows (and allows you to change) starting for tasks information much more that start at Windows startup that tools like the one you mentioned, Autoruns can be daunting and dangerous.  If you want to make changes in the entries in the 'Connection' tab, you will be OK.  Do not the changes elsewhere unless you are sure of what you are doing.

    Moreover, Spybot Search Destroy & used as a recommended anti-malware tool.  Nowadays, the best choices are Malwarebytes Anti-Malware and SUPERAntiSpyware.

  • Question in cooperation with af:iterator and by program (add and delete records using the list)

    In our application, we try to add and delete records within a one: iterator lie to the backing bean list table.

    According to the feature remove should not fire any validation form so we are settign Remove button including the immediate property. And add can throw validation before adding a new record.

    Here the problem comes with button Delete with activated immeidate.  The deletions list action recording is removed from the collection list at the beacking bean, but after that the interface iterator partial page refresh user displays with bad Recordset. Some how instead of getting the last recordings of server of the user interface displays the previous local values for input components.

    For example: if I have 5 files in the list and delete record 2nd of collection. Backing bean (server side) the 2nd record is perfectly removal of list collection.

    On the user interface, the iterator 4 records are displayed as the size of the list is 4, but instead of 2nd record the last record is not rendered. According to my understanding, as deleting comme la suppression touche key is set immediately then the some how these recordings (genereted the Id of component runtime inside the i1: 0:it1 etc...) Apply request vandekerckhove is not updated gettign, Hene showing the old local values inplace of these components of entry and this behavior is only for input components.

    Can you suggest me a solution more come to the question above. Delete with immediate should unregister correspondent and only the record deleted if pannals UI.

    JSFF code

    <af:panelGroupLayout id="pgl1" binding="#{viewScope.formBB.mainPGL}">
            <af:iterator id="i1" value="#{viewScope.formBB.allEmployees}"
                         var="emp" rows="0" varStatus="vs"
                         binding="#{viewScope.formBB.iteratorBinding}">
              <af:panelFormLayout id="pfl1" maxColumns="4" rows="1" labelAlignment="top">
                <!--<af:outputText value="#{vs.index}" id="ot1"/>-->
                <af:inputText label="First Name" id="it1" value="#{emp.firstName}"
                              autoSubmit="true" required="true"/>
                <af:inputText label="Last Name" id="inputText1"
                              value="#{emp.lastName}" autoSubmit="true"
                              required="true"/>
                <af:commandImageLink text="Delete" id="cil1"
                                     immediate="true"
                                     actionListener="#{viewScope.formBB.deleteEmployee}">
                  <f:attribute name="index" value="#{vs.index}"/>
                </af:commandImageLink>
              </af:panelFormLayout>
            </af:iterator>
            <af:commandButton text="Add New Employee" id="cb1"
                              actionListener="#{viewScope.formBB.addNewEmployee}"/>
            <af:spacer width="10" height="10" id="s1"/>
    </af:panelGroupLayout>
    

    Delete the Action listener for the bean

    private List <Employee> allEmployees;
    public List getAllEmployees() {
            return allEmployees;
        }
        
    public void deleteEmployee(ActionEvent actionEvent) {
            int index = (Integer) actionEvent.getComponent().getAttributes().get("index");
            if(allEmployees != null && allEmployees.get(index) != null) {
                System.out.println("Emploeye Name:" + allEmployees.get(index).getFirstName());
                allEmployees.remove(index);
            }
            //AdfFacesContext.getCurrentInstance().addPartialTarget(mainPGL);
            AdfFacesContext.getCurrentInstance().addPartialTarget(iteratorBinding);
                
        }
    public void addNewEmployee(ActionEvent actionEvent) {       
            Employee addE = new Employee();
            if(allEmployees != null) {
                allEmployees.add(addE);
            }
            else {
                allEmployees = new ArrayList <Employee>();
                allEmployees.add(addE);
            }
            AdfFacesContext.getCurrentInstance().addPartialTarget(mainPGL);     
        }
    

    Jdev version - Build JDEVADF_11.1.1.7.0_GENERIC_130226.1400.6493

    POC Application - https://drive.google.com/file/d/0BysBrGAsXoo0Qjh3VGkzZkRGck0/view?usp=downalod

    Help, please.

    You probably need to reset submitted values.

    For this, you can use this util class: ResetUtils (reference Java APIs for Oracle ADF Faces)

    For example: ResetUtils.reset (iteratorBinding);

    BTW, you should never bind components to bean managed with a scope greater than the scope of the request.

    Dario

  • I've just updated Adobe Professional, but I'm not able to add, to delete the pages more. Before the update, it wasn't a problem. I missed something?

    I've just updated Adobe Professional, but I'm not able to add, to delete the pages more. Before the update, it wasn't a problem. I missed something?

    Are you sure that you're not open your files with the free player instead of using Acrobat? And please do not post the same question multiple times. Also, try to be more specific. "I am not able" can mean many different things.

  • How to add and delete pages in a pdf document?

    How to add and delete pages in a pdf document?

    The easiest way is to use the Page thumbnails Panel.

    But you can also use the Pages pane.

  • I am trying to remove a price in pdf format, and a message appears "all or part of the selection has no available police." Cannot add or delete the current font using". I downloaded this font in my Adobe fonts, but still no luck.

    I am trying to remove a price in pdf format, and a message appears "all or part of the selection has no available police." Cannot add or delete the current font using". I downloaded this font in my Adobe fonts, but still no luck.

    How to update or download all the fonts in my Adobe Adobe Acrobat X Pro?

    Get the police does not always help, but to use a font you don't add it to Acrobat. Add you on Mac or Windows.

  • Alternate DELETE CASCADE

    Hi all

    I have a situation where I need to delete a record in the parent table. But I must find the child records, delete these records and then delete the record in the parent table.

    To understand, I'm using EMP, DEPT tables here.
    I have Emp and Dept tables. Let's say we have not "we delete cascade" & I don't want to use table constraints to find the parent-child relationship, because it takes a long time.
    I want to delete a record from table DEPT where deptno = 10.
    But we can do that only after the removal of all the documents that testify the deptno = 10 in the EMP table.
    I have the answer, I use all_constarints table to find the primary key of the EMP table and delete the records.

    Other options?

    THX
    Rod.

    Hello

    SamFisher wrote:
    Frank,
    I'm not supposed to change the structure of the table to use ON DELETE CASCADE. It is a Production of data.

    A reason any prevents you from changing the constraints should stop you from writing you own alternative. It is true that implementation and using of ON DELETE CASCADE can cause serious problems such as accidentally deleting valid records. Register your own alternative will have the same problems and much more.
    I do not mean you are a bad programmer, or that you don't test things carefully, but you're better than the team of Oracle who wrote and tested ON DELETE CASCADE? You will have the resources to maintain your code better that Oracle maintains its code?

    You want to be very careful with production data. That's why you should use the best tools available to deal with him.

  • delete cascade question

    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE     10.2.0.4.0     Production
    TNS for HPUX: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production-
    given the following scenario an array of great grandparent, grandparent table/s, parent table/s, children table/s
    with deletions cascade.
    so something like.
    CREATE TABLE T1
    (
       T1_id   NUMERIC (10) NOT NULL,
       CONSTRAINT T1_pk PRIMARY KEY (T1_id)
    );
    
    CREATE TABLE T2
    (
       T2_id   NUMERIC (10) NOT NULL,
       T1_id   NUMERIC (10) NOT NULL,
       CONSTRAINT T2_pk PRIMARY KEY (T1_id, T2_id),
       CONSTRAINT fk_T1 FOREIGN KEY
          (T1_id)
           REFERENCES T1 (T1_id) ON DELETE CASCADE
    );
    
    CREATE TABLE T3
    (
       T3_id   NUMERIC (10) NOT NULL,
       T2_id   NUMERIC (10) NOT NULL,
       T1_id   NUMERIC (10) NOT NULL,
       CONSTRAINT T3_pk PRIMARY KEY (T1_id, T2_id, T3_id),
       CONSTRAINT fk_T2 FOREIGN KEY
          (T1_id, T2_id)
           REFERENCES T2 (T1_id, T2_id) ON DELETE CASCADE
    );
    
    CREATE TABLE T4
    (
       T4_id   NUMERIC (10) NOT NULL,
       T3_id   NUMERIC (10) NOT NULL,
       T2_id   NUMERIC (10) NOT NULL,
       T1_id   NUMERIC (10) NOT NULL,
       CONSTRAINT T4_pk PRIMARY KEY (T1_id, T2_id, T3_id, T4_id),
       CONSTRAINT fk_T3 FOREIGN KEY
          (T1_id, T2_id, T3_id)
           REFERENCES T3 (T1_id, T2_id, T3_id) ON DELETE CASCADE
    );
    now every night runs a delete statement, where some T1 lines are deleted
    delete from T1 where blah blah blah
    so all the cascading deletes are performed.

    It is faster to remove from the table below / (s) in the case of T4, then delete the T3, then T2 and T1 finally
    or leaving the cascade deletes do their thing results in the same amount of time?

    If it's faster to remove from the table below / (s) is first of all a few querry which gave a table I can find all the
    its deletion tables cascading? so, in my particular case T1 he would show as the weaker then T3 and T2 T4.

    Thanks for any input.

    Hello

    Pollywog wrote:
    ... It is faster to remove from the table below / (s) in the case of T4, then delete the T3, then T2 and T1 finally
    or leaving the cascade deletes do their thing results in the same amount of time?

    Interesting question. Try (using tables) and see.

    My guess is that it would be faster to just delete T1. Say you delete T2 and T1. When you delete T1, it will check if there are children in T2, so the effort you put into the search for the children in T2 is redundant.

    If it's faster to remove from the table below / (s) is first of all a few querry which gave a table I can find all the
    its deletion tables cascading? so, in my particular case T1 he would show as the weaker then T3 and T2 T4.

    Data dictionary views all_constraints and all_cons_columns (as well as their counterparts from user_ and dba_) have this information.

  • Problems with the database, on delete cascade

    Hello

    I am in a project with the Flahs CS4 with air and as3. I create a database by code, everything is ok. I have 2 tables,
    a main table with a code field as primary key and other details of the table, named e.g. DetailTable, with 3 fields as the primary key. What I want to do, this is a deletion of a row in MainTable, all lines of DetailTable, where the field code is the same as the field in MainTable code should be deleted also.

    Here's the SQL code to create the tables.

    var sql2:String = "CREATE TABLE If NOT EXISTS MainTable ('+ '.
    "code INTEGER PRIMARY KEY AUTOINCREMENT, ' +.
    "quote," +
    'date ' +.
    "  " +
    ")";

    var sql3:String = "CREATE TABLE If NOT EXISTS DetailTable ('+ '.
    "code INTEGER, INTEGER position, type INTEGER, ' +.
    "path of TEXT, TEXT document, ' +.
    'PRIMARY KEY (code, position, type) +.
    'FOREIGN KEY (code) REFERENCES Detallesecuencia (code) ON DELETE CASCADE ' +.
    ")";


    Thus, when the tables are created, insert data. I connect without a problem, remove a line in MainTable (see code), to remove the line with the example code = 4, but in the DetailTable, all with code = 4 lines are NOT deleted, why?

    [CODE]
    Inside of a class

    private var conn: SQLConnection;

    public void constructorClass() {}
    Conn = new SqlConnection ();
    ConexionBD();
    }

    function ConexionBD() {}

    conn.addEventListener (SQLEvent.OPEN, openHandler);
    conn.addEventListener (SQLErrorEvent.ERROR, errorHandler);
    var dbFile:File = File.applicationDirectory.resolvePath ("mydatabase.db");
    conn.openAsync (dbFile, SQLMode.UPDATE);
    }

    function deleteRow() {}
    selectData:SQLStatement = new SQLStatement();
    selectData.sqlConnection = conn;
    selectData.text = "" DELETE FROM MainTable WHERE code =: param1 ";"
    selectData.addEventListener (SQLEvent.RESULT, resultHandler);
    selectData.addEventListener (SQLErrorEvent.ERROR, errorHandler);

    Delete line in MainTable code = 4, but not to delete all the rows in DetailTable with code = 4
    selectData.parameters [": param1"] = 4;

    selectData.execute ();
    }
    [/ CODE]

    Thanks in advance

    Hmmm, well then maybe it's you must go down the road of the old school and delete individual tables as needed, rather than rely on the cascade delete.

  • Foreign keys without ON DELETE CASCADE; Database design question

    It's the 3rd company, while I work, where I see that created foreign keys
    ON DELETE CASCADE
    clause.
    My colleague said that it is created without the ON DELETE CASCADE clause in order to complicate the deletion of data (records of children). Thus, for codes of the Purge and archive, before we delete the parent table we must remove from the child table first.

    Occasinaly, something is wrong and we will end up disabling FKs make them all and then purging, archiving, etc...

    So, is it not better to create foreign keys with the clause ON DELETE CASCADE, rather than having all these hassles?

    Experience, no matter what you think?

    Personally, I am firmly in the removal of the brand of hard data camp. In the vast majority of cases, trying to remove an active parent is an error if the user must be informed of what they are trying to do and must make a conscious effort to do so (in other words, remove first the children).

    John

  • ON DELETE CASCADE and the CASCADE CONSTRAINTS - what are the difference?

    I know that CASCADE CONSTRAINTS would allow me to remove the parent key and the reference of the following children will be freed from the constraints. However, the child columns will remain and will be set to NULL.

    SO:

    If the CASCADE CONSTRAINTS could do the job, why do we need on REMOVE CONSTRAINTS?

    Unnecessary extra Note:

    I know that YOU DELETE CONSTRAINT is defined with the child. When I tried to delete the parent key without having the CONSTRAINTS of the WATERFALL, I got an error message indicates that the parent key has childs! So ON DELETE CASCADE was not up to what I had to mention the CASCADE CONSTRAINTS when deleting the parent key while the CASCADE CONSTRAINTS worked fine without ON DELETE CASCADE on the side of the child.

    I hope that my question is simple...

    A foreign key with a delete cascade means that if a record in the parent table is deleted, then the corresponding records in the child table with automatically deleted. This is a deletion of the waterfall.

    Forced to cascade deletes all foreign keys that reference the table to remove, and then deletes the table.

  • logical delete cascade

    Hello

    I need to implement the logic cascade delete (defining a column instead of remove value)

    Simple logical deletion, I made by substituting the EntityImpl remove() method.
        public void remove() {
            setAttribute("Status","1");
        }
    but with this stunt declarative removal does not work.

    So I'm looking for some advice how to solve this problem.

    I don't know if it's the best way, but it works :)

        /**Add entity remove logic in this method.
         */
        public void remove() {
    
            setCountryName(getCountryName() + "Remove-Deleted");
            super.remove();
        }
    
        /**Custom DML update/insert/delete logic here.
         */
        protected void doDML(int operation, TransactionEvent e) {
            if (operation != DML_DELETE)
                super.doDML(operation, e);
            else {
                super.doDML(DML_UPDATE, e);
            }
    
        }
    
  • How can I add or delete a Contact on my email?

    When MSN has changed my hotmail in Outlook, it is very difficult to manage 'contacts'  I wanted to erase or add a 'contact', how can I do?

    Help, please.

    Also when I attached the photos to my email they're so big... not as regular attachments as before... Help, please

    Lilly

    Contacts are now calling people.

    To access people to Outlook.com, hover over the Outlook logo in the upper left corner and click the arrow that appears to the right of the Outlook logo.
    Select people.

    Back to your Inbox from people:

    Hover over the logo of people and click the arrow that appears to the right of the logo of the people. Select mail.
    You can also get calendar or Skydrive in the same way.

    Your list filtering:

    Above the search box at the top of the Contact list on the left, is a filter option that says "All".
    If you click on this, you should see one of the groups created in the past.
    Click on one of them to filter your list to all the contacts in this group.

    By selecting one or more Contacts:
    If you click on a contact in the list name, the details for that contact will appear on the right.
    Alternatively, if you click the checkbox to the left of the picture of the contact, you can create a list of contacts selected on the right by clicking on the checkbox to the left of several contacts.

    Add or remove a group membership:

    If you select one or more contacts, you will see a bar option from the top to the groups menu.
    If you click it, and then it displays the list of groups with a checkbox that is enabled for each group that the contact (s) is / is a member of.

    You can uncheck to remove or check to add, select contacts in the selected groups and then click on apply to apply the changes.
    Your selected contacts will then be updated to be added or removed groups you have chosen as appropriate.

    Delete
    When you select one or more contacts, you will see an option in the top menu bar to remove.
    If you click on delete and click on remove in the confirmation box, the selected contacts will be removed.

    Edit:
    You can change if you clicked on a single contact (name or photo) in the list on the left to see details on the right.
    When you view the details, click on edit in the menu bar to change or add details.



  • Add and delete a Listner folder to store

    I'm developing an application with the api Folderlistner... I can get all mails from my store, I had 2 problems in my application

    I can't quit smoking folderlistner. use

    removelistner method when calling exit (system.exit) after tat my request for treatment of all email for example my request to delete all emails from my store. How to delete store folderlistner

    When restart it my application processing emails once more, I want to say 2 headphones, working at the same time not only 2

    For each restart another a listner shoud added

    How can I solve this problem?

    the addition of listner

    mystore= session.getStore();
    mystore.addFolderListener(this);
    

    in removeing llistner, while calling system.exit (0)

    mystore.removeFolderListener(this);
    mystore=null;
    

    To create an instance of singleton you need not another entry point. I was referrring you to this part of the code and not the application complete. Just set up the next part in your application and no need for alternate entry point parameters.

    private FolderListenerGUI folderListenerGUI = null;
    
      //Long value: com.samples.folderListener
    
      public static final long RTSID_MY_APP = 0x7451402f595f81a5L;
    
      public FolderListenerApp() 
    
      {
    
        try
    
        {
    
          //Get the store from the default instance.
    
          Store store = Session.getDefaultInstance().getStore();
    
          //Add the folder listener to the store.
    
          store.addFolderListener(this);
    
        }
    
        catch (Exception e)
    
        {
    
          System.out.println(e.toString());
    
        }
    
      }
    
      //Returns an instance of the running FolderListenerApp.
    
      public static FolderListenerApp waitForSingleton()
    
      {
    
        //Ensure this is a singleton instance.
    
        //Open the RuntimeStore.
    
        RuntimeStore store = RuntimeStore.getRuntimeStore();
    
        //Obtain the reference of FolderListenerApp.
    
        Object obj = store.get(RTSID_MY_APP);
    
        //If obj is null, there is no current reference
    
        //to FolderListenerApp. Start a new instance
    
        // of FolderListenerApp if one is not running.
    
        if (obj == null)
    
        {
    
          //Store a reference to this instance in the RuntimeStore.
    
          store.put(RTSID_MY_APP, new FolderListenerApp());
    
          return (FolderListenerApp)store.get(RTSID_MY_APP);
    
        } else
    
        {
    
          return (FolderListenerApp)obj;
    
        }
    
      }
    

    Kind regards

    yosoh

Maybe you are looking for