Howto unlock a table in oracle when all sessions are close ...

but ... not commit or roollback has been made ...
Could I try to run any script for unlock the table or the row?
Thanks a lot

If a session is closed, by definition all transactions associated with that session must have ended, either by having the changes committed or rolled back. So the premise does not make sense.
If a table is locked, some session has that lock. If the session goes away, the lock goes away. If the lock is still there, the session must still be there.
Justin

Similar Messages

  • Can we change log_buffer parameter online e.g. when all users are working..

    Hi,
    Can we change log_buffer parameter online e.g. when all users are working.. ???
    What is relation between redo buffer in sga and log_buffer parameter ?
    SQL> show sga
    Total System Global Area 3758096384 bytes
    Fixed Size 1983152 bytes
    Variable Size 553655632 bytes
    Database Buffers 3187671040 bytes
    Redo Buffers 14786560 bytes
    SQL>
    SQL> show parameter log_buffer
    NAME TYPE VALUE
    log_buffer integer 14338048
    SQL>
    SQL>
    If the log_buffer parameter is 14 MB then why redo buffer is no as same size e.g.
    14 MB
    SSM

    I am hoping your Oracle Consultant know what he's talking about.
    According to Oracle Performance Guide,
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14211/memory.htm#sthref654
    "On most systems, sizing the log buffer larger than 1M does not provide any performance benefit. Increasing the log buffer size does not have any negative implications on performance or recoverability. It merely uses extra memory.
    The best method to determine if bigger redo buffer is needed is
    SELECT NAME, VALUE
    FROM V$SYSSTAT
    WHERE NAME = 'redo buffer allocation retries';
    The value of redo buffer allocation retries should be near zero over an interval. If this value increments consistently, then processes have had to wait for space in the redo log buffer. The wait can be caused by the log buffer being too small or by checkpointing. Increase the size of the redo log buffer, if necessary, by changing the value of the initialization parameter LOG_BUFFER. The value of this parameter is expressed in bytes. Alternatively, improve the checkpointing or archiving process.
    Other than that, hight log file sync event indicate you need faster disk for your redo logfiles. However, please also post your commits per second and redo per second from your AWR report.
    100M redo logs might be small for your environment.

  • My menu bar does not appear at the top of my homepage on a brand new 27" iMac only when i pull up an app. this does not allow me to shut down my mac when all apps are closed nor does it all me to use finder. any help would be awesome

    My menu bar does not appear at the top of my homepage on a brand new 27" iMac only when i pull up an app. this does not allow me to shut down my mac when all apps are closed nor does it all me to use finder. any help would be awesome

    Press the escape (esc) key to exit full-screen mode.

  • Black only error message when all inks are full

    My printer ran out of a color some time ago and popped up the black only message box. I have since replaced all of the colored inks and it still gives me the black only message when I go to print and says I need to replace magenta. I just replaced it! My printer is the photosmart C6280. Thank you

    Hello Sudharshan,
    "Status can only be set when all originals are stored" Also I see that the model is not having Status in CAD VIEW.
    This is error is indicating that your original CAD model is not checked in and as per your configuration you require the original to be checked in before moving to next status.
    Please:
    1. Check your document status network.
    2. ensure that you have proper set up for the fields "check in" in the current status. This indicator should be set. This ensures that the document is automatically checked in before moving to the next status. This will solve your problem.
    When I double click on that object in CAD VIEW, it takes me to DIR creation screen with Document Type DES. Can someone help me in this ?
    Because of the above set up missing the original DIR is missing the original document and hence the system assumes you are creating a new DIR when you click on the object in CAD view.
    regards,
    N K

  • CAD VIEW Error : "Status can only be set when all originals are stored"

    Hi Friends,
    I have Proe to SAP integrated and when I open Proe model in CAD VIEW and try to create a document it shows an error "Status can only be set when all originals are stored" Also I see that the model is not having Status in CAD VIEW.
    When I double click on that object in CAD VIEW, it takes me to DIR creation screen with Document Type DES. Can someone help me in this  ?
    Rgds,
    SM

    Hello Sudharshan,
    "Status can only be set when all originals are stored" Also I see that the model is not having Status in CAD VIEW.
    This is error is indicating that your original CAD model is not checked in and as per your configuration you require the original to be checked in before moving to next status.
    Please:
    1. Check your document status network.
    2. ensure that you have proper set up for the fields "check in" in the current status. This indicator should be set. This ensures that the document is automatically checked in before moving to the next status. This will solve your problem.
    When I double click on that object in CAD VIEW, it takes me to DIR creation screen with Document Type DES. Can someone help me in this ?
    Because of the above set up missing the original DIR is missing the original document and hence the system assumes you are creating a new DIR when you click on the object in CAD view.
    regards,
    N K

  • Message no. 26269 : Status can only be set when all originals are stored

    Hi,
    While changing status in cv02n, i am getting the below message no-Message no. 26269 : Status can only be set when all originals are stored. I am not getting the message solution in google. please guide me how to come over from this message.
    Regards,
    Mastan.

    Collegues! Have you any idea?
    Found this - [recommendation|http://help.sap.com/saphelp_47x200/helpdata/en/0c/b98e3c90347b17e10000000a114084/content.htm] - how to, but there so simple scenario without details about standart functionality.
    Check In
    You can check in originals, which are saved in the local network, into a storage system. The following originals are indicated by the  icon:
    Originals that are to be checked in for the first time.
    Originals that have already been checked in, and loaded into the local network for changing.
    To do this start WebDocuments. Process the document info record in the change mode.
    Select the original in the Originals dataset.
    Choose Check In. The system determines the storage system based on the system settings, and checks in the original.
    You return to the data sheet. The original application file is indicated by the Checked In  icon.
    Save the document.
    Very simple, but not work, and no details. Castle icon are not locked. DELETE, CANCEL - work, but not CNANGE.
    Maybe my storage system cannot determine the storage system? If it is right, so where can i maintain this option?

  • Still print picking list when ALL items are blocked. Is this possible.

    You know what warehouse people are like. When a delivery has all items blocked the picking list isn't printed, and the warehouse guys are wondering why nothing has printed. Of course a list is printed when there is at least one item that is not blocked on a picking list.
    My question is whether it's possible to print the picking list when all items are blocked?. I would expect no items to be printed for picking, but at the bottom of the report I would expect to see a list of items blocked.
    Anyone?.
    Jason

    HI
    1.Kindly chekc the routine in the t code V/27
    2.Against the routine against rthe condition type in the be.lwo path
          Logistics Execution
              Shipping
                 Output Control
                      Output Determination
                         Maintain Output Determination for Outbound Deliveries
                                Maintain Output Determination Procedure
    3.if it is in warehouse management then check in the tocde OMLV
    REgards
    Damu

  • In RAC Database All sessions are connecting to Node1 only

    Hi Gurus,
    Oracle RAC 10R2.
    OS: IBM AIX
    We have two node RAC instance. When I checked, all sessions are connecting to NODE1. and node2 is not having any worload.
    can you guys suggected me from where I start troubleshooting.
    Thanks,
    Chinmay

    Hi Chinmay,
    Check for active_instance_count parameter in database.If it's value is 1, database connection will go to only one instance.To check to which instance it will go you can use below query.
    select INSTANCE_NAME,HOST_NAME,INSTANCE_ROLE from gv$instance;
    Instance_role has two value: active instance (=primary instance) or a passive instance (secondary instance).
    Connection will always go to active instance only.
    Regards
    Sushant

  • ORA-12721: operation cannot execute when other sessions are active

    Hi,
    I started my DB like following :
    1) Change INIT.ORA file;  unset parallel_server parameter.
    2) Execute these commands:
    STARTUP MOUNT ;
    ALTER SYSTEM ENABLE RESTRICTED SESSION;
    ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
    ALTER SYSTEM SET AQ_TM_PROCESSES=0;
    ALTER DATABASE OPEN;
    SHUTDOWN IMMEDIATE;
    SQL> STARTUP RESTRICT  pfile='C:\oracle\product\10.2.0\db_1\database\initORCL.ora';
    ORACLE instance started.
    SQL> alter database national character set INTERNAL_CONVERT UTF8;
    alter database national character set INTERNAL_CONVERT UTF8
    ERROR at line 1:
    ORA-12721: operation cannot execute when other sessions are activeWhy this error when DB is opened in strict and I'm the only user ?
    SQL> select count (*) from v$session;
      COUNT(*)
            20Any solution ?
    Thank you.

    Hi
    This operation is dangerous, please ensure that you have a full backup before doing that operation.
    Please use that order :
    SHUTDOWN IMMEDIATE;
    -- make sure there is a database backup you can rely on, or create one
    STARTUP MOUNT;
    ALTER SYSTEM ENABLE RESTRICTED SESSION;
    ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;
    ALTER SYSTEM SET AQ_TM_PROCESSES=0;
    ALTER DATABASE OPEN;
    ALTER DATABASE CHARACTER SET <new_character_set>;
    -- a alter database takes typically only a few minutes or less,
    -- it depends on the number of columns in the database, not the
    -- amount of data.
    SHUTDOWN;
    Please note that :
    The command requires the database to be
    open but only one session, the one executing the command, is allowed.
    For the above error conditions Oracle9i will report one of the errors:
    ORA-12719: operation requires database is in RESTRICTED mode
    ORA-12720: operation requires database is in EXCLUSIVE mode
    ORA-12721: operation cannot execute when other sessions are active
    Oracle9i can also report:
    ORA-12718: operation requires connection as SYS
    if you are not connect as SYS (INTERNAL, "/ AS SYSDBA").
    Let us know if this helps.
    regards,
    Hub
    Edited by: Hub on Dec 10, 2008 1:22 PM

  • Order Output should be supressed when all items are rejected

    We have a requirement, where when all schedule lines in a sales order are rejected the order confirmation output should be suppressed.
    This is what we did to achieve it.
    Using the customer modification structure KOMKBZ3, add a new field ZZ_ALL_SL_REJ . This field is an indicator that will be set if all all items in a sales order are rejected.
    Call function KOMKBV1_FILL to populate the communication structure KOMKBV1. The function calls USEREXIT_KOMKBV1_FILL, which is the header level user exit routine.
    In this user exit, through a select statement read table J_3AVBUE, and check for all schedule lines if 'ABSTA' equals C, if this is true the ZZ_ALL_SL_REJ  indicator is set to ‘X’.
    Then in the output requirement routine 900, see if KOMKBV1-ZZ_ALL_SL_REJ is set to 'X', if so set the return code to be 4.
    However when we reject items in sales order and save it, we have to go back in again and save it for the second time for the output determination to be carried out again.
    Could someone help with this...
    Thanks.
    Anne

    I believe an easier method would be to check KOMKBV1-ABSTK in the output requirement. If it's 'C', then all items have been rejected.
    Cheers, Paul.

  • Scripting for when all buttons are clicked

    Im quite new to flash well at least the scripting part of it.
    I'm much more of a designer and I'm having big problems I know that
    it is prob very simple but I am totally useless at it! Can some1
    please just point me in the right direction thank you xxx

    If you're testing in flash you should see some trace outputs
    in the output panel. If you don't then there's something not
    working right.
    When you press each of your buttons, you want the main
    timeline to go to a different frame right? You need to set those
    frame targets in the code.
    example for but_bat:
    {button:but_bat, gotoFrame:2},
    this sets things up so that when but_bat is pressed, the
    timeline goes to frame 2.
    You will need to set the others for their correct frame
    targets. Just change the numbers for gotoFrame:
    number here
    Is what you want to happen when
    all of the buttons have been clicked that a congratulations
    sign movieclip is played? (You haven't said what you wanted it to
    do at that point, so I'm afraid I couldn't know that ;-) ) At the
    moment I've set the script up so that it checks... but all it does
    is trace an output:'I would normally want to do something special
    from this point' where whatever you want to have happen when
    they're all pressed would be requested by actionscript. If you tell
    me what that is, I can tell you the code to do it.

  • Why does appserv.exe hog the CPU when all modules are stopped?

    Hi all,
    *** Problem summary ***
    Following a seemingly successful call to a session bean my Sun appserver appears to hog the machines CPU resources, but I do not know what it is doing.
    *** Problem detail ***
    I am running Sun Java System Application server 8.1 on windows xp with 1 gig of memory.
    I have happily deployed and can run a couple of sample EJB's, e.g. Converter from the J2EE tutorial and a modified/copied version that is basically a "helloworld" type session bean.
    I have now successfully built and deployed a more complex session bean that uses IBM Toolbox classes to invoke functions on an AS/400(iSeries).
    After this session bean is seemingly sucessfully invoked, the appserver seems to hog the CPU of my PC but it is not clear what it is doing.
    I see no obvious errors in the server.log file for the domain.
    I see not repetitive behaviour in the logs.
    Even when I stop all the modules in the app server, via the deploytool, the task manager still shows appsevr.exe using 60-75% of the CPU.
    ***Question ***
    How can I determine what the server is doing?
    * Note *
    My session bean requires some IBM jar files at run time. So, I have added the IBM jars to domain_dir/lib/ext, as per the Java Optional Package mechanism (http://docs.sun.com/source/819-0079/dgdeploy.html#wp69906). Perhaps this is confusing the server??
    I appreciate any and all advice and/or comment.
    Cheers,
    Simon.

    Same problem appears with Sun Java System Application Server 8.1 and 8.2.
    Does anyone knows about a solution ?
    I can't imagine that DB2 Toolbox JT400 JDBC Driver has never been used against SJSAS by SUN technicians...
    After a server stop all modules appears to be down, all session beans have been previously removed, but appserv.exe process do not shut down on Windows OS.
    I hope someone from SUN can show a suitable workaround soon, this problem is really noisy.
    Thank you in advance
    Roberto Cisternino

  • Service Requests remain In Progress when all Activities are Completed

    Hello Experts, we're periodically finding Service Requests remain In Progress, when all Activities within the SR are Completed.
    Specifically this is happening when a RB Activity within the SR template has generated an Incident and attached it to the SR, and all of the Activities within the SR are Completed prior to the Incident being Closed.
    Has anyone run into this situation?
    Even if we had means to easily find this scenario in our system that would ease our pain -- is it possible to use PowerShell to return all Service Request's which are In Progress but have all child Activities marked as Completed?
    Thanks!

    I've run into a couple of Service Request status issues. I'm convinced the SR status workflows are not as well designed as the other out of the box work item workflows. I've recently run into a problem with Service Requests failing to start (i.e. stuck forever
    in New status) depending on how they were created, and Here's a similar script i used to address the SR's jumping to completed bug from early in 2012.
    import-module smlets
    #Variable Setups
    $SRCompleted = Get-SCSMEnumeration ServiceRequestStatusEnum.Completed$
    $SRCompletedID = $SRCompleted.id
    $SRInProgress = Get-SCSMEnumeration ServiceRequestStatusEnum.InProgress
    $ACCompleted = Get-SCSMEnumeration ActivityStatusEnum.Completed$
    $ACSkipped = Get-SCSMEnumeration ActivityStatusEnum.Skipped$
    $SRClass = Get-ScsmClass System.WorkItem.ServiceRequest$
    $ContainsActivity = get-scsmrelationshipclass System.WorkItemContainsActivity$
    $SRReset = $False
    #Get SR in question (from workflow params)
    $SR = get-scsmobject -class $SRClass -filter "id -eq $ID"
    #Get all children relations.
    $ChildREls = Get-SCSMRelationshipObject -BySource $SR | ? {$_.relationshipid -eq $ContainsActivity.id -and $_.IsDeleted -eq $False}
    #if there are children (don't reset SRs that don't have activities)
    if ($ChildRELs) {
    foreach ($childREL in $ChildRELs ){
    #Get Activity from child relation.
    $ChildAC = (get-scsmobject -Id $childREL.TargetObject.id)
    if (!($ChildAC.Status -eq $ACCompleted -or $ChildAC.Status -eq $ACSkipped -or $ChildAC.Skip -eq $True)) {
    $SRReset = $True
    if ($SRReset) { Set-SCSMObject $sr -Property Status -Value $SRInProgress }
    the important part of that script is the bit where i'm walking each child and checking it's status. you could adapt this to your situation with some framing adjustments. 

  • When all apps are closed the text vanishes from my toolbar.  How do i get it back?

    When all the apps are closed the text vanishes from the tool bar at the top of the screen.  The apple icon is still there on the far left but clicking on it does nothing.  I can't log out!!!!

    How do I find that out? I just switched to Apple and am finding it really hard to find stuff.

  • How come my program doesn't shut down when all windows are closed?

    As of Java 1.5 (maybe earlier) java is supposed to exit when all windows have been closed. I have confirmed that this happens in a simple case of displaying 2 JFrames and closing both. Can anyone tell me why it's not happening in the case of 2 frames and 1 dialog here?
    * Created on Jul 12, 2006 by @author Tom Jacobs
    package tjacobs.ui;
    import java.awt.Component;
    import java.awt.Dialog;
    import java.awt.Frame;
    import java.awt.GraphicsConfiguration;
    import java.awt.HeadlessException;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.ComponentEvent;
    import java.awt.event.ComponentListener;
    import java.awt.event.WindowEvent;
    import java.awt.event.WindowListener;
    import javax.swing.JButton;
    import javax.swing.JDialog;
    import javax.swing.JFrame;
    public class ModalOnParentDialog extends JDialog implements ComponentListener,
              WindowListener {
         private Component mOwner;
         private boolean mParentOnly = false;
         public ModalOnParentDialog() throws HeadlessException {
              super();
              init(null);
         public ModalOnParentDialog(Frame arg0) throws HeadlessException {
              super(arg0);
              init(arg0);
         public ModalOnParentDialog(Frame arg0, boolean arg1)
                   throws HeadlessException {
              super(arg0, arg1);
              init(arg0);
         public ModalOnParentDialog(Frame arg0, String arg1)
                   throws HeadlessException {
              super(arg0, arg1);
              init(arg0);
         public ModalOnParentDialog(Frame arg0, String arg1, boolean arg2)
                   throws HeadlessException {
              super(arg0, arg1, arg2);
              init(arg0);
         public ModalOnParentDialog(Frame arg0, String arg1, boolean arg2,
                   GraphicsConfiguration arg3) {
              super(arg0, arg1, arg2, arg3);
              init(arg0);
         public ModalOnParentDialog(Dialog arg0) throws HeadlessException {
              super(arg0);
              init(arg0);
         public ModalOnParentDialog(Dialog arg0, boolean arg1)
                   throws HeadlessException {
              super(arg0, arg1);
              init(arg0);
         public ModalOnParentDialog(Dialog arg0, String arg1)
                   throws HeadlessException {
              super(arg0, arg1);
              init(arg0);
         public ModalOnParentDialog(Dialog arg0, String arg1, boolean arg2)
                   throws HeadlessException {
              super(arg0, arg1, arg2);
              init(arg0);
         public ModalOnParentDialog(Dialog arg0, String arg1, boolean arg2,
                   GraphicsConfiguration arg3) throws HeadlessException {
              super(arg0, arg1, arg2, arg3);
              init(arg0);
         private void init(Component c) {
              mOwner = c;
              addComponentListener(this);
              addWindowListener(this);
         public void componentResized(ComponentEvent arg0) {}
         public void componentMoved(ComponentEvent arg0) {}
         public void componentShown(ComponentEvent arg0) {
              doModalOp();
         public void componentHidden(ComponentEvent arg0) {
              doModalOp();
         public boolean isParentOnly() {
              return mParentOnly;
         public void setParentOnly(boolean b) {
              mParentOnly = b;
         public void setModal(boolean b) {
              super.setModal(b);
              //mModal = b;
              doModalOp();
         private void doModalOp() {
              if (mOwner != null) {
                   mOwner.setEnabled(!super.isModal() || !isVisible());
         public boolean isModal() {
              return super.isModal() && !mParentOnly;
    //     public boolean isParentModel() {
    //          return mModal;
         public void windowOpened(WindowEvent arg0) {
              doModalOp();
         public void windowClosing(WindowEvent arg0) {}
         public void windowClosed(WindowEvent arg0) {
              doModalOp();
         public void windowIconified(WindowEvent arg0) {}
         public void windowDeiconified(WindowEvent arg0) {}
         public void windowActivated(WindowEvent arg0) {}
         public void windowDeactivated(WindowEvent arg0) {}
         protected void finalize() throws Throwable {
              super.finalize();
              removeComponentListener(this);
              removeWindowListener(this);
              mOwner = null;
         public static void main(String[] args) {
              JFrame jf1 = new JFrame("1"), jf2 = new JFrame("2");
              final ModalOnParentDialog d = new ModalOnParentDialog(jf1, "3");
              d.setModal(true);
              d.setParentOnly(true);
              JButton b = new JButton("Show");
              b.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent ae) {
                        d.setVisible(!d.isVisible());
              jf1.setBounds(0,0,40,40);
              jf2.setBounds(40,40,40,40);
              jf2.add(b);
              d.setBounds(80,80,40,40);
              jf1.setVisible(true);
              jf2.setVisible(true);
              d.setVisible(true);
    }

    I fixed it
    * Created on Jul 12, 2006 by @author Tom Jacobs
    package tjacobs.ui;
    import java.awt.Component;
    import java.awt.Dialog;
    import java.awt.Frame;
    import java.awt.GraphicsConfiguration;
    import java.awt.HeadlessException;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.ComponentEvent;
    import java.awt.event.ComponentListener;
    import java.awt.event.WindowEvent;
    import java.awt.event.WindowListener;
    import javax.swing.JButton;
    import javax.swing.JDialog;
    import javax.swing.JFrame;
    public class ModalOnParentDialog extends JDialog implements ComponentListener,
              WindowListener {
         private Component mOwner;
         private boolean mParentOnly = false;
         public ModalOnParentDialog() throws HeadlessException {
              super();
              init(null);
         public ModalOnParentDialog(Frame arg0) throws HeadlessException {
              super(arg0);
              init(arg0);
         public ModalOnParentDialog(Frame arg0, boolean arg1)
                   throws HeadlessException {
              super(arg0, arg1);
              init(arg0);
         public ModalOnParentDialog(Frame arg0, String arg1)
                   throws HeadlessException {
              super(arg0, arg1);
              init(arg0);
         public ModalOnParentDialog(Frame arg0, String arg1, boolean arg2)
                   throws HeadlessException {
              super(arg0, arg1, arg2);
              init(arg0);
         public ModalOnParentDialog(Frame arg0, String arg1, boolean arg2,
                   GraphicsConfiguration arg3) {
              super(arg0, arg1, arg2, arg3);
              init(arg0);
         public ModalOnParentDialog(Dialog arg0) throws HeadlessException {
              super(arg0);
              init(arg0);
         public ModalOnParentDialog(Dialog arg0, boolean arg1)
                   throws HeadlessException {
              super(arg0, arg1);
              init(arg0);
         public ModalOnParentDialog(Dialog arg0, String arg1)
                   throws HeadlessException {
              super(arg0, arg1);
              init(arg0);
         public ModalOnParentDialog(Dialog arg0, String arg1, boolean arg2)
                   throws HeadlessException {
              super(arg0, arg1, arg2);
              init(arg0);
         public ModalOnParentDialog(Dialog arg0, String arg1, boolean arg2,
                   GraphicsConfiguration arg3) throws HeadlessException {
              super(arg0, arg1, arg2, arg3);
              init(arg0);
         private void init(Component c) {
              mOwner = c;
              addComponentListener(this);
              addWindowListener(this);
         public void componentResized(ComponentEvent arg0) {}
         public void componentMoved(ComponentEvent arg0) {}
         public void componentShown(ComponentEvent arg0) {
              doModalOp();
         public void componentHidden(ComponentEvent arg0) {
              doModalOp();
         public boolean isParentOnly() {
              return mParentOnly;
         public void setParentOnly(boolean b) {
              mParentOnly = b;
         public void setModal(boolean b) {
              super.setModal(b);
              //mModal = b;
              doModalOp();
         private void doModalOp() {
              if (mOwner != null) {
                   mOwner.setEnabled(!super.isModal() || !isVisible());
         public boolean isModal() {
              return super.isModal() && !mParentOnly;
    //     public boolean isParentModel() {
    //          return mModal;
         public void windowOpened(WindowEvent arg0) {
              doModalOp();
         public void dispose() {
              //setVisible(false);
              //doModalOp();
              if (mOwner != null) {
                   mOwner.setEnabled(true);
              removeComponentListener(this);
              removeWindowListener(this);
              super.dispose();
         public void pack() {
              super.pack();
              addListeners();
         private boolean addListeners() {
              WindowListener[] listeners = this.getWindowListeners();
              if (listeners != null) {
                   for (int i = 0; i < listeners.length; i++) {
                        if (listeners[i] == this) return false;
              addComponentListener(this);
              addWindowListener(this);
              return true;
         public void show() {
              super.show();
              addListeners();
         public void show(boolean b) {
              super.show(b);
              addListeners();
         public void windowClosing(WindowEvent arg0) {}
         public void windowClosed(WindowEvent arg0) {
              doModalOp();
         public void windowIconified(WindowEvent arg0) {}
         public void windowDeiconified(WindowEvent arg0) {}
         public void windowActivated(WindowEvent arg0) {}
         public void windowDeactivated(WindowEvent arg0) {}
         public static void main(String[] args) {
              JFrame jf1 = new JFrame("1"), jf2 = new JFrame("2");
              final ModalOnParentDialog d = new ModalOnParentDialog(jf1, "3");
              d.setModal(true);
              d.setParentOnly(true);
              JButton b = new JButton("Show");
              b.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent ae) {
                        d.setVisible(!d.isVisible());
              jf1.setBounds(0,0,40,40);
              jf1.setDefaultCloseOperation(jf1.DISPOSE_ON_CLOSE);
              jf2.setDefaultCloseOperation(jf2.DISPOSE_ON_CLOSE);
              d.setDefaultCloseOperation(d.DISPOSE_ON_CLOSE);
              jf2.setBounds(40,40,40,40);
              jf2.add(b);
              d.setBounds(80,80,40,40);
              jf1.setVisible(true);
              jf2.setVisible(true);
              d.setVisible(true);
    }

Maybe you are looking for

  • Airport no longer works after update.

    I occasionally use my imac as a base station to connect a laptop to the internet via airport. Since installing the recent security updates my laptop can no longer see a network (I also connect via a pda and this no longer works either). Airport indic

  • HP LaserJet P2055dn

    Hi, My problem is this: When printing to HP P2055dn (network printer) from pdf document and power point documents that have more pages (documents are not large in size), printer prints first two pages then stops (like he's having a tea break hehe) fo

  • Contact picture not saved correctly

    When I edit or add a picture to a contact it is not saved as edited. I usually get the left lower portion of the edit blown up. Any work arounds or solutions. Thanks

  • Why are there two full size copies of my pictures on my hard drive?

    My hard drive contains one full size copy in each of these two folders: "Home->Pictures" "Home->Pictures->iPhoto Library->Originals" I come to understand that the iPhoto Library file is the main file that iPhoto recognizes. However, I would like to a

  • Forward to Tiles definition from faces-config.xml

    Hello, can anybody explain me how to make a forward to a Tiles definition from the faces-config.xml file? I�m using MyFaces with Tomahawk and Tiles, but I also tried with Jsf without myFaces and lots of combinations but I can�t fix it. Here is my fac