SwiXML - JTree LazyLoad Expand listener issue

Hi,
Iam creating UI using SwiXML which is based on Swing. Able to create a Tree structure using the below code logic. Issue is, unable to invoke expansion listener method.
It would be great, if you can suggest on this issue.
We have configured Java file in a xml file as below
<scrollpane id="neh_task_tree">
<gridbagconstraints insets="5,5,5,5" gridx="1" gridy="1" weightx="1.0"
weighty="1.0" fill="GridBagConstraints.BOTH"
anchor="GridBagConstraints.WEST"/>
<tree id="neh_prod_activity_task_tree" initclass="com.oracle.appsfdoc.fusion.sos.LazyLoadDemo" Font="ARIAL-BOLD-14" VisibleRowCount="5"/>
</scrollpane>
public class LazyLoadDemo extends DefaultTreeModel {
        JTree tree;
        final TreeNode root;
        public LazyLoadDemo() {
            super(new DefaultMutableTreeNode("ROOT"));
            System.out.println("LazyLoadDemo");
            root = (DefaultMutableTreeNode) super.getRoot();
            createNodes(root);
            tree = new JTree((TreeNode)root);
            //tree.addTreeExpansionListener(this);
            //tree.addTreeWillExpandListener(this);
            System.out.println("BEFORE HANDLER");
            tree.addTreeExpansionListener(new TreeExpansionListener(){
                        @Override
                        public void treeCollapsed(TreeExpansionEvent e)
                            System.out.println("Node collapsed at " + e.getPath() + "\n");
                        @Override
                        public void treeExpanded(TreeExpansionEvent e)
                            System.out.println("Node expanded at " + e.getPath()+ "\n");
                    });            System.out.println("AFTER HANDLER");
    private void treeForumReviewTreeExpanded(javax.swing.event.TreeExpansionEvent evt) {//GEN-FIRST:event_treeForumReviewTreeExpanded
    // TODO add your handling code here:
    System.out.println("treeForumReviewTreeExpanded");
    /*DefaultMutableTreeNode node = (DefaultMutableTreeNode) evt.getPath().getLastPathComponent();
            ForumView fv = (ForumView) node.getUserObject();
        refreshReview(fv);*/
        private TreeNode createNodes(TreeNode root) {
                    DefaultMutableTreeNode grandparent;
                    DefaultMutableTreeNode parent;
                    DefaultMutableTreeNode child;
                    DefaultMutableTreeNode temp = (DefaultMutableTreeNode)root;
                    root = new DefaultMutableTreeNode("San Francisco");
                    grandparent = new DefaultMutableTreeNode("Potrero Hill");
                    temp.add(grandparent);
                    parent = new DefaultMutableTreeNode("Restaurants");
                    grandparent.add(parent);
                    child = new DefaultMutableTreeNode("Thai Barbeque");
                    parent.add(child);
                    child = new DefaultMutableTreeNode("Goat Hill Pizza");
                    parent.add(child);
                    parent = new DefaultMutableTreeNode("Grocery Stores");
                    grandparent.add(parent);
                    child = new DefaultMutableTreeNode("Good Life Grocery");
                    parent.add(child);
                    child = new DefaultMutableTreeNode("Safeway");
                    parent.add(child);
                    grandparent = new DefaultMutableTreeNode("Noe Valley");
                    temp.add(grandparent);
                    parent = new DefaultMutableTreeNode("Restaurants");
                    grandparent.add(parent);
                    child = new DefaultMutableTreeNode("Hamano Sushi");
                    parent.add(child);
                    child = new DefaultMutableTreeNode("Hahn's Hibachi");
                    parent.add(child);
                    parent = new DefaultMutableTreeNode("Grocery Stores");
                    grandparent.add(parent);
                    child = new DefaultMutableTreeNode("Real Foods");
                    parent.add(child);
                    child = new DefaultMutableTreeNode("Bell Market");
                    parent.add(child);
                    return root;
Thanks in advance,
Samba.

Can some one help on this issue? Why Iam unable to invoke expand/collapse listeners with SwiXML?
Thanks,
Samba.

Similar Messages

  • Making a node in JTree non expandable

    How do I make a node in a JTree non expandable. The nodes in the tree are DefaultMutableTreeNode. I have a tree with root R. It has children ch1, ch2, ch3. Nodes ch1 etc also have X number of children. What I want is if I click (either double click on the node or single clicking on the '+') on either of the child nodes ch1, ch2 and ch3 to disable expansion i.e. stop the tree collapsing beyond those nodes. I have tried tree.setExpandsSelectedPaths(false) and others but it still doesnt work. Any help much appreciated. Thanx.

    Thanx Jeanette, that is exactly!! what I'm looking for. Much appreciated.

  • Expanding box issue I.E. 6

    Hi, Can anyone tell me how to fix expanding box issues in I.E. 6. When viewed in I.E. 6 The text in my main content area expands causing the box to expand and jump down to the bottom of the page. Does anyone have a hack for this? Thanks
    My link is http://www.innervisionfilms.tv
    My CSS code for the page is
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Welcome to Innervision Films Royalty Free Stock Footage, post production, motion graphics and photography gallery</title>
    <style type="text/css">
    <!--
    a:hover {
        color: #FFFFFF;
        text-decoration: underline;
    body  {
        background: #666666;
        margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
        padding: 0;
        text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
        color: #000000;
        font-family: Verdana, Arial, Helvetica, sans-serif;
        font-size: 100%;
    .twoColFixRtHdr #container {
        width: 780px;
        margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
        border: 1px solid #66CCFF;
        text-align: left; /* this overrides the text-align: center on the body element. */
        background-color: #000000;
    .twoColFixRtHdr #header {
        padding: 0 0px 0 0px;  /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */
        background-color: #000000;
        font-size: 1px;
    .twoColFixRtHdr #header h1 {
        margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse - an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */
        padding: 0px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
    .twoColFixRtHdr #sidebar1 {
        float: right; /* since this element is floated, a width must be given */
        width: 250px;
        background-color: #000000;
        font-family: Verdana;
        font-size: 1px;
        color: #66CCFF;
        background-image: none;
        padding-top: 0px;
        padding-right: 10px;
        padding-bottom: 10px;
        padding-left: 10px;
        border-top-width: 1px;
        border-right-width: 0px;
        border-bottom-width: 1px;
        border-left-width: 1px;
        border-top-style: none;
        border-right-style: none;
        border-bottom-style: none;
        border-left-style: none;
        border-top-color: #66CCFF;
        border-right-color: #66CCFF;
        border-bottom-color: #66CCFF;
        border-left-color: #66CCFF;
    .twoColFixRtHdr #mainContent {
        background-color: #000000;
        font-family: Verdana;
        font-size: 11px;
        color: #66CCFF;
        margin-top: 0;
        margin-right: 250px;
        margin-bottom: 0;
        margin-left: 0;
        padding-top: 0px;
        padding-right: 0px;
        padding-bottom: 20px;
        padding-left: 15px;
    .twoColFixRtHdr #footer {
        padding-top: 0;
        padding-right: 0px;
        padding-bottom: 0;
        padding-left: 0px;
        background-color: #000000;
    .twoColFixRtHdr #footer p {
        margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */
        padding: 0px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
    .fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
        float: right;
        margin-left: 8px;
    .fltlft { /* this class can be used to float an element left in your page */
        float: left;
        margin-right: 8px;
    .clearfloat { /* this class should be placed on a div or break element and should be the final element before the close of a container that should fully contain a float */
        clear:both;
        height:0;
        font-size: 1px;
        line-height: 0px;
    -->
    </style>
    <!--[if IE 5]>
    <style type="text/css">
    /* place css box model fixes for IE 5* in this conditional comment */
    .twoColFixRtHdr #sidebar1 { width: 220px; }
    </style>
    <![endif]--><!--[if IE]>
    <style type="text/css">
    /* place css fixes for all versions of IE in this conditional comment */
    .twoColFixRtHdr #sidebar1 { padding-top: 0px; }
    .twoColFixRtHdr #mainContent { zoom: 1; }
    /* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
    </style>
    <![endif]-->

    Johns right, I would not worry too much about IE6 but if it is a necessity a couple of minor css amends will get it working in that browser.
    Add to your .twoColFixRtHdr #mainContent css
    float: right;
    width: 494;
    And then comment out /* */ the below also in the .twoColFixRtHdr #mainContent css
    /* margin-right: 250px; */

  • Reloading JTree and expanding last selected rows

    I'm working on an applet that loads the nodes of a JTree from a database. When a node is selected, its data are displayed in a different panel. When a "reload" button is clicked, all the nodes in the JTree are removed except for the root node, and the JTree is recreated from the database. I'm try to get the new JTree to expand and select the rows that were selected before reloading, but I can't get this to work.
    Before removing the nodes, I save the currently selected row numbers using JTree.getSelectionRows(). After recreating the JTree, I re-select the previously selected rows and try to expand them:
    // tree is the name of the JTree.
    tree.setSelectionRows(selected);
    for (int i= 0; i < Array.getLength(selected); i++) {
                System.out.println("selected row: " + selected);
    tree.scrollRowToVisible(selected[i]);
    tree.updateUI();
    The previously selected rows do not automatically become visible in the resulting JTree. I also tried using tree.expandRow instead of scrollRowToVisible, with the same results.
    Any help would be appreciated!

    I think part of your problem is this...
    When you repopulate your tree, and only the root node is visible, getRowCount() will return 1. When you call expandRow(x) where x > 1, the result is basically a no-op (nothing happens). This is the correct behavior for these methods.
    In other words, I think you need to come up with a whole new algorithm.
    Let's assume you have a tree that looks like...
    Node 0
    |__________Node 0.0
    |               |__________Node 0.0.0
    |
    |__________Node 0.1
    |__________Node 0.2
                     |__________Node 0.2.0
                     |__________Node 0.2.1Try this...
    //save the current open/closed state of the tree and selection state
    Vector<Integer> selectedRows = new Vector<Integer>();
    Vector<Boolean> openClosed = new Vector<Boolean>(tree.getRowCount());
    openClosed.setSize(tree.getRowCount());
    for( int i = 0; i < tree.getRowCount(); ++i )
       if( tree.isExpanded(i) )
            openClosed.set(i,true);
       else
            openClosed.set(i,false);
       if( tree.isRowSelected(i) )
           selectedRows.add(i);
    //at this point we have all the needed state information
    // rebuild to tree from the database now
    // then do this
    int rowIndex = 0;
    while( rowIndex < tree.getRowCount() )
        if( openClosed.getElementAt(rowIndex).booleanValue() == true )
             tree.expandRow(rowIndex);
             // note that if a row gets expanded, getRowCount() will increase
        ++rowIndex;
    // at this point, your tree should be expanded exactly as it was before the reload
    int[] rows = new int[selectedRows.size()];
    int index = 0;
    for( Integer i: selectedRows )
       rows[index++] = i;
    tree.setSelectionRows(rows);
    // at this point the tree should have the same selection as before the reload.I hope this helps. Please reward me the Duke Dollars if it does. Not awarding the Duke Dollars kills the system (which is an honor system). A dead system hurts us all.
    P.S. I guess I never referenced the little tree I drew. Oh well. It looks great doesn't it?

  • Problem with JTree while expanding/collapsing a node

    Hi,
    I'm using a JTree for displaying the file system.
    Here, i want that whenever a node get expanded,
    it should show the latest files/directories under that node.
    Now, what i'm doing is, getting all the files/dir's using files.listFiles(),
    under that node and then creating a new node and adding it to parent (all in expand() method).
    But, now the problem is, while doing this whenever the parent node get expanded its adding all the latest files/dirs into the previous instance
    resulting the same file/dir is displaying twice,thrice.. and so on, as that node is expanded and collapsed.
    i tried removeAllChildren() in collapse() method but then that node is notexpanding at all .
    Can anybody help me please...
    i got stuck b'coz of this only.
    Thanks...

    Now what i'm doing is every time expand() get called,
    i'm comparing all the children of that node in the
    current instance with all the children present in the
    file system (because there is a possibility that some
    file/dir may be added or deleted)
    is this the right wy or not?it certainly is not wrong, but as usual, there is more than 1 way to implement this...
    b'coz right now i'm getting all the files/dirs that
    are newly added but facing some problem if somebody
    deletes a file/dir.
    i'm still trying to get the solutionthen you should not just compare all the children of the node with the files/dirs but also the other way round. compare the files/dirs with the children to determine if the file/dir still exists and if not remove the node.
    or you could check if the file which a node represents exists and if not remove the node.
    thomas

  • Problem with JTree in expanded mode?

    Hi I have a JTree and I have added few nodes to it. Now when i run my program it is displaying all the nodes in the expanded mode. but at some point of time i need to add few more nodes. when i am am adding nodes to the root node when the tree in expanded mode the newly added nodes are not visible. They are not getting added. what could be the problem? how do i add nodes to the tree when in expanded mode as well as remove few nodes when in expanded mode?
    My code is as follows.
    import java.awt.BorderLayout;
    import javax.swing.JDesktopPane;
    import javax.swing.JFrame;
    import javax.swing.JScrollPane;
    import javax.swing.JTree;
    import javax.swing.tree.DefaultMutableTreeNode;
    public class Main extends JFrame{
         private DefaultMutableTreeNode top;
         public JTree mainTree;
         public Main(){
              super();
              JDesktopPane dp=new JDesktopPane();          
              dp.setLayout(new BorderLayout());
              top =new DefaultMutableTreeNode("All Active Nodes");                    
              mainTree=new JTree(top);          
              JScrollPane mtsp=new JScrollPane(mainTree);
              dp.add(mtsp,BorderLayout.CENTER);
              this.setContentPane(dp);          
              this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);          
              this.setSize(300, 550);
              this.setVisible(true);
         public static void main(String[]args)throws Exception{
              Main as=new Main();
              DefaultMutableTreeNode top=as.getTop();
              DefaultMutableTreeNode node=new DefaultMutableTreeNode("murali");
              top.add(node);
              as.mainTree.expandRow(0);          
              Thread.sleep(10000);
              System.out.println("there");
              DefaultMutableTreeNode node1=new DefaultMutableTreeNode("murali12");
              top.add(node1);
          * @return the top
         public DefaultMutableTreeNode getTop() {
              return top;
    }

    I got the solution. The solution is to invoke nodesWereInserted(TreeNode node, int[] childIndices) this on treeModel after adding nodes are removing nodes.

  • Oracle 8i listener issue:  TNS-01168: Cannot allocate memory

    We have a loader application coded in perl/c which connects to DB to load data from flat files. Whenever we have multiple such loader programs running, the listener dies and loading stops. The listener.log is around 2GB. I opened the loag and got following details:
    Listener Log file (2GB file):
    -- File begining ---
    ECHO is on.
    17-FEB-2005 20:40:20 * service_update * scanview * 0
    17-FEB-2005 20:50:20 * service_update * scanview * 0
    17-FEB-2005 21:00:10 * (CONNECT_DATA=(SERVICE_NAME=scanview)(CID=(PROGRAM=C:\Perl\bin\perl.exe)(HOST=AZSACTAPP107)(USER=grp_scanview))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.2.164.17)(PORT=2659)) * establish * scanview * 0
    19-FEB-2005 03:14:26 * service_update * scanview * 0
    19-FEB-2005 04:00:09 * (CONNECT_DATA=(SERVICE_NAME=scanview)(CID=(PROGRAM=C:\Perl\bin\perl.exe)(HOST=AZSACTAPP107)(USER=grp_scanview))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.2.164.17)(PORT=2486)) * establish * scanview * 0
    19-FEB-2005 04:04:27 * service_update * scanview * 0
    19-FEB-2005 04:07:07 * (CONNECT_DATA=(SERVICE_NAME=scanview)(CID=(PROGRAM=C:\Perl\bin\perl.exe)(HOST=AZSACTAPP107)(USER=grp_scanview))) * (ADDRESS=(PROTOCOL=tcp)(HOST=10.2.164.17)(PORT=2644)) * establish * scanview * 0
    19-FEB-2005 04:18:21 * 51
    Error Started at Line #: 2096
    19-FEB-2005 04:18:21 * 51
    NL-00051: internal error code, arguments: [302], [1], [], [], [], [], []
    Above error continued till Line #: 913372
    19-FEB-2005 04:21:15 * 1168
    TNS-01168: Cannot allocate memory
    19-FEB-2005 06:05:30 * 1168
    TNS-01168: Cannot allocate memory
    TNSLSNR for 32-bit Windows: Version 8.1.7.4.0 - Production on 19-FEB-2005 11:13:49
    -- File ended ---
    Is there a known bug and if so what is the resolution? Will upgrading to Net 9i help?
    Let me know if anyone has faced such issue and the resolution.
    Thanks
    Satish

    alll listeners show the TNS-12531 cannot allocate memory message in the listener.log.Only a single listener is required.
    How many listeners run on this system & why more than 1?
    oerr tns 12531
    12531, 00000, "TNS:cannot allocate memory"
    // *Cause:  Sufficient memory could not be allocated to perform the desired
    // activity.
    // *Action:  Either free some resource for TNS, or add more memory to the
    // machine. For further details, turn on tracing and reexecute the operation.

  • Oracle 11g listener issue

    Hello,
    I have installed oracle 11g on windows 7. Installation and database creation was successfull but after creating database listener should automatically up and start
    but i am not able to listener in the services window and not able to conntest database using connect string.
    I tried to create new listener using netca but it is hanging ..
    I have downloaded this software from oracle website.
    any idea where can i check to resolve this issue.

    944589 wrote:
    Hi,
    I had the same problem as the OP, and I followed these instructions to try and see which error was raised by the listener when it started.
    Weird thing is, after deleting the listener.ora file and restarting the listener with the "lsnrctl start" command, it worked !
    The only additional thing I did is (as written in some obscure Oracle documentation) create a loopback network adapter (because my PC is DHCP-based).
    Now I have rebooted my PC, and it still works. Go figure...
    I hate Oracle. They shouldn't have been authorized to buy back Sun. My prediction is that Java is going the same way as their DB : it's gonna be a mess... :(Just because you can't make things work and find the documentation obscure doesn't mean things don't work. Its not Access with point-click you see!
    Aman....

  • JTree remove expand/collapse cross button...??

    Hi all,
    I have forbidden tree collapsing (by default it is fully expanded),
    and I want to remove expand/collapse cross buttons that actually are used to expand/collapse tree nodes.
    Is it possible and can anyone give me advice how i can do this.
    Thanks in advance.

    I tried extending the BasicTreeUI to return nulls for the collapsed and exapnded icons as shown in the code below. For the most part, it works great! However, one can still expand/collapse the tree by clicking on the point where the vertical and horizontal lines connect.
    I guess some one else will take over from here.
    import java.awt.BorderLayout;
    import javax.swing.Icon;
    import javax.swing.JFrame;
    import javax.swing.JScrollPane;
    import javax.swing.JTree;
    import javax.swing.WindowConstants;
    import javax.swing.plaf.basic.BasicTreeUI;
    import javax.swing.tree.DefaultMutableTreeNode;
    public class Temp extends JFrame {
         private JTree tree = null;
         public Temp() {
              super("Test");
              setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
              initComponents();
              pack();
              setVisible(true);
         private void initComponents() {
              DefaultMutableTreeNode rootNode =
                   new DefaultMutableTreeNode("User Preferences", true);
              DefaultMutableTreeNode connectionSettingsNode =
                   new DefaultMutableTreeNode("Connection Settings", true);
              DefaultMutableTreeNode sslNode =
                   new DefaultMutableTreeNode("SSL", false);
              DefaultMutableTreeNode firewallNode =
                   new DefaultMutableTreeNode("Firewall", false);
              DefaultMutableTreeNode securityNode =
                   new DefaultMutableTreeNode("Security", true);
              DefaultMutableTreeNode serverCertificatesNode =
                   new DefaultMutableTreeNode("Server Certificates", false);
              DefaultMutableTreeNode clientCertificatesNode =
                   new DefaultMutableTreeNode("Client Certificates", false);
              connectionSettingsNode.add(sslNode);
              connectionSettingsNode.add(firewallNode);
              securityNode.add(serverCertificatesNode);
              securityNode.add(clientCertificatesNode);
              rootNode.add(connectionSettingsNode);
              rootNode.add(securityNode);
              tree = new JTree(rootNode);
              JScrollPane scroller = new JScrollPane(tree);
              getContentPane().add(scroller, BorderLayout.CENTER);
              tree.setUI(new MyTreeUI());
              //tree.setShowsRootHandles(false);
         public static void main(String args []) {
              new Temp();
         class MyTreeUI extends BasicTreeUI {
              public Icon getCollapsedIcon() {
                   return null;
              public Icon getExpandedIcon() {
                   return null;
    }Sai Pullabhotla

  • Jtree - how do I make a Jtree to expand fully

    I am creating a JTree dynamicly and I want the JTree to show up at first fully expand. I am trying to use the expandPath method by I have a problem with the TreePath parameter that it needs to receive. How do I do it?
    Thanks

    I believe the default renderer calls toString() on the node which for DefaultMutableTreeNode calls toString() on the userObject in the node.
    I'm assuming your nodes are printing out what looks like a bunch of garbage like "java.lang.Object$712cfe" (which is actually the id of the object).
    You can do 1 of 3 things (I think):
    1. Define your own toString() in your node class to return whatever you want.
    2. Overwrite the toString() in the object you are using to create the tree node.
    3. Write a tree renderer to return the value you want.

  • JTree, branch expanding and TreeWillExpandEvent

    You can expand a branch in JTree component either by double clicking the node's name or by single clicking the branch expanding icon (next to node icon). How can I determine which way was used when receiving the TreeWillExpandEvent ? It seem that it does not provide this information

    It looks to me like TreeWillExpandEvent does not retain the mouse click information from the underlying event that caused the expansion. Looks like you would need to provide a custom UI and event mechanism to propagate that information.
    Mitch Goldstein

  • Setting JTree as expandable

    I have a JTree and it has Parent nodes and corresponding child nodes. I edit the values of child and when i refresh the tree, I need to set the edited node in the expanded mode. The expandPath() does not seem to be working. Is there any way of making it expandable during editing???

    Hello,
    The expandPath()-method works fine, if you call it with the right TreePath. Make sure that the TreePath is correct (with root as first element), or use the method expandRow(int).
    Hope it helps
    Freddy

  • Image expand resizing issue

    http://www.kowalskidesign.com/source/normalFlash.html
    Hello,
    I'm having problems resizing the expanded view. This is when you click on a thumb and the image enlarges with a description.
    I've tried changing lines 204-205 (highlighted in bold in code below)
    '// extends mask producing fully visible image' changing:-
    width: (2 * MWIDTH),  to width: 550    and the same with the height but i get mixed results.
    If anyone could give me some pointers it would be very much appreciated.
    The link is above. Here is the code:-
    // Grid Expandable Gallery
    // (C)RimV - www.mymedia-art.com - [email protected]
    // FLASH LIB
    import flash.geom.*;
    import flash.display.BitmapData;
    import flash.filters.DropShadowFilter;
    // FUSE KIT
    import com.mosesSupposes.fuse.*;
    import com.mosesSupposes.fusefx.*;
    import com.endologik.fusefx.*;
    // DYNAMIC REGISTRATION
    import com.darronschall.DynamicRegistration;
    //______________________________________________ PARAMETERS
    // Gallery characteristic
    var strokeThickness:Number = 2;
    var rows:Number = 4;
    var columns:Number = 5;
    var bWidth:Number = 700;
    var bHeight:Number = 500;
    var speed:Number = 0.5;
    var layerAlpha:Number = 70;
    // Roll over / roll out effec
    var Effect:Array = ["None", "brightness", "photo flash", "grayscale"];
    var effectID:Number = 2;
    // data path
    var styleSheet:String = "css/styles.css";
    var xmlPath:String = "normalFlash.xml";
    //______________________________________________ VARIABLES
    // Gallery dimension
    var SWIDTH:Number;
    var SHEIGHT:Number;
    var MWIDTH:Number;
    var MHEIGHT:Number;
    var nWidth:Number;
    var nHeight:Number;
    var TOTAL:Number;
    // Movieclip dimension
    var maskContainer:MovieClip = new MovieClip();
    var layer:MovieClip = new MovieClip();
    var current:MovieClip = new MovieClip();
    var descriptionClip:MovieClip = new MovieClip();
    var preloader:Array = new Array();
    var maskArray:Array = new Array();
    var image:Array = new Array();
    var position:Array = new Array();
    var captionClip:MovieClip = new MovieClip();
    // misc
    var xmlData:XML = new XML();
    var link:Array = new Array();
    var description:Array = new Array();
    var caption:Array = new Array();
    var count:Number = 0;
    var firstLoaded:Boolean = true;
    var mWidth:Number;
    var mHeight:Number;
    var dX, dY:Number;
    //______________________________________________ MAIN
    initGallery();
    function initGallery():Void
    // Initialize ZigoEngine
    ZigoEngine.register(PennerEasing, FuseItem, FuseFMP);
    FuseFX.register(ColorFX);
    ZigoEngine.OUTPUT_LEVEL = 0;
    // hide display clip
    display._visible = false;
    // Global reference
    _global.base = this;
    // Gallery dimension
    SWIDTH = Stage.width;
    SHEIGHT = Stage.height;
    base = this;
    // stage resize listener
    Stage.scaleMode = "noScale";
        Stage.align = "TL";
    var stageResize:Object = new Object();
    Stage.addListener(stageResize);
    stageResize.onResize = onStageResize;
    // start building gallery
    buildGallery();
    dX = -(Stage.width - bWidth) * .5;
    dY = -(Stage.height - bHeight) * .5;
    function onStageResize():Void
    base._x = (Stage.width - bWidth) * .5 + dX;
    base._y = (Stage.height - bHeight) * .5 + dY;
    function buildGallery():Void
    // Load XML
    loadXML();
    // Load StyleSheet
    loadStyleSheet();
    // Load XML
    function loadXML():Void
    xmlData.ignoreWhite = true;
    xmlData.onLoad = loadData;
    xmlData.load(xmlPath);
    // Load image and save data
    function loadData(loaded:Boolean):Void
    if (loaded)
    var data:Array = xmlData.firstChild.firstChild.childNodes;
    TOTAL = data.length;
    createMaskContainer();
    for (var i:Number = 0; i < TOTAL; i++)
    var dat:Array = data[i].childNodes;
    caption[i] = dat[1].attributes.content;
    description[i] = dat[2].firstChild.nodeValue;
    link[i] = dat[3].attributes.src;
    // Image data
    image[i] = new MovieClip();
    position[i] = new Object();
    loadImage(dat[0].attributes.src, i);
    // Load image
    function loadImage(src:String, index:Number):Void
    image[index] = this.createEmptyMovieClip("image" + index, index + 1000);
    // create movie clip loader listener
    var mylistener:Object = new Object();
    // update progress
    mylistener.onLoadProgress = function(image:MovieClip, byteLoaded:Number, byteTotal:Number):Void
    var num:Number = Math.round(byteLoaded / byteTotal * 100);
    _global.base.preloader[index].percent.text = num;
    // Load completed initialize data
    mylistener.onLoadInit = function(target:MovieClip):Void
    // remove preloader
    preloader[index].removeMovieClip();
    //set up necessary component and calculate data
    // Setting center registration
    DynamicRegistration.initialize(target);
    target.setRegistration(target._width / 2, target._height / 2);
    var r:Number = Math.floor(index / columns);
    var c:Number = index % columns;
    var deltaX:Number = (SWIDTH - bWidth) / 2;
    var detalY:Number = (SHEIGHT - bHeight) / 2;
    cover[index]._x = target._x2 = position[index].x = (c + 1) * strokeThickness + c * mWidth + mWidth / 2 + deltaX;
    cover[index]._y = target._y2 = position[index].y = (r + 1) * strokeThickness + r * mHeight + mHeight / 2 + detalY;
    target.xmin = target._x2 - (target._width - mWidth) / 2;
    target.xmax = target._x2 + (target._width - mWidth) / 2;
    target.ymin = target._y2 - (target._height - mHeight) / 2;
    target.ymax = target._y2 + (target._height - mHeight) / 2;
    target.index = index;
    target.xk = speed;
    target.yk = speed;
    target.release = false;
    target.oX = target._x2;
    target.oY = target._y2;
    target.setMask(maskArray[index]);
    maskArray[index].tWidth = (target._width) / (bWidth / MWIDTH);
    maskArray[index].tHeight = (target._height) / (bHeight / MHEIGHT);
    // Apply effect
    switch (Effect[effectID])
    case "brightness": ZigoEngine.doTween(target, ColorFX.BRIGHTNESS, -70, 0);
    break;
    case "grayscale": ZigoEngine.doTween(target, ColorFX.SATURATION, -100, 0);
    break;
    // Setup interactive
    target.onRelease = function():Void
    // unhide image + move to center
    if (!this.release)
    delete this.onEnterFrame;
    this.release = true;
    current = this;
    var index:Number = this.index;
    // extends mask producing fully visible image
    ZigoEngine.doTween({ target:maskArray[index],
    width: (2 * MWIDTH),
    height: (2 * MHEIGHT),
    ease:"easeInQuint",
    time:1,
    func:function():Void
    // display description
    descriptionClip._visible = true;
    descriptionClip.swapDepths(current._parent.getNextHighestDepth());
    descriptionClip.content.htmlText = description[current.index];
    descriptionClip.content._width = current._width - 5;
    descriptionClip.back._height  = descriptionClip.content._height + 10;
    descriptionClip.back._width = descriptionClip.content._width + 5;
    descriptionClip._x = current._x;
    descriptionClip._y = current._y + current._height - descriptionClip._height;
    ZigoEngine.doTween({ target:descriptionClip,
    alpha:100
    // Disable effect
    switch (Effect[effectID])
    case "brightness": ZigoEngine.doTween(this, ColorFX.BRIGHTNESS, 0, 1);
    break;
    case "grayscale": ZigoEngine.doTween(this, ColorFX.SATURATION, 0, 2);
    break;
    // move to center
    var centerX:Number = (SWIDTH - current._width) / 2;
    var centerY:Number = (SHEIGHT - current._height) / 2;
    ZigoEngine.doTween({ target:current,
    x:centerX,
    y:centerY,
    ease:"easeOutQuint"
    // display cover layer
    var depth = this._parent.getNextHighestDepth();
    layer.swapDepths(depth);
    layer._visible = true;
    ZigoEngine.doTween({ target:layer,
    start_alpha:0,
    alpha:layerAlpha
    this.swapDepths(depth + 1);
    // hide caption
    ZigoEngine.doTween({ target:captionClip,
    alpha:0,
    func:function():Void
    captionClip._visible = false;
    else
    // turn back to original position
    ZigoEngine.doTween({ target:descriptionClip,
    alpha:0,
    func:function():Void
    descriptionClip._visible = false;
    ZigoEngine.doTween({ target:this,
    _x2:this.oX,
    _y2:this.oY,
    func:function():Void
    current.release = false;
    ZigoEngine.doTween({ target:maskArray[this.index],
    width: nWidth,
    height: nHeight
    ZigoEngine.doTween({ target:layer,
    alpha:0,
    func:function():Void
    layer._visible = false;
    // Enable effect
    switch (Effect[effectID])
    case "brightness": ZigoEngine.doTween(this, ColorFX.BRIGHTNESS, -70, 1);
    break;
    case "grayscale": ZigoEngine.doTween(this, ColorFX.SATURATION, -100, 2);
    break;
    // animate
    target.onRollOver = function()
    // animate image
    if (!this.release)
    this.onEnterFrame = function():Void
    this._x2 += this.xk;
    this._y2 += this.yk;
    if (this._x2 >= this.xmax || this._x2 <= this.xmin) this.xk =- this.xk;
    if (this._y2 >= this.ymax || this._y2 <= this.ymin) this.yk =- this.yk;
    // effect
    switch (Effect[effectID])
    case "brightness": ZigoEngine.doTween(this, ColorFX.BRIGHTNESS, 50, 1);
    break;
    case "grayscale": ZigoEngine.doTween(this, ColorFX.SATURATION, 0, 2);
    break;
    case "photo flash": ZigoEngine.doTween(this, [ColorFX.BRIGHTNESS,ColorFX.CONTRAST],[100,100], 0);
    ZigoEngine.doTween(this,[ColorFX.BRIGHTNESS,ColorFX.CONTRAST],[0,0], 2);
    break;
    // Show caption
    captionClip.swapDepths(_global.base.getNextHighestDepth());
    captionClip.captionText.text = caption[this.index];
    captionClip._visible = true;
    ZigoEngine.doTween({ target:captionClip,
    x:_xmouse + 10,
    y:_ymouse - 10,
    start_alpha:0,
    alpha:100
    // disable
    target.onRollOut = function():Void
    delete this.onEnterFrame;
    if (!this.release)
    // effect
    switch (Effect[effectID])
    case "brightness": ZigoEngine.doTween(this, ColorFX.BRIGHTNESS, -70, 1);
    break;
    case "grayscale": ZigoEngine.doTween(this, ColorFX.SATURATION, -100, 2);
    break;
    // hide caption
    ZigoEngine.doTween({ target:captionClip,
    alpha:0,
    func:function():Void
    captionClip._visible = false;
    // Fade in image
    ZigoEngine.doTween({ target:target,
    start_alpha:0,
    alpha:100,
    time:3
    // Movie Clip Loader
    var loader:MovieClipLoader = new MovieClipLoader();
    loader.addListener(mylistener);
    loader.loadClip(src, image[index]);
    function createMaskContainer():Void
    // Mask container
    maskContainer = this.createEmptyMovieClip("maskContainer", 100000);
    // Cover layer
    layer = this.attachMovie("layer", "layer", 200000);
    layer._width = SWIDTH;
    layer._height = SHEIGHT;
    layer._x = SWIDTH / 2;
    layer._y = SHEIGHT / 2;
    layer._alpha = layerAlpha;
    layer.useHandCursor = false;
    layer.onRelease = function():Void { };
    layer._visible = false;
    // attach mask clip and place in proper position
    var k:Number = 0;
    for (var i:Number = 0; i < rows; i++)
    for (var j:Number = 0; j < columns; j++)
    maskArray[k] = new MovieClip();
    maskArray[k] = maskContainer.attachMovie("mask", "mask" + k, k);
    maskArray[k]._x = (j + 1) * strokeThickness + j * 50 + 25;
    maskArray[k]._y = (i + 1) * strokeThickness + i * 50 + 25;
    k++;
    DynamicRegistration.initialize(maskContainer);
    maskContainer.setRegistration(maskContainer._width / 2, maskContainer._height / 2);
    maskContainer._x2 = SWIDTH / 2;
    maskContainer._y2 = SHEIGHT / 2;
    MWIDTH = maskContainer._width;
    MHEIGHT = maskContainer._height;
    maskContainer._visible = false;
    var deltaX:Number = bWidth / MWIDTH;
    var deltaY:Number = bHeight / MHEIGHT;
    maskContainer._xscale2 = deltaX * 100;
    maskContainer._yscale2 = deltaY * 100;
    nWidth = 50 + strokeThickness * (deltaX - 1) / deltaX;
    nHeight = 50 + strokeThickness * (deltaY - 1) / deltaY;
    mWidth = nWidth * deltaX;
    mHeight = nHeight * deltaY;
    for (var i:Number = 0; i < TOTAL; i++)
    maskArray[i]._width = nWidth;
    maskArray[i]._height = nHeight;
    // attach preloader
    preloader[i] = this.attachMovie("preloader", "preloader" + i, i + 8000);
    preloader[i]._x = (maskArray[i]._x / MWIDTH) * (maskContainer._width) + maskContainer._x;
    preloader[i]._y = (maskArray[i]._y / MHEIGHT) * (maskContainer._height) + maskContainer._y;
    // Attach caption
    captionClip = this.attachMovie("caption", "captionClip", 99999);
    captionClip._visible = false;
    function stopMoving():Void
    for (var i:Number = 0; i < TOTAL; i++) delete image[i].onEnterFrame;
    function loadStyleSheet():Void
    // Attach Description Clip
    descriptionClip = this.attachMovie("description", "descriptionClip", 300000);
    descriptionClip.content.autoSize = true;
    descriptionClip._visible = false;
    descriptionClip._alpha = 0;
    var myStyle:TextField.StyleSheet = new TextField.StyleSheet;
    myStyle.load(styleSheet);
    myStyle.onLoad = function(loaded:Boolean):Void
    if (loaded)
    _global.base.descriptionClip.content.styleSheet = this;
    target.onEnterFrame = function():Void
    this._x2 += this.xk;
    this._y2 += this.yk;
    if (this._x2 >= this.xmax || this._x2 <= this.xmin) this.xk =- this.xk;
    if (this._y2 >= this.ymax || this._y2 <= this.ymin) this.yk =- this.yk;

    Thanks, for your reply..
    I've corrected it.. Its works as expected in Firefox and Chrome, problem with IE alone
    My question is changing doctype declaration is alone enough for upgrading HTML 4 to 5?
    Previously, i've used is
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    now i changed to <!DOCTYPE html>

  • ODBC-datasource generating ORA-12154 (possible listener issue)

    Hi,
    I am trying to configure ao ODBC-datasoure from a client (using instant client 11.2) to a 11.2g Oracle DB server. The database listener is configured to use a non standard port 1700 in this case.
    There is a firewall between the client and the server which is configured to allow connections to the database server on the specified port, when I use telnet from the client to the server, the connection opens on this port, but when I try to test the odbc-datasource I have configured ig et the error ORA-12154.
    The link below outlines the details of the error:
    http://ora-12154.ora-code.com/
    To the context should be added, that there is no problem to use SQL Plus from a computer behind the firewall to connect to the database server using the TNS name that is being used in the ODBC-datasource.
    I have tried to configure the odbc-datasource using both a tns_names.ora file, and also directly in the odbc-datasource using //[ip address] : [port]/TNS_NAME. Both ways of configuring the odbc-datasource generates the same error. I am currently suspecting that the error might be due to some sort of connection redirection on the part of the tns listener on the database server which triggers the firewall to terminate the connection. Could this be the case?
    Does anyone have any suggestions what this error might be caused by. Any suggestions on how to continue my troubleshooting would also be valueble. Further, what kind of configuration would need to be inplace, on the tns-listener / database server side to make this sort of configuration to work.
    Finally, I should also ask that I have tested the same ODBC-datasource configuration in a test system without any firewall inbetween, and that configuration works fine, so there seems to be no problem with the client software configuration per se.
    Any help is apprichated.
    /Eaglecoth

    Cabelcow wrote:
    I managed to solve this issue myself.
    Since there seems to be some problem locating the server I added "HOSTNAME" to the following line in the SQLNET.ORA file on the server:
    names.directory_path = (HOSTNAME,TNSNAMES)
    This solved the issue by using the following syntax in the ODBC Configuration:
    TNS Service Name: [ip-address]:[port]/[TNS NAME]
    Where the TNS_NAME should be that of the TNS_NAME for the database defined in the TNSNAMES_ORA at the server. Note that this value is case sensetivetnsnames.ora is ONLY used by the client side application. It is the tns complement to the local 'hosts' file. It is used by the CLIENT to resolve an alias (tns net service name) to a host (ultimately an ip), port, and service name. Your assertion that the tns_name should be ... hmm, now that I read that again, are you saying that the tnsnames entry on the client should match the one in the tnsnames file on the server? If so, yes and no. There is no technical requirement that they match. It is simply that it is usually assumed that the one on the server is correct and may be used as a model for what to do on the client. The server - acting as a server - doesn't even use the tnsnames.ora file. It exists on the server only to support any client process that may happen to be running on the same box as the db.
    Maybe this will help you understand the connections
    =================================
    ORA-12154: TNS:could not resolve the connect identifier specified
    This error means one thing, and one thing only. The client could not find the specified entry in the tnsnames.ora file being used.
    As a follow-on to that statement, remember that when you use a dblink, the database in which the link is defined is acting as a client to the database that is the target of the link. So in this case, the tnsnames.ora file on the host of your source should have an entry for your target db, as defined in the db_link.
    And for the umpteenth time ... this error has <b><i><u>NOTHING</u></i></b> to do with the status of a listener. The connection request never got far enough to reach a listener. If anyone tells you to check a listener in response to ora-12154, they are not paying attention, or do not understand how TNS works. This error is the equivalent of not being able to place a telephone call because you don't know the number of the party you want to reach. You wouldn't debug that situation by going to the other guy's house and testing his telephone, or by going to the phone company and testing the switchboard. And you don't debug a ORA-12154 by checking the listener. If I had a top ten list of "Incredibly Simple Concepts (tm)" that should be burned into the brain of everyone who claims to be an Oracle DBA, it would include "ORA-12154 Has Nothing To Do With The Listener".
    =================================
    A couple of important points.
    First, the listener is a server side only process. It's entire purpose in life is to receive requests for connections to databases and set up those connections. Once the connection is established, the listener is out of the picture. It creates the connection. It doesn't sustain the connection. One listener, with the default name of LISTENER, running from one oracle home, listening on a single port, will serve multiple database instances of multiple versions running from multiple homes. It is an unnecessary complexity to try to have multiple listeners or to name the listener as if it belongs to a particular database. That would be like the telephone company building a separate switchboard for each customer.
    Additional notes on the listener: One listener is capable of listening on multiple ports. But please notice that it is the listener using these ports, not the database instance. You can't bind a specific listener port to a specific db instance. Similarly, one listener is capable of listnening on multiple IP addresses (in the case of a server with multiple NICs) But just like the port, you can't bind a specific ip address to a specific db instance.
    Second, the tnsnames.ora file is a client side issue. It's purpose is for address resolution - the tns equivalent of the 'hosts' file further down the network stack. The only reason it exists on a host machine is because that machine can also run client processes.
    Assume you have the following in your tnsnames.ora:
    larry =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = myhost)(PORT = 1521))
        (CONNECT_DATA =
          (SERVICE_NAME = curley)
      )Now, when you issue a connect, say like this:
    $> sqlplus scott/tiger@larrytns will look in your tnsnames.ora for an entry called 'larry'. Finding it, tns sends a request through the normal network stack to (PORT = 1521) on (HOST = myhost) using (PROTOCOL = TCP), asking for a connection to (SERVICE_NAME = curley).
    Where is (HOST = myhost) on the network? When the request gets passed from tns to the next layer in the network stack, the name 'myhost' will get resolved to an IP address, either via a local 'hosts' file, via DNS, or possibly other less used mechanisms. You can also hard-code the ip address (HOST = 123.456.789.101) in the tnsnames.ora.
    Next, the standard networking process delivers the message to port 1521 on myhost. Hopefully, there is a listener on myhost configured to listen on port 1521, and that listener knows about SERVICE_NAME = curley. If so, the listener will spawn a server process to act as the intermediary between your client and the database instance. Communication to the server process will be on a randomly selected available port. At that point the listener is out of the process and continues to user port 1521 to await other connection requests.
    What can go wrong?
    First, there may not be an entry for 'larry' in your tnsnames. In that case you get "ORA-12154: TNS:could not resolve the connect identifier specified" No need to go looking for a problem on the host, with the listener, etc. If you can't place a telephone call because you don't know the number (can't find your telephone directory (tnsnames.ora) or can't find the party you are looking for listed in it (no entry for larry)) you don't look for problems at the telephone switchboard.
    Maybe the entry for larry was found, but myhost couldn't be resolved to an IP address (say there was no entry for myhost in the local hosts file). This will result in "ORA-12545: Connect failed because target host or object does not exist"
    Maybe there was an entry for myserver in the local hosts file, but it specified a bad IP address. This will result in "ORA-12545: Connect failed because target host or object does not exist"
    Maybe the IP was good, but there is no listener running: "ORA-12541: TNS:no listener"
    Maybe the IP was good, there is a listener at myhost, but it is listening on a different port. "ORA-12560: TNS:protocol adapter error"
    Maybe the IP was good, there is a listener at myhost, it is listening on the specified port, but doesn't know about SERVICE_NAME = curley. "ORA-12514: TNS:listener does not currently know of service requested in connect descriptor"
    Third: If the client is on the same machine as the db instance, it is possible to connect without referencing tnsnames and without going through the listener.
    Now, when you issue a connect, say like this:
    $> sqlplus scott/tigertns will attempt to establish an IPC connection to the db instance. How does it know the name of the instance? It uses the current value of the enviornment variable ORACLE_SID. So...
    $> export ORACLE_SID=fred
    $> sqlplus scott/tigerIt will attempt to connect to the instance known as "fred". If there is no such instance, it will, of course, fail. Also, if there is no value set for ORACLE_SID, the connect will fail.
    check executing instances to get the SID
    [oracle@vmlnx01 ~]$ ps -ef|grep pmon|grep -v grep
    oracle    4236     1  0 10:30 ?        00:00:00 ora_pmon_vlnxora1set ORACLE_SID appropriately, and connect
    [oracle@vmlnx01 ~]$ export ORACLE_SID='vlnxora1
    [oracle@vmlnx01 ~]$ sqlplus scott/tiger
    SQL*Plus: Release 10.2.0.4.0 - Production on Wed Sep 22 10:42:37 2010
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing optionsNow set ORACLE_SID to a bogus value, and try to connect
    SQL> exit
    [oracle@vmlnx01 ~]$ export ORACLE_SID=FUBAR
    [oracle@vmlnx01 ~]$ sqlplus scott/tiger
    SQL*Plus: Release 10.2.0.4.0 - Production on Wed Sep 22 10:42:57 2010
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    ERROR:
    ORA-01034: ORACLE not available
    ORA-27101: shared memory realm does not exist
    Linux Error: 2: No such file or directory
    Enter user-name: Now set ORACLE_SID to null, and try to connect
    [oracle@vmlnx01 ~]$ export ORACLE_SID=
    [oracle@vmlnx01 ~]$ sqlplus /scott/tiger
    SQL*Plus: Release 10.2.0.4.0 - Production on Wed Sep 22 10:43:24 2010
    Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.
    ERROR:
    ORA-12162: TNS:net service name is incorrectly specifiedOk, that is how we get from the client connection request to the listener. What about the listener's part of all this?
    The listener is very simple. It's job is to listen for connection requests and make the connection (server process) between the client and the database instance. Once that connection is made, the listener is out of the picture. If you were to kill the listener, all existing connections would continue. The listener is configured with the listener.ora file, but if that file doesn't exist, the listener is quite capable of starting up with all default values. One common mistake with the listner configuration is to specify "HOST=localhost" or "HOST=127.0.01". This is a NONROUTABLE ip address. LOCALHOST and ip address 127.0.0.1 always mean "this machine on which I am sitting". So, all computers are known as "localhost" or "127.0.0.1". If you specify this address, the listener will only be capable of receiving requests from the machine on which it is running. If you specified that address in your tnsnames file - on a remote client machine - the request would be routed to the machine on which the requesting client resides. Probably not what you want.
    =====================================

  • Cache Listener Issue

    How can one invoke multiple listeners listening to the same cache simultaneously with multiple events being triggered ?
    To explain my question in a more clear manner I wrote a small Helloworld-Listener program.
    public class multipleListenersMDB implements MessageListener {
    public void onMessage(Message message) {
    // TODO Auto-generated method stub
    NamedCache listenerCache = CacheFactory.getCache("listenerCache");
    listenerCache.addMapListener((MapListener) new CacheListener(), "1", false);
    listenerCache.addMapListener((MapListener) new CacheListener(), "2", false);
    listenerCache.addMapListener((MapListener) new CacheListener(), "3", false);
    listenerCache.put("1", "1-RexUpdated");
    listenerCache.put("2", "2-RexUpdated");
    listenerCache.put("3", "3-RexUpdated");
    CacheListener
    =========
    public class CacheListener extends AbstractMapListener{
         private static Logger logger = Logger.getLogger(CacheListener.class.getName());;
         public void entryInserted(MapEvent Event) {
              String keyValue = (String) Event.getNewValue();
              int delay = 20000;
              long stopTime;
              long startTime = stopTime = System.currentTimeMillis();
              System.out.println("Value:" + keyValue + " startTime:" + startTime + " millis");
              while (stopTime - startTime < delay) {
                   stopTime = System.currentTimeMillis();
              System.out.println("Value:" + keyValue + " exitTime:" + stopTime + " millis");
    Here is the output of this program
    Value:1-RexUpdated startTime:1320379443254 millis
    Value:1-RexUpdated exitTime:1320379463254 millis
    Value:2-RexUpdated startTime:1320379463254 millis
    Value:2-RexUpdated exitTime:1320379483254 millis
    Value:3-RexUpdated startTime:1320379483254 millis
    Value:3-RexUpdated exitTime:1320379503254 millis
    What I had expected to see was basically Value:1-Rex, Value:2-Rex and Value:3-Rex listeners to be invoked not one after the other but in parallel.
    If you see curently Listener1 for 1-Rex is invoked followed by Listener2 for 2-Rex and then followed by Listener for 3-Rex.
    Perhaps this displays my issue clearly and you will be able to use your magic powers to help me.
    PS: I have multiple threadcount for the cache configured already
    Thanks :)
    Edited by: 807103 on Nov 4, 2011 6:06 AM
    Edited by: 807103 on Nov 4, 2011 9:54 AM

    Hi Reon
    The results you are seeing are correct. You can use a listener as a "client" listener or as a backing map listener. Normally, applications only use client listeners where cache events are delivered to the client listener regardless of data location. As you observed, the backing map listener is invoked in the JVM where the data (partition) resides. Backing map listeners are considered and advanced feature, used in special cases, for example when post processing needs to be done within the grid.
    Typically, client listeners are registered dynamically, they are not configured in the xml file. This allows you to listen for specific events or events on specific keys, something you cannot do if you register the listener in the configuration file.
    Please http://coherence.oracle.com/display/COH35UG/Deliver+events+for+changes+as+they+occur
    Paul

Maybe you are looking for

  • [Forum FAQ] How to use multiple field terminators in BULK INSERT or BCP command line

    Introduction Some people want to know if we can have multiple field terminators in BULK INSERT or BCP commands, and how to implement multiple field terminators in BULK INSERT or BCP commands. Solution For character data fields, optional terminating c

  • Why can't I change the capitalization of letters in my iPhone music library?

    Just got a new iPhone 6. Once I sync music to my phone, I'm unable to change the way song/album/artist titles are capitalized. For example I synced one album to my phone where the title of the album was in all caps. I then deleted the album from my p

  • X11 Cursor Theme doesn't display correctly [SOLVER]

    The title explains it up, no matter how full of a theme I try to install some pointers are not correctly displayed. Namely, click (the one displayed when you get over a link) and type cursors. I'm pretty sure my themes are all set but some types are

  • Trash Bug?

    Is anyone having the problem, where if you drag a file to the trash, it doesn't show the icon as full, but still empty. Also when I right click the trash icon the empty trash button, so I have to go into trash to empty it and it is annoying. Does ano

  • Macs in a PC workplace

    Here's the background. I am a graphic artist just hired at an organization that uses PC with Windows XP for their computer platforms. Three other graphic artists are in my workgroup as well using the same setup. All of us have numerous years experien