Problem in Filling Pool, In ConnectionPooling Code:Urgent Plz

Hi All,
I m using this program for Connection Pooling.
import java.sql.*;
import javax.sql.*;
import java.util.*;
import java.io.*;
import javax.naming.*;
public class ConnectionPool implements Runnable{
  private DataSource datasource;
  private int maxConnections;
  private int initialConnections;
  private boolean waitIfBusy;
  private boolean connectionPending = false;
  private Vector<java.sql.Connection> availableConnections;
  private Vector<java.sql.Connection> busyConnections;
  public ConnectionPool()throws SQLException {
    try{
         Context ic = new InitialContext();
          this.datasource = (DataSource)ic.lookup("java:msgds");                    
          System.out.println("DataSource Found msgds");
     }catch(Exception e){
          System.out.println("Error in ConnectionPool COnstructor While Locatin ashishds");
    this.waitIfBusy = true;   
    this.waitIfBusy = waitIfBusy;
    this.maxConnections = 5;
    this.initialConnections = 2;
    availableConnections = new Vector<java.sql.Connection>(2);
    busyConnections = new Vector<java.sql.Connection>();
    for(int i=0; i<initialConnections; i++) {
      availableConnections.addElement(makeNewConnection());
  public synchronized Connection getConnection()
      throws SQLException {
    if (!availableConnections.isEmpty()) {
      Connection existingConnection =
        (Connection)availableConnections.lastElement();
      int lastIndex = availableConnections.size() - 1;
      availableConnections.removeElementAt(lastIndex);
      // If connection on available list is closed (e.g.,
      // it timed out), then remove it from available list
      // and repeat the process of obtaining a connection.
      // Also wake up threads that were waiting for a
      // connection because maxConnection limit was reached.
      if (existingConnection.isClosed()) {
        notifyAll(); // Freed up a spot for anybody waiting
        return(getConnection());
      } else {
        busyConnections.addElement(existingConnection);
        return(existingConnection);
    } else {
      // Three possible cases:
      // 1) You haven't reached maxConnections limit. So
      //    establish one in the background if there isn't
      //    already one pending, then wait for
      //    the next available connection (whether or not
      //    it was the newly established one).
      // 2) You reached maxConnections limit and waitIfBusy
      //    flag is false. Throw SQLException in such a case.
      // 3) You reached maxConnections limit and waitIfBusy
      //    flag is true. Then do the same thing as in second
      //    part of step 1: wait for next available connection.
      if ((totalConnections() < maxConnections) &&
          !connectionPending) {
        makeBackgroundConnection();
      } else if (!waitIfBusy) {
        throw new SQLException("Connection limit reached");
      // Wait for either a new connection to be established
      // (if you called makeBackgroundConnection) or for
      // an existing connection to be freed up.
      try {
        wait();
      } catch(InterruptedException ie) {}
      // Someone freed up a connection, so try again.
      return(getConnection());
  // You can't just make a new connection in the foreground
  // when none are available, since this can take several
  // seconds with a slow network connection. Instead,
  // start a thread that establishes a new connection,
  // then wait. You get woken up either when the new connection
  // is established or if someone finishes with an existing
  // connection.
  private void makeBackgroundConnection() {
    connectionPending = true;
    try {
      Thread connectThread = new Thread(this);
      connectThread.start();
    } catch(OutOfMemoryError oome) {
      // Give up on new connection
  public void run() {
    try {
      Connection connection = makeNewConnection();
      synchronized(this) {
        availableConnections.addElement(connection);
        connectionPending = false;
        notifyAll();
    } catch(Exception e) { // SQLException or OutOfMemory
      // Give up on new connection and wait for existing one
      // to free up.
  // This explicitly makes a new connection. Called in
  // the foreground when initializing the ConnectionPool,
  // and called in the background when running.
  private Connection makeNewConnection()
      throws SQLException {
    try {    
      // Establish network connection to database
      Connection connection = datasource.getConnection();
      return(connection);
    } catch(Exception cnfe) {
      // Simplify try/catch blocks of people using this by
      // throwing only one exception type.
      throw new SQLException("Error in makeNewConnection() : " +cnfe);
  public synchronized void free(Connection connection) {
    busyConnections.removeElement(connection);
    availableConnections.addElement(connection);
    // Wake up threads that are waiting for a connection
    notifyAll();
  public synchronized int totalConnections() {
    return(availableConnections.size() +
           busyConnections.size());
  /** Close all the connections. Use with caution:
   *  be sure no connections are in use before
   *  calling. Note that you are not <I>required</I> to
   *  call this when done with a ConnectionPool, since
   *  connections are guaranteed to be closed when
   *  garbage collected. But this method gives more control
   *  regarding when the connections are closed.
  public synchronized void closeAllConnections() {
    closeConnections(availableConnections);
    availableConnections = new Vector<java.sql.Connection>();
    closeConnections(busyConnections);
    busyConnections = new Vector<java.sql.Connection>();
  private void closeConnections(Vector connections) {
    try {
      for(int i=0; i<connections.size(); i++) {
        Connection connection =
          (Connection)connections.elementAt(i);
        if (!connection.isClosed()) {
          connection.close();
    } catch(SQLException sqle) {
      // Ignore errors; garbage collect anyhow
  public synchronized String toString() {
    String info =
      "ConnectionPool(Data Source is :"+datasource+ ")" +
      ", available=" + availableConnections.size() +
      ", busy=" + busyConnections.size() +
      ", max=" + maxConnections;
    return(info);
}To Test This code, I had created one Servlet. In This Servlet I m calling like this:
in
init(){
     connectionPool = new ConnectionPool();
}in
in
service(){
     private ConnectionPool connectionPool=null;
     connection = connectionPool.getConnection();
}in destroy of
destroy{
     if(connectionPool != null){
              connectionPool.closeAllConnections();     
}The Problem is that, Many a times it work, many a times it shows following Error:
09:56:35,109 WARN  [JBossManagedConnectionPool] Unable to fill pool
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException:
Listener refused the connection with the following error:
ORA-12516, TNS:listener could not find available handler with matching protocol stack
The Connection descriptor used by the client was:
192.168.1.8:1521
        at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFa
ctory.java:177)
        at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConn
ectionPool.java:539)
        at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.fillToMin(InternalManagedConnectionPool.java:486)
        at org.jboss.resource.connectionmanager.PoolFiller.run(PoolFiller.java:74)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.sql.SQLException: Listener refused the connection with the following error:
ORA-12516, TNS:listener could not find available handler with matching protocol stack
The Connection descriptor used by the client was:
192.168.1.8:1521
        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
        at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:261)
        at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:387)
        at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:414)
        at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
        at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
        at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:801)
        at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.createManagedConnection(LocalManagedConnectionFa
ctory.java:169)
        ... 4 moreI M using JBoss 4.0, With OracleXE. I had defined my DataSource-> msgds in mydb-ds.xml of deploy folder of JBoss.
which is like this:
<?xml version="1.0" encoding="UTF-8"?>
<datasources>
  <local-tx-datasource>
    <jndi-name>msgds</jndi-name>
    <connection-url>jdbc:oracle:thin:@192.168.1.8:1521</connection-url>   
    <driver-class>oracle.jdbc.OracleDriver</driver-class>
    <!-- The login and password -->
    <user-name>ashish</user-name>
    <password>ashish</password>
    <min-pool-size>5</min-pool-size>
    <max-pool-size>100</max-pool-size>
    <idle-timeout-minutes>0</idle-timeout-minutes>
  </local-tx-datasource>
</datasources>I want to know whether This is a right approach to do Connection Pooling. How can I implement this Using Commons.
What changes i need to made in my mydb-ds.xml if I use Commons Package and also in the code.

never ask for help to be sent to your email, always post in this thread so that if someone else has the same question they can get the help too.
this should help get you started... just make sure you get the apache dbcp package (you may need some commons things too, like commons pool)
private BasicDataSource dataSource;
* This function actually initializes the datasource, which is
* in charge of setting up the BasicDataSource, which handles
* all the database pooling.
protected synchronized void initDataSource() {
     loadProperties(); // this loads my database properties from a config file
     try {
          dataSource = new BasicDataSource();
          dataSource.setDefaultAutoCommit(true);
          dataSource.setDefaultCatalog(catalogName);
          dataSource.setDriverClassName(jdbcDriver);
          dataSource.setUsername(jdbcUserID);
          dataSource.setPassword(jdbcPassword);
          dataSource.setUrl(jdbcURL);
          dataSource.setMinIdle(minCons);
          dataSource.setMaxIdle(maxCons);
          dataSource.setMaxActive(maxCons);
          dataSource.setMaxWait(5000); // milliseconds to wait for connection if none are available
          dataSource.setAccessToUnderlyingConnectionAllowed(true);
          // will validate each connection before handing it out
          dataSource.setTestOnBorrow(true);
          dataSource.setValidationQuery("select getDate()");
          // setup to test idle objects in the pool
          dataSource.setTestWhileIdle(true);
          dataSource.setTimeBetweenEvictionRunsMillis(600000); // run every 10 minutes
          dataSource.setMinEvictableIdleTimeMillis(60000);  // only examine connections idle for more than 10 minutes
          dataSource.setNumTestsPerEvictionRun(-3); // when this is negative one Nth of connections will be examined
     } catch (Exception e) {
          //whatever you want
public Connection getConnection() {
     try {
          Connection con = dataSource.getConnection();
          if(con == null) {
               throw new Exception("Error: DataSource gave a null connection object");
          return con;
     } catch (Exception e) {
          // whatever
public void freeConnection(Connection con) {
     freeConnection(con, false);
public void freeConnection(Connection con, boolean isError) {
     try {
          if(con == null) return;
          if(!con.isClosed()) {
               if(isError && !con.getAutoCommit()) {
                    con.rollback();
               con.clearWarnings();
               con.close(); // this adds the con back to the pool
     } catch(Exception e) {
          // whatever
}     

Similar Messages

  • Search helps & match codes - Urgent plz

    Hi ,
    1.   Could any one give me the difference between search helps & match codes.
    2. assume that you are giving input matnr from selection screen.and executed based on input matnr you have generated an interactive report with fields matnr,etc...
    if i want to change that particular matnr realted fields how can i do that from this report.Shell i call mm02 tcode.How to do that.how to pass the selected parameter to the transaction.(screen matnr field.please give me an example.
    Regards
    SAISRI

    Hi,
    Check this example for interactive reporting..which will take you MM02
    TYPE-POOLS: slis.
    DATA: gt_fieldcat TYPE slis_t_fieldcat_alv.
    DATA: BEGIN OF wa_material,
    MATNR LIKE MARA-MATNR,
    END OF wa_material.
    DATA: v_repid TYPE syrepid.
    v_repid = sy-repid.
    DATA it_material LIKE STANDARD TABLE OF wa_material WITH HEADER LINE.
    SELECT * UP TO 100 ROWS
    FROM MARA
    INTO CORRESPONDING FIELDS OF TABLE it_material.
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
         EXPORTING
              i_program_name     = v_repid
              i_internal_tabname = 'WA_MATERIAL'
              i_inclname         = v_repid
         CHANGING
              ct_fieldcat        = gt_fieldcat.
    * have hotspot for a PO.
    DATA: s_fieldcat LIKE LINE OF gt_fieldcat.
    s_fieldcat-hotspot = 'X'.
    MODIFY gt_fieldcat FROM s_fieldcat TRANSPORTING hotspot
           WHERE fieldname = 'MATNR'.
    * Pass the program.
    v_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
         EXPORTING
              i_callback_program      = v_repid
              it_fieldcat             = gt_fieldcat
              i_callback_user_command = 'USER_COMMAND'
         TABLES
              t_outtab                = it_material.
    *       FORM display_detail                                           *
    *  -->  UCOMM                                                         *
    *  -->  SELFIELD                                                      *
    FORM user_command USING ucomm LIKE sy-ucomm
    selfield TYPE slis_selfield.
      IF ucomm = '&IC1' AND selfield-fieldname = 'MATNR'.
        READ TABLE it_material INDEX selfield-tabindex.
        IF sy-subrc = 0.
          SET PARAMETER ID 'MAT' FIELD it_material-matnr.
          CALL TRANSACTION 'MM02' AND SKIP FIRST SCREEN.
        ENDIF.
      ENDIF.
    ENDFORM.
    Thanks
    Naren

  • Problem with filling nodes of a context with data

    hi,
    i've got the following problem with filling a controller context:
    the context of the controller looks like:
    Context
    |-Node1             0..n singleton
      |-Subnode1        0..n singleton
      | |-SubVal1.1
      | |-SubVal1.2
      |-Subnode2        0..n singleton
      | |-Subval2.1
      | |-Subval2.2
      |-Val1.1
      |-Val1.2
    that means every Element of Node1 should have its own Subnode-Elements & Val1-Values
    in wdDoInit() of the controller I fill the context like this:
    Collection Node1, SubNode1, SubNode2
    for (Iterator iter = Node1.iterator(); iter.hasNext;) {
       newNode1NodeElement = wdContext.createNode1Element();
       newNode1NodeElement.set... //setting the values
       wdContext.nodeNode1().addElement(newNode1NodeElement);
       for (Iterator iter2=Subnode1.iterator(); iter2.hasNext;) {
          newSubnode1NodeElement = wdContext.createSubnode1Element();
          newSubNode1NodeElement.set... // setting the SubVal1.x
          wdContext.nodeSubnode1.addElement(newSubnode1NodeElement);
       for (Iterator iter3=SubNode2.iterator(); iter3.hasNext;) {
          newSubnode2NodeElement = wdContext.createSubnode2Element();
          newSubNode2NodeElement.set... // setting the SubVal2.x
          wdContext.nodeSubnode2.addElement(newSubnode2NodeElement);
    i've got the impression, that <b>all</b> my SubNodes are filled in the <b>first</b> Node1-Element. is there an error in the code above? because in the first place, i see every values in the first Element of Node1-views and if i navigate to the next Element of Node1, every views are empty.
    for every Node (Node1, Subnode1, Subnode2) i've got an own view, that maps its context to the corresponding Node of the controller context, e.g for the SubNode1-View:
    Context                  Context
    |                        ....
    |- ViewNode      --->    ..|- Subnode1
      |- SubVal1.1   --->    ..   |-SubVal1.1
      |- SubVal1.2   --->    ..   |-SubVal1.2
    in these views, i navigate through the nodes via
    wdContext.nodeViewNode().move...()
    in the SubNode1-View i see the SubVal1.1, SubVal1.2 (that's what i want) <b>and</b> additional SubVal2.1, SubVal2.2 (that's what I don't want...)
    kind regards, achim
    ps: i've studied the Master/Detail-Tutorial and i think the choice for cardinality 0..n and type singleton is correct in my case.

    hmm, let's look at the code:
    for (Iteration Node1) {
      newNode1NodeElement = wdContext.createNode1Element();
      wdContext.nodeNode1().addElement(newNode1NodeElement);
      for (Iteration SubNode1) {
         newSubNode1NodeElement = wdContext.createSubNodeXElement();
         newNode1NodeElement.nodeSubNode1().addElement(newSubNode1NodeElement);
         for (Iteration SubNode1.1) {
            newSubNode1.1NodeElement = <b>wdContext</b>.createSubNode1.1Element();
            newSubNode1NodeElement.nodeSubNode1.1.addElement(newSubNode1.1NodeElement);
       for (Iteration SubNode2) {
          newSubNode2NodeElement = wdContext.createSubNode2Element();
          newNode1NodeElement.nodeSubNode2.addElement(newSubNode2NodeElement);
    is there an error in creating the SubNode1.1-Node (bold line)?
    if the code is correct, perhaps it's only a viewing problem:
    i use views that point on every node and display the values in that node. if i move in the view for Node1 to another node, the values for SubNode1 point to the correct values too, but the values for SubNode1.1 still stay on the old values. is the move of a grandfather node not correctly propagated to his first child?
    kr, achim

  • Problem when filling Node and Item tables for the metho add_nodes_and_items

    Hi Experts,
    I am facing problem when filling  Node and Item internal tables for the method add_nodes_and_items.
    as i have written the below logic:
      LOOP AT gt_partner INTO wa_partner.
        CLEAR lvs_tc_root.
        l_key = l_key + 1.
        lvs_tc_root-node_key   = l_key. "wa_partner-sndprn.
    *  lvs_tc_root-relatkey  = lvf_tc_node_key.
    *  lvs_tc_root-relatship = cl_gui_column_tree=>relat_last_child.
        lvs_tc_root-last_hitem = wa_partner-sndprn.
        lvs_tc_root-hidden     = ' '.
        lvs_tc_root-disabled   = ' '.
        lvs_tc_root-isfolder   = 'X'.
        lvs_tc_root-n_image    = icon_folder.
        lvs_tc_root-exp_image  = icon_folder.
        lvs_tc_root-expander   = 'X'.
        APPEND lvs_tc_root TO gvt_tc_node_table.
        CLEAR lvs_tc_root.
        lvs_tc_root-node_key   = 'A'.  "Successfull
        lvs_tc_root-relatkey   = l_key.
        lvs_tc_root-relatship  = cl_gui_column_tree=>relat_last_child.
        lvs_tc_root-last_hitem = wa_partner-sndprn.
        lvs_tc_root-hidden     = ' '.
        lvs_tc_root-disabled   = ' '.
        lvs_tc_root-n_image    = icon_green_light.
        APPEND lvs_tc_root TO gvt_tc_node_table.
        CLEAR lvs_tc_root.
        lvs_tc_root-node_key   = 'B'.  "Errors
        lvs_tc_root-relatkey   = l_key    .
        lvs_tc_root-last_hitem = wa_partner-sndprn.
        lvs_tc_root-hidden     = ' '.
        lvs_tc_root-disabled   = ' '.
        lvs_tc_root-n_image    = icon_red_light.
        APPEND lvs_tc_root TO gvt_tc_node_table.
        CLEAR lvs_tc_root.
        lvs_tc_root-node_key  = 'C'.  "Deleted
        lvs_tc_root-relatkey  = l_key .
        lvs_tc_root-last_hitem = wa_partner-sndprn.
        lvs_tc_root-hidden    = ' '.
        lvs_tc_root-disabled  = ' '.
        lvs_tc_root-n_image   = icon_yellow_light.
        APPEND lvs_tc_root TO gvt_tc_node_table.
    *   LOOP AT gt_partner_item INTO wa_partner_item WHERE sndprn = wa_partner-sndprn
        LOOP AT gt_partner INTO wa_partner_item WHERE sndprn = wa_partner-sndprn.
          CLEAR lvs_item.
          lvs_item-node_key   = l_key.
          lvs_item-item_name  = 'Column1'.
          lvs_item-text       = wa_partner-sndprn.
          lvs_item-class      = cl_gui_column_tree=>item_class_text.
          APPEND lvs_item TO gvt_tc_item_table. CLEAR lvs_item.
          lvs_item-node_key   = 'A'.
          lvs_item-item_name  = 'Column1'.
          lvs_item-text       = 'Successful'.
          lvs_item-class      = cl_gui_column_tree=>item_class_text.
          APPEND lvs_item TO gvt_tc_item_table. CLEAR lvs_item.
          lvs_item-node_key   = 'B'.
          lvs_item-item_name  = 'Column1'.
          lvs_item-text       = 'Errors'.
          lvs_item-class      = cl_gui_column_tree=>item_class_text.
          APPEND lvs_item TO gvt_tc_item_table. CLEAR lvs_item.
          lvs_item-node_key   = 'C'.
          lvs_item-item_name  = 'Column1'.
          lvs_item-text       = 'Deleted'.
          lvs_item-class      = cl_gui_column_tree=>item_class_text.
          APPEND lvs_item TO gvt_tc_item_table. CLEAR lvs_item.
        ENDLOOP.
      ENDLOOP.
      CALL METHOD go_tree->add_nodes_and_items
        EXPORTING
          node_table                     = gvt_tc_node_table
          item_table                     = gvt_tc_item_table
          item_table_structure_name      = 'MTREEITM'
        EXCEPTIONS
          failed                         = 1
          cntl_system_error              = 3
          error_in_tables                = 4
          dp_error                       = 5
          table_structure_name_not_found = 6.
    If the internal table has more than 1 record getting dump...Runtime Errors         MESSAGE_TYPE_X
    Plase let me know how to overcome the problem..
    Thanks,
    Rajasekhar
    Edited by: RajasekharReddy Nevali on Nov 29, 2010 3:43 PM
    Edited by: Neil Gardiner on Nov 30, 2010 12:41 PM

    Hi ,
    U can undestand the code and one more thing dynamically display record for automcally here i am using root nodes please look at that one Same requiremtn i done previously.
    cLEAR item.
      item-node_key = c_nodekey-root.    "partner1
      item-item_name = c_column-column1.
      item-class = cl_gui_column_tree=>item_class_text.
      item-alignment = cl_gui_column_tree=>align_at_top.
      item-font = cl_gui_column_tree=>item_font_prop.
      item-text = 'APPLICATION'.
      item-length = 30.
      APPEND item TO item_table.
      DATA:lv_name TYPE tv_itmname VALUE '1',
           lv_nkey TYPE i,
           lv_nkey2 TYPE i,
           lv_nkey_c TYPE string,
           lv_nkey_c2 TYPE string,
           lv_nkey_c3 TYPE string,
           lv_nkey_c4 TYPE string,
           LV_NKEY_C5 TYPE STRING,
           lv_itmkey TYPE i,
           lv_itmkey_c TYPE string,
           LV_INDEX TYPE I.
    ************************************************LOOP FOR APPLICATION*********
      LOOP AT i_otypes INTO wa_otypes.
        read table it_appl into wa_appl with key appl = wa_otypes-applic." BINARY SEARCH.
              if sy-subrc = 0.
                lv_apdes = wa_appl-text1.
              endif.
        CLEAR:item,lv_nkey_c.
        lv_nkey_c = sy-tabix.
        LV_INDEX = SY-TABIX.
        CONDENSE lv_nkey_c.
        CONCATENATE 'N' lv_nkey_c INTO lv_nkey_c.
        node-node_key = lv_nkey_c.
        node-relatkey = c_nodekey-root.
        node-relatship = cl_gui_list_tree=>relat_last_child.
        node-isfolder = 'X'.
        APPEND node TO node_table.
        CLEAR item.
        item-node_key = lv_nkey_c.
        item-item_name = c_column-column1.
        item-class = cl_gui_column_tree=>item_class_text.
        item-font = cl_gui_column_tree=>item_font_prop.
        item-text = wa_otypes-APPLIC.
        item-length = 30.
        APPEND item TO item_table.
         CLEAR item.
          item-node_key = lv_nkey_c.
          item-item_name = c_column-column2.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = lv_apdes.
          item-length = 30.
          APPEND item TO item_table.
         v_acount = v_acount + 1.
         v_acount1 = v_acount1 + 1.
    clear lv_apdes.
    *****************************************LOOP FOR ARCHIV OBJECTS***************************
        loop at it_obj into wa_obj where applic = wa_otypes-applic.
          CLEAR:item,lv_nkey_c2.
          lv_nkey_c2 = SY-TABIX.
          CONDENSE lv_nkey_c2.
          CONCATENATE 'SN' lv_nkey_c2 INTO lv_nkey_c2.
          node-node_key = lv_nkey_c2.
          node-relatkey = lv_nkey_c.
          node-relatship = cl_gui_list_tree=>relat_last_child.
          node-isfolder = 'X'.
          APPEND node TO node_table.
          CLEAR item.
          item-node_key = lv_nkey_c2.
          item-item_name = c_column-column1.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = wa_obj-object.
          item-length = 30.
          APPEND item TO item_table.
          CLEAR item.
          item-node_key = lv_nkey_c2.
          item-item_name = c_column-column2.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = wa_obj-objtext.
          item-length = 30.
          APPEND item TO item_table.
    ****count all object for final displaying*******
         v_ocount1 = v_ocount1 + 1.
          LV_STR = LV_STR + 1.
         ENDLOOP.
    *********************LOOP FOR ARCH OBJECT ALL PROGRAMS*******************************************
       LOOP AT IT_PRG INTO WA_PRG WHERE OBJECT = WA_OBJ-OBJECT.
    ****************1PRG**********************
    IF wa_PRG-REORGA_PRG IS NOT INITIAL.
      read table it_trdirt into wa_trdirt with key name = wa_prg-reorga_prg BINARY SEARCH.
                  if sy-subrc = 0.
                  lv_text = wa_trdirt-text.
                  endif.
         CLEAR:item,lv_nkey_c3.
          data : v_no type sy-tabix.
          v_no = v_no + 1.
          lv_nkey_c3  =  v_no.
          CONDENSE lv_nkey_c3.
          CONCATENATE 'SSN' lv_nkey_c3 INTO lv_nkey_c3.
          node-node_key = lv_nkey_c3.
          node-relatkey = lv_nkey_c2.
          node-relatship = cl_gui_list_tree=>relat_last_child.
          node-isfolder = 'X'.
          NODE-N_image =' '.
          APPEND node TO node_table.
           CLEAR NODE.
          CLEAR item.
          item-node_key = lv_nkey_c3.
          item-item_name = c_column-column1.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = 'WRIT'."wa_PRG-REORGA_PRG.
          item-length = 30.
          APPEND item TO item_table.
          CLEAR item.
          item-node_key = lv_nkey_c3.
          item-item_name = c_column-column2.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = 'WRITE PROGRAM'."lv_text."'WRITE PROGRAM'.
          item-length = 30.
          APPEND item TO item_table.
           clear lv_text.
    ************************SSSN NODE***********************
            CLEAR:item,lv_nkey_c4.
          data : v_no1 type sy-tabix.
          v_no1 = v_no1 + 1.
          lv_nkey_c4  =  v_no1.
          CONDENSE lv_nkey_c4.
          CONCATENATE 'SSSN' lv_nkey_c4 INTO lv_nkey_c4.
          node-node_key = lv_nkey_c4.
          node-relatkey = lv_nkey_c3.
          node-relatship = cl_gui_list_tree=>relat_last_child.
         node-isfolder = 'X'.
          NODE-N_image =' '.
          APPEND node TO node_table.
           CLEAR NODE.
          CLEAR item.
          item-node_key = lv_nkey_c4.
          item-item_name = c_column-column1.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = wa_PRG-REORGA_PRG.
          item-length = 30.
          APPEND item TO item_table.
          CLEAR item.
          item-node_key = lv_nkey_c4.
          item-item_name = c_column-column2.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = lv_text."'WRITE PROGRAM'.
          item-length = 30.
          APPEND item TO item_table.
            clear lv_text.
    *******COUNT TYPE WRITE PROGRAMS****************
          V_WCOUNT = V_WCOUNT + 1.
    CLEAR item.
    V_WCOUNT = V_WCOUNT.
          item-node_key = lv_nkey_c3.
          item-item_name = c_column-column3.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = V_WCOUNT."lv_text."'WRITE PROGRAM'.
          item-length = 30.
          APPEND item TO item_table.
          CLEAR V_WCOUNT.
    ENDIF.
    *endif.
    *****************2PRG*****************
    IF wa_PRG-RETRIE_PRG IS NOT INITIAL.
    read table it_trdirt into wa_trdirt with key name = wa_prg-retrie_prg.
                  if sy-subrc = 0.
                  lv_text = wa_trdirt-text.
                  endif.
         CLEAR:item, NODE, lv_nkey_c3.
          v_no = v_no + 1.
          lv_nkey_c3  =  v_no.
          CONDENSE lv_nkey_c3.
          CONCATENATE 'SSN' lv_nkey_c3 INTO lv_nkey_c3.
          node-node_key = lv_nkey_c3.
          node-relatkey = lv_nkey_c2.
          node-relatship = cl_gui_list_tree=>relat_last_child.
          node-isfolder = 'X'.
          APPEND node TO node_table.
          CLEAR item.
          item-node_key = lv_nkey_c3.
          item-item_name = c_column-column1.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = 'successful'."wa_PRG-RETRIE_PRG.
          item-length = 30.
          APPEND item TO item_table.
          CLEAR item.
          item-node_key = lv_nkey_c3.
          item-item_name = c_column-column2.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = 'sucessful PROGRAM'.
          item-length = 60.
          APPEND item TO item_table.
    *********************************SSSN NODE*******************************
           CLEAR:item,lv_nkey_c4,node.
         data : v_no1 type sy-tabix.
          v_no1 = v_no1 + 1.
          lv_nkey_c4  =  v_no1.
          CONDENSE lv_nkey_c4.
          CONCATENATE 'SSSN' lv_nkey_c4 INTO lv_nkey_c4.
          node-node_key = lv_nkey_c4.
          node-relatkey = lv_nkey_c3.
          node-relatship = cl_gui_list_tree=>relat_last_child.
         node-isfolder = 'X'.
          NODE-N_image =' '.
          APPEND node TO node_table.
           CLEAR NODE.
          CLEAR item.
          item-node_key = lv_nkey_c4.
          item-item_name = c_column-column1.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = wa_PRG-RETRIE_PRG.
          item-length = 30.
          APPEND item TO item_table.
          CLEAR item.
          item-node_key = lv_nkey_c4.
          item-item_name = c_column-column2.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = lv_text."'WRITE PROGRAM'.
          item-length = 30.
          APPEND item TO item_table.
            clear lv_text.
    **********COUNT THE RELOADPR*******************
              V_WCOUNT = V_WCOUNT + 1.
    CLEAR item.
    V_WCOUNT = V_WCOUNT.
          item-node_key = lv_nkey_c3.
          item-item_name = c_column-column3.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = V_WCOUNT."lv_text."'WRITE PROGRAM'.
          item-length = 30.
          APPEND item TO item_table.
          CLEAR V_WCOUNT.
    ENDIF.
    ENDIF.
    ****************3PRG**********************
    IF wa_PRG-DELETE_PRG IS NOT INITIAL.
    read table it_trdirt into wa_trdirt with key name = wa_prg-delete_prg.
                  if sy-subrc = 0.
                  lv_text = wa_trdirt-text.
                  endif.
         CLEAR:item, NODE, lv_nkey_c3.
          v_no = v_no + 1.
          lv_nkey_c3  =  v_no.
          CONDENSE lv_nkey_c3.
          CONCATENATE 'SSN' lv_nkey_c3 INTO lv_nkey_c3.
          node-node_key = lv_nkey_c3.
          node-relatkey = lv_nkey_c2.
          node-relatship = cl_gui_list_tree=>relat_last_child.
          node-isfolder = 'X'.
          APPEND node TO node_table.
          CLEAR item.
          item-node_key = lv_nkey_c3.
          item-item_name = c_column-column1.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = 'DELETE'."wa_PRG-DELETE_PRG.
          item-length = 30.
          APPEND item TO item_table.
          CLEAR item.
          item-node_key = lv_nkey_c3.
          item-item_name = c_column-column2.
          item-class = cl_gui_column_tree=>item_class_text.
          item-font = cl_gui_column_tree=>item_font_prop.
          item-text = 'NAME OF DELETE PROGRAM'.
          item-length = 60.
          APPEND item TO item_table.
           CLEAR:item,lv_nkey_c4,node.
         data : v_no1 type sy-tabix.
          v_no1 = v_no1 + 1.
          lv_nkey_c4  =  v_no1.
          endloop.

  • Problems using connection pooling

    I'm having problems configuring connection pooling in oc4j. Have specified my datasource/connection pool in my data-sources.xml. I always get the following error when I try to access it with an instance of OracleConnectionPoolDataSource within my apps. The app server dosen't seem to create the connections when started 'cos its not displayed within Oracle dba studio. Can anyone tell what I need to do pls.
    regards!
    dyzke
    //-- error displayed
    Exception in thread "main" java.sql.SQLException: Io exception: The Network Adap
    ter could not establish the connection
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:323)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:260)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
    va:365)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at java.sql.DriverManager.getConnection(Unknown Source)
    at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java
    :111)
    // -- extract
    <data-source
              class="com.evermind.sql.DriverManagerDataSource"
    name="MYDS"
              location="jdbc/XXX"      
    xa-location="jdbc/xa/OracleXADS"
              ejb-location="jdbc/OracleDS"
    pooled-location="xxx/xxxx"
              max-connections="10"
              min-connections="3"                    
              connection-driver="oracle.jdbc.driver.OracleDriver"
              username="admin"
              password="admin"
              url="jdbc:oracle:thin:@localhost:xxx"
              inactivity-timeout="30"
         />

    see my answer in the other newsgroup.
    please don't cross post.
    "M. Hammer" <[email protected]> wrote in message
    news:[email protected]..
    Hi,
    We have problems using connection pooling in a WLS 5.1.x - Cluster. Is it
    possible to use CP in such a cluster at all ? The problem is, connections
    will be opened and never been closed. How can I configure a cluster forCP?
    >
    I have a WLS-Cluster with 2 instances and my webApp uses connectionpooling.
    By the way I get a connection on Instance 1, Instance 2 gets a connection
    also, but never releases it.
    In my opinion, the reference to the connection in the partner-instancewill
    be lost.
    How do I have to configure my cluster to work well with that stuff ?
    Thank a lot,
    Markus.

  • Discount Condition type is picking Tax Code(URGENT)

    Dear All,
    I have a very serious problem on Condition types and Tax codes.
    I have configured the pricing procedure with two taxes (China).
    Sr.No   Condition Type    TAX Code
    1               VAT                  V7
    2.             CONC                V6
    Now, If i will give some Customer discount Condition type then System is picking picking Tax code as V7.For that i have not maintanied any Condition records in VK11.
    What should be the reason for this?
    Since it is very Urgent Issue,Please Guide me on the same
    Thanks
    Vinay

    Have you run the country installation program before you started the customisation. This is supposed to install the entire information required to configure the tax scenarios for the particular country. If you are trying to create the tax codes and the procedureson the vanilla system, then you need to work very closely with FI because the posting for tax is done from the tax procedure in FI. As an SD or MM consultant we are only interested in the Taxes on sales and purchases and their customisation. The procedure and the Tax codes are created in FI.
    This is the first thing that is normally done after you copy client 000 to start your customisation. The coountry installation program does not run if you ahve made changes to the client.
    regards
    Jude

  • How to take backup of an entire module pool program with code,screen,etc.

    Hi experts,
    I have some important data in the ides server for which i want to take backup of them.
    I have some question regarding the same.
    1.How to take backup/download of an entire module pool program with code,screen,etc.
    2.How can we take backup/download for a DB table with its structure?
    3.How can we take backup of a search help?
    Please give some suggestions abt the same.
    Regards,
    Ashesh.

    Hi,
    May be just for viewing, try downloading from SE80 transaction from the others option.
    Here just try issuing the print, it will generate the spool.
    Now using the spool, download to your desktop as required. It will have all the information regarding the attributes, fields, elements everything.
    The only issue is, may be you need to take all the screens separately.
    Regards,
    Santhosh.

  • I am facing problem in starting ShellHWDetection service Error code 1075,please help

    I am facing problem in starting ShellHWDetection service Error code 1075,please help

    Shellhwdetection is a Windows service which stands for Shell Hardware Detection Service.
    It provides notifications for AutoPlay hardware events.
    System error code 1075 means "The dependency service does not exist or has been marked for deletion."
    Please run services.msc, then find Shell Hardware Detection Service, view its dependencies
    Make sure the three services are set to running "automatic" in Services.
    If this doesn't help, then run sfc to check if there're some missing or corrupted files in system.
    Yolanda Zhu
    TechNet Community Support

  • UCCE 7.5: How to make automatic filling of wrap up codes in CAD

    Hello, All!
    In some situations we need to automatically filling of wrap up codes.
    For example - agent is in the Outbound mode, customer not home, agent push "Customer not home" button, and after call must fill wrap up code "Customer not home". We want in this case to automatically filling wrap up code.
    Is It possible?
    May by - with creation custom button that will set outbound call result and fill wrap up at the same time..
    Thank you!

    Hello,
    Wrapu-up is a reporting method, not telephony or UCCE method , what you can do in the outbound case is to do the call back but i had never saw a wrap-up to be used as a filling .
    i think your best option is (if you really need this) is to go to a third party CRM agent software that is capable of doing such thing.
    Amer

  • Problems with filling out PDF forms

    We have problems with filling out PDF-forms. Aotomatic filling of forms is deactivated and we use the Adobe Reader 11.0.05. The problem is: After some time the inputs are wrong put down in the form. For example: I write 120 and in the form stands 125. We have already extinguished the cache. Thanks for your help in advance.

    You will get that first message when the document has been changed in a way that invalidates the internal digital signature that's applied when a document is Reader-enabled. Certain changes are allowed (e.g., filling fields, commenting, signing) and will not invalidate the signature, but others are not. The exact cause of the change is often hard to track down, but it can be due to font problems, some type of file corruption, or something that Acrobat/Reader attempts to correct when the file is opened/saved. You will also get the message if the users system time is not correct and is currently set to some time before the document was Reader-enabled. It seems best to use the most recent version of Acrobat to enabled the documents and recent versions of Reader to work with them.
    It problem is probably not related to the user using anything in the Sign pane.

  • I cant use the highlight, underline, or strikethrough function in a specific pdf file. The file isnt locked. I used to highlight texts from that file before the latest update. The problem occurs only with that file. Urgent need. Please help. Thanks!

    i cant use the highlight, underline, or strikethrough function in a specific pdf file. The file isnt locked. I used to highlight texts from that file before the latest update. The problem occurs only with that file. Urgent need. Please help. Thanks!

    Chester31,
    Thank you very much for sharing your file with us!  Now that we are able to reproduce the problem at our end, you may stop sharing the file on Acrobat.com.
    Do you know when this problem (for not being able to add new highlight/strikeout/underline) has started?  Did you update your iOS from 7.x to 8.0 recently?
    We will continue investigating the problem and let you know what we find.
    Thank you again for your help.

  • Problem in Module Pool Program

    Hi All,
    I got one problem in Module pool program.Im using table control.when selected multiple coloms by table control option left top.
    when I want to de-select one by one,unable to de-select. Please suggest me.
    thank you,
    Anu.

    Thank You All.
    Solved my self.
    The coding as below.
    PROCESS BEFORE OUTPUT.
      CALL SUBSCREEN SUB INCLUDING SY-REPID '110'.
      LOOP AT GT_ITAB INTO WA WITH CONTROL VCONTROL.
        MODULE SET.
        MODULE STATUS_0100.
      ENDLOOP.
    PROCESS AFTER INPUT.
       CALL SUBSCREEN SUB.
      LOOP AT GT_ITAB .
        CHAIN.
          FIELD WA-EBELN.
          FIELD WA-EMATN.
          FIELD WA-EBELP.
          FIELD WA-MATNR.
          FIELD WA-MARK.
          MODULE MODIFY ON CHAIN-REQUEST.
        ENDCHAIN.
      ENDLOOP.
        MODULE USER_COMMAND_0100.
    MODULE USER_COMMAND_0100 INPUT.
    CASE SY-UCOMM.
        WHEN 'SAVE'.
          PERFORM SAVE_VARIANT.
          PERFORM VARIANT_EXISTS.
        WHEN 'SEL'.
          LOOP AT GT_ITAB INTO WA.
            WA-MARK = 'X'.
            MODIFY GT_ITAB FROM WA .
          ENDLOOP.
    endmodule.
    MODULE STATUS_0100 OUTPUT.
      SET PF-STATUS 'ZTESTING'.
      SET TITLEBAR 'ZTEST'.
      SET PF-STATUS  'ZTESTING' EXCLUDING IT_EXTAB.
      MOVE:WA-EBELN TO EKKO-EBELN,
           WA-EBELP TO EKPO-EBELP,
           WA-MATNR TO WA-MATNR.
      MOVE:WA-EMATN TO WA-EMATN.
    MODIFY GT_ITAB FROM WA INDEX VCONTROL-CURRENT_LINE.
      VCONTROL-LINES = SY-DBCNT.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    MODULE SET OUTPUT.
      SET CURSOR FIELD CURSORFIELD OFFSET POS.
    ENDMODULE.                 " SET  OUTPUT
    Thank You,
    Anu.

  • Experiencing the problems while encoding the barcode with Code 128 font

    Hi Tim,
    Hope you are doing good.
    We are experiencing the problems while encoding the barcode with Code 128 font.we have followed the Oracle BI Publisher Blog i.e Barcoding 102 http://blogs.oracle.com/xmlpublisher/discuss/msgReader$281.
    Before applying the encoding Java class we were able to display the barcode but after applying this encoding Java class we are not able to display the barcode.
    We are requesting you to help us for encoding the barcode with Code 128 font and read barcode by scanner.
    We will appreciate and thankful if anybody help us in this regard
    Thanks,
    SubbaRao.

    Hi Tim,
    I am trying to create 128 Barcode, output shows little junk characters. I followed the your "Barcoding 102 instrucitons but no luck. I apprciate your help if you provide some help on this.
    http://blogs.oracle.com/xmlpublisher/2006/06/06
    1. Created Java class under $JAVA_TOP/oracle/apps/oracle/xdo/template/util/barcoder
    2. Registeted and applied the format the barcode to the form field. I will sedn my XML, RTF and Java class, Would you pleae advice me on this
    Thanks
    Venu

  • I downloaded the latest version and I get this error when I open it. Problem signature:   Problem Event Name:     InPageError   Error Status Code:     c0000185   Faulting Media Type:     00000003   OS Version:     6.1.7601.2.1.0.768.3. Any clue why or how

    I downloaded the latest version and I get this error when I open it. Problem signature:   Problem Event Name:
    InPageError   Error Status Code:
    c0000185   Faulting Media Type:
    00000003   OS Version:
    6.1.7601.2.1.0.768.3. Any clue why or how to fix?

    InPageError
    That one's consistent with disk/file damage. The first thing I'd try with that is running a disk check (chkdsk) over your C drive.
    XP instructions in the following document: How to perform disk error checking in Windows XP
    Vista instructions in the following document: Check your hard disk for errors
    Windows 7 instructions in the following document: How to use CHKDSK (Check Disk)
    Select both Automatically fix file system errors and Scan for and attempt recovery of bad sectors, or use chkdsk /r (depending on which way you decide to go about doing this). You'll almost certainly have to schedule the chkdsk to run on startup. The scan should take quite a while ... if it quits after a few minutes or seconds, something's interfering with the scan.
    Does the chkdsk find/repair any damage? If so, can you get itunes to launch properly afterwards?

  • Sudden problem with fill layers

    I use Adobe Photoshop Elements 11.  Until recently, I've had no problem with fill layers.  I'd make a selection from the photo, then I'd make a layer of the selection, then I'd go to edit, fill layer, fill with background/foreground color.  Then the selection only would be filled.  Now, all of a sudden, I make the selection, make a layer of the selection, go to edit/fill layer/fill with background/foreground color, and the whole photo becomes filled with the fill color, and not just the selection.  I'm always on the selection layer, not the background or any other layer.  I've reset all the tool defaults, and I've even deleted the defaults file, but to no avail.  What's happening here?  How do I fix this?
    Thanks,
    Sue

    Sue and MichelB
    MichelB
    When I tried to help Sue with the inquiry, I was doing so based on what was written and my interpretation of it
    then I'd go to edit, fill layer, fill with background/foreground color.
    For me that Photoshop Elements 11 Full Editor, Edit Menu/Fill Layer and the issue did not fit.
    But if the route were as you have suggested Photoshop Elements 11 Full Editor, Layer Menu/New Fill Layer/Solid Color then everything would fall into place, centering around that option in the New Layer dialog "Use Previous Layer to Create Clipping Mask" being checked or unchecked.
    Sue
    We look forward to your follow up.
    Thank you both.
    ATR

Maybe you are looking for

  • Runtime error in Save_text

    Dear all, Getting the runtime error when I am going to save the sales text using FM SAVE_TEXT. Could any body see my code? Thanks in advance. Error: The reason for the exception is: The call to the function module "SAVE_TEXT" is incorrect   In the fu

  • Workflow transaction

    Hi guys; I have a problem when create my transaction with parameter and put my workflow it gives me a shot dump.I have created a function group with my screen and I want to call my wf with a transaction on the fm.

  • How do i transfer iPhotos to a blank CD

    How do I transfers photos from my iPhoto library onto a blank disk?

  • Change Reference Attribute - "Manager" for multiple users

    Hi, I have a scenario in which I have to create a workflow to change a reference value attribute - "Manager" for multiple users in one go. Is it possible to achieve this with workflow. If yes, then how? Regards, Manuj Khurana

  • Having plug-in/install/set-up issues with Disney Pirates of the Caribbean on-line.

    I am having issues trying to install Panda3D game plug-in at Disney's Piratesonline.com. I get into a iterative install/restart loop. No issues installing in IE 8.0. OS - W7, browser - Firefox 4.0