Bad logic in NamedCache remove method?

Why does the remove method in a NamedCache invoke the load method in the CacheStore in a distributed cache? Why force a database load call for the object if it doesn't exist in the cache only to immediately remove it?
Edited by: 786216 on Aug 3, 2010 10:07 AM

Hi 786216,
The reason for that comes to the contract of the java.util.Map#remove(Object) method that NamedCache inherits is to return the "old" value. Basically, the net effect should be the same as:
oValue = map.get(oKey);
map.removeBlind(oKey); // pretend such a method exists
return oValue;The good news is that the removeBlind() method does exists. It looks like:
map.keySet().remove(oKey);and will not cause the store.load() operation to occur.
Regards,
Gene

Similar Messages

  • Sun:Iterating the cursor ! Is this bad logic. i.e, using crs.next() method

    Hi friends,
    I have been using crs.next() method for comparing the given string in textbox and in database are equal. If they are equal then it must redirect to other page otherwise it must remain in the same page.
    Please tell me wheter it is bad logic or not.If it is bad logic then tell me the alternate one.
    Thanking you in Advance.

    Are you refering your code in:
    http://forum.java.sun.com/thread.jspa?threadID=5121734&tstart=75 ?
    I don't know about bad logic or not in using crs.next().
    But I am just curious why do you have to iterate the rowset when you can set a query criteria in the rowset? Suppose you have 100 records in your table, sure it is faster to use query criteria for that., execute the rowset, and then check whether the rowset contains a record or not.
    Another alternative is to use tableDataProvider.findFirst(), and then check the existence of the record. That if you use tableDataProvider instead of the rowset directly. (You may find it in JumpStartCycle sample project).
    Also instead of writing these lines:
    // set the rowset to use the Employee database
    rs.setDataSourceName("java:comp/env/jdbc/Employee");
    rs.setCommand("SELECT * FROM srni.EMPLOYEE");
    rs.setTableName("EMPLOYEE");in the login_action(), you may visually create the rowset() and put it in sessionbean.
    That is what I've found in JSC sample projects. In JumpStartCycles sample (you may create it via file-new projects-samples), there is a login.jsp which is quite similar to your login form. Not exactly the same, but the logic is the same.
    rgds

  • Remove method: push in the right direction

    Hello everybody. I am new to java and programming all together ( i have been programming for about 3 weeks or so). I am sorry if the question is simple. I seem to be having a problem with remove function.
    Basically I have class Task(which has an ID, brief description, dueDate etc...). I also have a task TaskList as well as a class Date . The taskList has attributes an array of type Task with a length of 10. It also has methods to add, remove tasks as well as display the arrays contents. The remove method is what is causing me problems.
    My general thinking was to find the arraycell containing the reference that points to the taskId that is to be removed. Afterwards I wanted to assign a null value to the cell containing the task to be removed. Then i would begin by swapping references until the null value is in a way where the array has no wholes in it.
    I have tried different variations of the same logic but either it does absolutely nothing, either I get a nullpointer exception. I am not looking for an explicit answer, just a nudge in the right direction. Is the general idea I proposed earlier worth anything. Can I affect a null value to an arraycell containing a reference to an object.
    Thank you in advance for any help.
    P.S: Again I apologize, for I know this must be a question that keeps coming up over and over...
    Oh, before I forget, are there any good textbooks that explain ina detailed manner class relationships, particularly dependancy, aggregation and inheritance.

    Why not use a List instead? Lists are dynamic, i.e. they can add or remove
    elements anywhere, closing the gap (i.e. there's no need to stuff nulls in there).
    Something like this:public class TaskList {
       private List l= new ArrayList();
       public void add(Task t) { l.add(t); }
       public boolean remove(Task t) { return l.remove(t); }
       // all the other functionality you want goes here ...
    }kind regards,
    Jos

  • Can we call default.lgf in BADI logic

    Hello All,
    can we call default.lgf logic script to run in the BPC in the BADI ? If yes then can someone please let me know the relevant Method or Class etc.
    For e.g. we have a BADi logic that does a data push from Profit model to Main model based on some conditions. After all this processing in the BADi and writes to Main model, there is a requirement to run the default logic which is there in Profit Model. Which I want to handle in BADI itself after processing the earlier BADI.
    If you need more details please let me know.
    Many Thanks
    Krishna

    Hi Vadim,
    *START_BADI RUNLOGIC_PH
    QUERY = OFF
    WRITE = ON
    LOGIC = DEFAULT.LGF
    APPSET = UUG
    APP = MAIN
    DEBUG = OFF
    *END_BADI
    DEFAULT.LGF has 2 logic scripts calling.
    *account.lgf
    *balance.lgf
    This only executes the first LGF and ignores the second one. I executed each one at a time and all works fine but if I give both together it executes first one in the sequence and ignores the other. Any idea why it is doing like that ??
    Try 1)
    *START_BADI TRANSPROFITTOMAIN
    QUERY = OFF
    WRITE = OFF
    *END_BADI
    *START_BADI RUNLOGIC_PH
    QUERY = OFF
    WRITE = ON
    LOGIC = FLOW_BALANCE.LGF
    APPSET = <appset name>
    APP = MAIN
    DEBUG = OFF
    *END_BADI
    *START_BADI RUNLOGIC_PH
    QUERY = OFF
    WRITE = ON
    LOGIC = CALCACCOUNT.LGF
    APPSET = <appset name>
    APP = MAIN
    DEBUG = OFF
    *END_BADI
    it runs flow_balance.lgf and I can see the log for it..In the log it says the below
    SCRIPT RUNNING TIME IN TOTAL:109.42 s.
    LOG END TIME:2014-06-26 15:17:31
    Amount of time to run script:                                         110797.19 ms
    BADI EXECUTION TIME IN TOTAL :111233.64 ms.
    [WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:DATASRC WILL QUERY ON ALL BASE MEMBERS.
    [WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:INFLATION WILL QUERY ON ALL BASE MEMBERS.
    [WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:INTORDER WILL QUERY ON ALL BASE MEMBERS.
    [WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:PROFITCENTRE WILL QUERY ON ALL BASE MEMBERS.
    [WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:PROFIT_ACCOUNT WILL QUERY ON ALL BASE MEMBERS.
    [WARNING!] NO MEMBER SPECIFIED FOR DIMENSION:TIME WILL QUERY ON ALL BASE MEMBERS.
    EXECUTION BADI:RUNLOGIC_PH
    QUERY: OFF
    WRITE: ON
    Parameter DIMENSION not specified. ALL values used.
    Dimension ACCOUNT not specified and doesn't exist in current context.
    Error in RUNLOGIC call.
    BADI EXECUTION TIME IN TOTAL :2.07 ms.
    SCRIPT RUNNING TIME IN TOTAL:132.65 s.
    Please advise.
    individually they both work fine..meaning Try 2 and Try 3 works fine.
    Try 2)
    *START_BADI TRANSPROFITTOMAIN
    QUERY = OFF
    WRITE = OFF
    *END_BADI
    *START_BADI RUNLOGIC_PH
    QUERY = OFF
    WRITE = ON
    LOGIC = CALCACCOUNT.LGF
    APPSET = <appset name>
    APP = MAIN
    DEBUG = OFF
    *END_BADI
    Try 3)
    *START_BADI TRANSPROFITTOMAIN
    QUERY = OFF
    WRITE = OFF
    *END_BADI
    *START_BADI RUNLOGIC_PH
    QUERY = OFF
    WRITE = ON
    LOGIC = FLOW_BALANCE.LGF
    APPSET = <appset name>
    APP = MAIN
    DEBUG = OFF
    *END_BADI
    Try 4) Default.lgf contains 2 include statements
    *include FLOW_BALANCE.LGF
    *include calcaccount.LGF
    In this case it executes only the fist lgf in the sequence and ignores the other. I cant see anything in the log for the 2nd LGF.
    *START_BADI TRANSPROFITTOMAIN
    QUERY = OFF
    WRITE = OFF
    *END_BADI
    *START_BADI RUNLOGIC_PH
    QUERY = OFF
    WRITE = ON
    LOGIC = Default.LGF
    APPSET = <appset name>
    APP = MAIN
    DEBUG = OFF
    *END_BADI
    Thanks
    Krishna

  • How can you transfer files from an iMac with a bad logic board?

    This is in reference to my "Nothing but a blue screen at startup!" post. He took his iMac to an Apple authorized repair shop and he was told that the logic board was shot. He has decided to get a new iMac but he's wondering about all the photos and other files he has on the old hard drive. What are the ways that he can get files from the old hard drive on to his new one when he gets it? Thanks in advance for your help with this!
    Eric

    Hi Eric!
    roam's method is a very good one!
    I don't know if this will work because of the bad Logic Board, but another way, may be to use Firewire Target Disk Mode.
    The ailing iMac would have to be Firewire enabled, and you would need access to another Firewire Mac.
    Good Luck!
    ali b

  • Display problems, bad logic board?

    Hi I'm a first timer here! I have a iBook G4 14" 1.33ghz laptop I am fixing for someone. When it boots up, the screen looks like you are watching TV with old rabbit ears. You can make out the mac logo and what not, then the screen goes blue, like the basic blue background, and it looks perfect, then once the desktop comes up, it all fuzzy again. I've replaced the LCD screen, AND the lcd cable that connects to the logic board. Same results. I guess the last part would be the logic board to replace? Does anyone have any suggestions?
    Here are some links to the pictures to show you what is going on...
    http://www.tylersweb.net/mac/1.jpg
    http://www.tylersweb.net/mac/2.jpg
    http://www.tylersweb.net/mac/3.jpg

    inverter board controls brightness, the lines in your pics look more like the logic
    since you have a stick of RAM, try another module or maybe remove it if you have on-board RAM
    would be good to connect to the external display if the adapter is available - it would confirm bad logic board if the same lines are on the external display, it wont completely rule out the board though if there are no lines

  • Bad logic board VS starting as target drive!

    Hello,
    if someone has a bad logic board on a G5, can they boot the G5 as a target drive? witht the help of another computer? (not sure if the logic board
    Michel

    Hi, Michel. I suspect that whether or not Target Disk Mode works will depend on what the logic board's particular problem is. If it doesn't work, be sure to remind the user that removing the hard drive from the faulty Mac will allow her to extract any data she needs from it, by installing it in or connecting it to another Mac. In many models, removing a hard drive is easy.

  • How to find BADI Defination and Implemantation from Method of BADI?

    HI,
       can anyone tell me that how to find BADI Defination and Implemantation from Method of BADI?

    & Report  ZPJA_PM002 (V2)                                            &
    & Text Elements:                                                     &
    & P_DEVC Show user-exits from development class                      &
    & P_LIMIT Limit submit program selection                             &
    & P_FUNC Show function modules                                       &
    & P_SUBM Show submit programs                                        &
    & S01    Selection data (TCode takes precedence  over program name)  &
    report  zpja_pm002
      no standard page heading
      line-size 158.
    *tables: enlfdir.     "Additional Attributes for Function Modules
    data: tabix      like sy-tabix,
          w_linnum   type i,
          w_off      type i,
          w_index    like sy-tabix,
          w_include  like trdir-name,
          w_prog     like trdir-name,
          w_incl     like trdir-name,
          w_area     like rs38l-area,
          w_level,
          w_str(50)  type c,
          w_funcname like tfdir-funcname.
    constants: c_fmod(40) type c value 'Function modules selected: ',
               c_subm(40) type c value 'Submit programs selected: ',
               c_col1(12) type c value 'Enhanmt Type',
               c_col2(40) type c value 'Enhancement',
               c_col3(30) type c value 'Program/Include',
               c_col4(20) type c value 'Enhancement Name',
               c_col5(40) type c value 'Enhancement Description'.
    Work Areas: ABAP Workbench
    data: begin of wa_d010inc.
    data: master type d010inc-master.
    data: end of wa_d010inc.
    data: begin of wa_tfdir.
    data: funcname type tfdir-funcname,
          pname    type tfdir-pname,
          include  type tfdir-include.
    data: end of wa_tfdir.
    data: begin of wa_tadir.
    data: devclass type tadir-devclass.
    data: end of wa_tadir.
    data: begin of wa_tstc.
    data: pgmna type tstc-pgmna.
    data: end of wa_tstc.
    data: begin of wa_tstcp.
    data: param type tstcp-param.
    data: end of wa_tstcp.
    data: begin of wa_enlfdir.
    data: area type enlfdir-area.
    data: end of wa_enlfdir.
    Work Areas: BADIs
    data: begin of wa_sxs_attr.
    data: exit_name type sxs_attr-exit_name.
    data: end of wa_sxs_attr.
    data: begin of wa_sxs_attrt.
    data: text type sxs_attrt-text.
    data: end of wa_sxs_attrt.
    Work Areas: Enhancements
    data: begin of wa_modsap.
    data: member type modsap-member.
    data: end of wa_modsap.
    data: begin of wa_modsapa.
    data: name type modsapa-name.
    data: end of wa_modsapa.
    data: begin of wa_modsapt.
    data: modtext type modsapt-modtext.
    data: end of wa_modsapt.
    Work Areas: Business Transaction Events
    data: begin of wa_tbe01t.
    data: text1 type tbe01t-text1.
    data: end of wa_tbe01t.
    data: begin of wa_tps01t.
    data: text1 type tps01t-text1.
    data: end of wa_tps01t.
    user-exits
    types: begin of t_userexit,
          type(12) type c,
          pname    like trdir-name,
          txt(300),
          level    type c,
          modname(30) type c,
          modtext(40) type c,
    end of t_userexit.
    data: i_userexit type standard table of t_userexit with header line.
    Function module developmnet classes
    types: begin of t_devclass,
          clas   like trdir-clas,
    end of t_devclass.
    data: i_devclass type standard table of t_devclass with header line.
    Submit programs
    types: begin of t_submit,
          pname     like trdir-name,
          level,
          done,
    end of t_submit.
    data: i_submit type standard table of t_submit with header line.
    Source code
    types: begin of t_sourcetab,                        "#EC * (SLIN lügt!)
            line(200),                                  "#EC * (SLIN lügt!)
          end of t_sourcetab.                           "#EC * (SLIN lügt!)
    data: sourcetab type standard table of t_sourcetab with header line.
    data c_overflow(30000) type c.
    Description of an ABAP/4 source analysis token
    data: i_stoken type standard table of stokex with header line.
    data wa_stoken like i_stoken.
    Description of an ABAP/4 source analysis statement
    data: i_sstmnt type standard table of sstmnt with header line."#EC
    keywords for searching ABAP code
    types: begin of t_keywords,
          word(30),
    end of t_keywords.
    data: keywords type standard table of t_keywords with header line.
    function modules within program
    types: begin of t_fmodule,
          name   like rs38l-name,
          pname  like trdir-name,
          pname2 like trdir-name,
          level,
          bapi,
          done,
    end of t_fmodule.
    data: i_fmodule type standard table of t_fmodule with header line.
    & Selection Options                                                  &
    selection-screen begin of block selscr1 with frame title text-s01.
    parameter: p_pname like trdir-name memory id rid,
               p_tcode like syst-tcode,
               p_limit(4) type n default 100,
               p_devc  like rihea-dy_ofn default ' ',
               p_func  like rihea-dy_ofn default ' ',
               p_subm  like rihea-dy_ofn default ' '.
    selection-screen end of block selscr1.
    & START-OF-SELECTION                                                 &
    start-of-selection.
      if p_pname is initial and p_tcode is initial.
        message e008(hrfpm).  "Make entry on the selection screen
        stop.
      endif.
    ensure P_LIMIT is not zero.
      if p_limit = 0.
        p_limit = 1.
      endif.
      perform data_select.
      perform get_submit_data.
      perform get_fm_data.
      perform get_additional_data.
      perform data_display.
    & Form DATA_SELECT                                                   &
    form data_select.
    data selection message to sap gui
      call function 'SAPGUI_PROGRESS_INDICATOR'
        destination 'SAPGUI'
        keeping logical unit of work
        exporting
          text                  = 'Get programs/includes'       "#EC NOTEXT
        exceptions
          system_failure
          communication_failure
        .                                                       "#EC *
    determine search words
      keywords-word = 'CALL'.
      append keywords.
      keywords-word = 'FORM'.
      append keywords.
      keywords-word = 'PERFORM'.
      append keywords.
      keywords-word = 'SUBMIT'.
      append keywords.
      keywords-word = 'INCLUDE'.
      append keywords.
      if not p_tcode is initial.
    get program name from TCode
        select single pgmna from tstc into wa_tstc-pgmna
                     where tcode eq p_tcode.
        if not wa_tstc-pgmna is initial.
          p_pname = wa_tstc-pgmna.
    TCode does not include program name, but does have refereve TCode
        else.
          select single param from tstcp into wa_tstcp-param
                       where tcode eq p_tcode.
          if sy-subrc = 0.
            check wa_tstcp-param(1)   = '/'.
            check wa_tstcp-param+1(1) = '*'.
            if wa_tstcp-param ca ' '.
            endif.
            w_off = sy-fdpos + 1.
            subtract 2 from sy-fdpos.
            if sy-fdpos gt 0.
              p_tcode = wa_tstcp-param+2(sy-fdpos).
            endif.
            select single pgmna from tstc into wa_tstc-pgmna
                   where tcode eq p_tcode.
            p_pname = wa_tstc-pgmna.
            if sy-subrc <> 0.
              message e110(/saptrx/asc) with 'No program found for: '
    p_tcode."#EC NOTEXT
              stop.
            endif.
          else.
            message e110(/saptrx/asc) with 'No program found for: ' p_tcode.
    "#EC NOTEXT
            stop.
          endif.
        endif.
      endif.
    Call customer-function aus Program coding
      read report p_pname into sourcetab.
      if sy-subrc > 0.
        message e017(enhancement) with p_pname raising no_program."#EC *
      endif.
      scan abap-source sourcetab tokens     into i_stoken
                                 statements into i_sstmnt
                                 keywords   from keywords
                                 overflow into c_overflow
                                 with includes.
                                 WITH ANALYSIS.
      if sy-subrc > 0. "keine/syntakt. falsche Ablauflog./Fehler im Skanner
        message e130(enhancement) raising syntax_error.         "#EC *
      endif.
    check I_STOKEN for entries
      clear w_linnum.
      describe table i_stoken lines w_linnum.
      if w_linnum gt 0.
        w_level = '0'.
        w_prog = ''.
        w_incl = ''.
        perform data_search tables i_stoken using w_level w_prog w_incl.
      endif.
    endform.                        "DATA_SELECT
    & Form GET_FM_DATA                                                   &
    form get_fm_data.
    data selection message to sap gui
      call function 'SAPGUI_PROGRESS_INDICATOR'
        destination 'SAPGUI'
        keeping logical unit of work
        exporting
          text                  = 'Get function module data'    "#EC NOTEXT
        exceptions
          system_failure
          communication_failure
        .                                                       "#EC *
    Function module data
      sort i_fmodule by name.
      delete adjacent duplicates from i_fmodule comparing name.
      loop at i_fmodule where done  ne 'X'.
        clear:   i_stoken, i_sstmnt, sourcetab, wa_tfdir, w_include .
        refresh: i_stoken, i_sstmnt, sourcetab.
        clear wa_tfdir.
        select single funcname pname include from tfdir into wa_tfdir
                                where funcname = i_fmodule-name.
        check sy-subrc = 0.
        call function 'FUNCTION_INCLUDE_SPLIT'
          exporting
            program = wa_tfdir-pname
          importing
            group   = w_area.
        concatenate 'L' w_area 'U' wa_tfdir-include into w_include.
        i_fmodule-pname  = w_include.
        i_fmodule-pname2 = wa_tfdir-pname.
        modify i_fmodule.
        read report i_fmodule-pname into sourcetab.
        if sy-subrc = 0.
          scan abap-source sourcetab tokens     into i_stoken
                                     statements into i_sstmnt
                                     keywords   from keywords
                                     with includes.
          if sy-subrc > 0.
            message e130(enhancement) raising syntax_error.
          endif.
    check i_stoken for entries
          clear w_linnum.
          describe table i_stoken lines w_linnum.
          if w_linnum gt 0.
            w_level = '1'.
            w_prog  = i_fmodule-pname2.
            w_incl =  i_fmodule-pname.
            perform data_search tables i_stoken using w_level w_prog w_incl.
          endif.
        endif.
      endloop.
      if p_devc = 'X'.
        loop at i_fmodule.
          clear: wa_tadir, wa_enlfdir.
          select single area from enlfdir into wa_enlfdir-area
                                where funcname = i_fmodule-name.
          check not wa_enlfdir-area is initial.
          select single devclass into wa_tadir-devclass
                          from tadir where pgmid    = 'R3TR'
                                       and object   = 'FUGR'
                                       and obj_name = wa_enlfdir-area.
          check not wa_tadir-devclass is initial.
          move wa_tadir-devclass to i_devclass-clas.
          append i_devclass.
          i_fmodule-done = 'X'.
          modify i_fmodule.
        endloop.
        sort i_devclass.
        delete adjacent duplicates from i_devclass.
      endif.
    endform.                        "GET_FM_DATA
    & Form GET_SUBMIT_DATA                                               &
    form get_submit_data.
    data selection message to sap gui
      call function 'SAPGUI_PROGRESS_INDICATOR'
        destination 'SAPGUI'
        keeping logical unit of work
        exporting
          text                  = 'Get submit data'             "#EC NOTEXT
        exceptions
          system_failure
          communication_failure
        .                                                       "#EC *
      sort i_submit.
      delete adjacent duplicates from i_submit comparing pname.
      w_level = '0'.
      loop at i_submit where done ne 'X'.
        clear:   i_stoken, i_sstmnt, sourcetab.
        refresh: i_stoken, i_sstmnt, sourcetab.
        read report i_submit-pname into sourcetab.
        if sy-subrc = 0.
          scan abap-source sourcetab tokens     into i_stoken
                                     statements into i_sstmnt
                                     keywords   from keywords
                                     with includes.
          if sy-subrc > 0.
           message e130(enhancement) raising syntax_error.
            continue.
          endif.
    check i_stoken for entries
          clear w_linnum.
          describe table i_stoken lines w_linnum.
          if w_linnum gt 0.
            w_prog  = i_submit-pname.
            w_incl = ''.
            perform data_search tables i_stoken using w_level w_prog w_incl.
          endif.
        endif.
    restrict number of submit program selected for processing
        describe table i_submit lines w_linnum.
        if w_linnum ge p_limit.
          w_level = '1'.
        endif.
        i_submit-done = 'X'.
        modify i_submit.
      endloop.
    endform.                       "GET_SUBMIT_DATA
    & Form DATA_SEARCH                                                   &
    form data_search tables p_stoken structure stoken
                            using p_level p_prog p_incl.
      loop at p_stoken.
        clear i_userexit.
        tabix = sy-tabix + 1.
        i_userexit-level = p_level.
        if i_userexit-level = '0'.
          if p_incl is initial.
            i_userexit-pname = p_pname.
          else.
            concatenate  p_pname '/' p_incl into i_userexit-pname.
          endif.
        else.
          if p_incl is initial.
            i_userexit-pname = p_prog.
          else.
            concatenate  p_prog '/' p_incl into i_userexit-pname.
          endif.
        endif.
    Include
        if p_stoken-str eq 'INCLUDE'.
          check p_level eq '0'.    " do not perform for function modules
    *(2nd pass)
          w_index = sy-tabix + 1.
          read table p_stoken index w_index into wa_stoken.
          check not wa_stoken-str cs 'STRUCTURE'.
          check not wa_stoken-str cs 'SYMBOL'.
          read table i_submit with key pname = wa_stoken-str.
          if sy-subrc <> 0.
            i_submit-pname = wa_stoken-str.
            i_submit-level = p_level.
            append i_submit.
          endif.
        endif.
    Enhancements
        if p_stoken-str eq 'CUSTOMER-FUNCTION'.
          clear w_funcname.
          read table p_stoken index tabix.
          translate p_stoken-str using ''' '.
          condense p_stoken-str.
          if p_prog is initial.
            concatenate 'EXIT' p_pname p_stoken-str into w_funcname
                         separated by '_'.
          else.
            concatenate 'EXIT' p_prog p_stoken-str into w_funcname
                   separated by '_'.
          endif.
          select single member from modsap into wa_modsap-member
                where member = w_funcname.
          if sy-subrc = 0.   " check for valid enhancement
            i_userexit-type = 'Enhancement'.
            i_userexit-txt  = w_funcname.
            append i_userexit.
          else.
            clear wa_d010inc.
            select single master into wa_d010inc-master
                  from d010inc
                     where include = p_prog.
            concatenate 'EXIT' wa_d010inc-master p_stoken-str into
    w_funcname
                   separated by '_'.
            i_userexit-type = 'Enhancement'.
            i_userexit-txt  = w_funcname.
          endif.
        endif.
    BADIs
        if p_stoken-str cs 'cl_exithandler='.
          w_index = sy-tabix + 4.
          read table p_stoken index w_index into wa_stoken.
          i_userexit-txt = wa_stoken-str.
          replace all occurrences of '''' in i_userexit-txt with space.
          i_userexit-type = 'BADI'.
          append i_userexit.
        endif.
    Business transaction events
        if p_stoken-str cs 'OPEN_FI_PERFORM'.
          i_userexit-type = 'BusTrEvent'.
          i_userexit-txt = p_stoken-str.
          replace all occurrences of '''' in i_userexit-txt with space.
          i_userexit-modname =  i_userexit-txt+16(8).
          case i_userexit-txt+25(1).
            when 'E'.
              clear wa_tbe01t.
              select single text1 into wa_tbe01t-text1 from tbe01t
                               where event = i_userexit-txt+16(8)
                                 and spras = sy-langu.
              if wa_tbe01t-text1 is initial.
                i_userexit-modtext = ''.            "#EC NOTEXT
              else.
                i_userexit-modtext = wa_tbe01t-text1.
              endif.
              i_userexit-modname+8 = '/P&S'.                    "#EC NOTEXT
            when 'P'.
              clear wa_tps01t.
              select single text1 into wa_tps01t-text1 from tps01t
                               where procs = i_userexit-txt+16(8)
                                 and spras = sy-langu.
              i_userexit-modtext = wa_tps01t-text1.
              i_userexit-modname+8 = '/Process'.
          endcase.
          append i_userexit.
        endif.
    Program exits
        if p_stoken-str cs 'USEREXIT_'.
          i_userexit-type = 'Program Exit'.
          i_userexit-txt = p_stoken-str.
          replace all occurrences of '''' in i_userexit-txt with space.
          append i_userexit.
        endif.
    Submit programs
        if p_stoken-str cs 'SUBMIT'.
          check p_level eq '0'.    " do not perform for function modules
    *(2nd pass)
          check not p_stoken-str cs '_'.   " ensure not SUBMIT_XXX
          w_index = sy-tabix + 1.
          read table p_stoken index w_index into wa_stoken.
          check not wa_stoken-str cs '_'.   " ensure not SUBMIT_XXX
          replace all occurrences of '''' in wa_stoken-str with space.
          read table i_submit with key pname = wa_stoken-str.
          if sy-subrc <> 0.
            i_submit-pname = wa_stoken-str.
            i_submit-level = p_level.
            append i_submit.
          endif.
        endif.
    Perform routines (which reference external programs)
        if p_stoken-str cs 'PERFORM'.
          check p_level eq '0'.    " do not perform for function modules
    *(2nd pass)
          w_index = sy-tabix + 1.
          read table p_stoken index w_index into wa_stoken.
          if not wa_stoken-ovfl is initial.
            w_off = wa_stoken-off1 + 10.
            w_str = c_overflow+w_off(30).
            find ')' in w_str match offset w_off.
            w_off = w_off + 1.
            wa_stoken-str = w_str(w_off).
          endif.
          check wa_stoken-str cs '('.
          w_off = 0.
          while sy-subrc  = 0.
            if wa_stoken-str+w_off(1) eq '('.
              replace section offset w_off length 1 of wa_stoken-str with ''
              replace all occurrences of ')' in wa_stoken-str with space.
              read table i_submit with key pname = wa_stoken-str.
              if sy-subrc <> 0.
                i_submit-pname = wa_stoken-str.
                append i_submit.
              endif.
              exit.
            else.
              replace section offset w_off length 1 of wa_stoken-str with ''
              shift wa_stoken-str left deleting leading space.
            endif.
          endwhile.
        endif.
    Function modules
        if p_stoken-str cs 'FUNCTION'.
          clear i_fmodule.
          check p_level eq '0'.    " do not perform for function modules
    *(2nd pass)
          w_index = sy-tabix + 1.
          read table p_stoken index w_index into wa_stoken.
         if wa_stoken-str cs 'WF_'.
         if wa_stoken-str cs 'IF_'.
           break-point.
         endif.
          if wa_stoken-str cs 'BAPI'.
            i_fmodule-bapi = 'X'.
          endif.
          replace first occurrence of '''' in wa_stoken-str with space.
          replace first occurrence of '''' in wa_stoken-str with space.
          if sy-subrc = 4.   " didn't find 2nd quote (ie name truncated)
            clear wa_tfdir.
            concatenate wa_stoken-str '%' into wa_stoken-str.
            select single funcname into wa_tfdir-funcname from tfdir
                         where funcname like wa_stoken-str.
            if sy-subrc = 0.
              i_fmodule-name = wa_tfdir-funcname.
            else.
              continue.
            endif.
          else.
            i_fmodule-name = wa_stoken-str.
          endif.
          i_fmodule-level = p_level.
          append i_fmodule.
        endif.
      endloop.
    endform.                        "DATA_SEARCH
    & Form GET_ADDITIONAL_DATA                                           &
    form get_additional_data.
    data selection message to sap gui
      call function 'SAPGUI_PROGRESS_INDICATOR'
        destination 'SAPGUI'
        keeping logical unit of work
        exporting
          text                  = 'Get additional data'         "#EC NOTEXT
        exceptions
          system_failure
          communication_failure
        .                                                       "#EC *
      loop at i_userexit.
    Enhancement data
        if  i_userexit-type cs 'Enh'.
          clear: wa_modsapa.
          select single name into wa_modsapa-name from modsap
                            where member = i_userexit-txt.
          check sy-subrc = 0.
          i_userexit-modname = wa_modsapa-name.
          clear wa_modsapt.
          select single modtext into wa_modsapt-modtext from modsapt
                            where name = wa_modsapa-name
                                         and sprsl = sy-langu.
          i_userexit-modtext = wa_modsapt-modtext.
        endif.
    BADI data
        if  i_userexit-type eq 'BADI'.
          clear wa_sxs_attr.
          select single exit_name into wa_sxs_attr-exit_name from sxs_attr
                                        where exit_name = i_userexit-txt.
          if sy-subrc = 0.
            i_userexit-modname = i_userexit-txt.
          else.
            i_userexit-modname = 'Dynamic call'.                "#EC NOTEXT
          endif.
          clear wa_sxs_attrt.
          select single text into wa_sxs_attrt-text from sxs_attrt
                                         where exit_name =
    wa_sxs_attr-exit_name
                                           and sprsl = sy-langu.
          i_userexit-modtext = wa_sxs_attrt-text.
        endif.
        modify i_userexit.
      endloop.
    get enhancements via program package
      clear wa_tadir.
      select single devclass into wa_tadir-devclass from tadir
                                 where pgmid    = 'R3TR'
                                   and object   = 'PROG'
                                   and obj_name = p_pname.
      if sy-subrc = 0.
        clear: wa_modsapa, wa_modsapt.
        select name from modsapa into wa_modsapa-name
                              where devclass = wa_tadir-devclass.
          select single modtext from modsapt into wa_modsapt-modtext
                              where name = wa_modsapa-name
                                and sprsl = sy-langu.
          read table i_userexit with key modname = wa_modsapa-name.
          if sy-subrc <> 0.
            i_userexit-modtext = wa_modsapt-modtext.
            i_userexit-type = 'Enhancement'.                    "#EC NOTEXT
            i_userexit-modname  = wa_modsapa-name.
            i_userexit-txt = 'Determined from program DevClass'."#EC NOTEXT
            i_userexit-pname = 'Unknown'.                       "#EC NOTEXT
            append i_userexit.
          endif.
        endselect.
      endif.
    endform.                        "GET_ADDITIONAL_DATA
    & Form DATA_DISPLAY                                                  &
    form data_display.
    data selection message to sap gui
      call function 'SAPGUI_PROGRESS_INDICATOR'
        destination 'SAPGUI'
        keeping logical unit of work
        exporting
          text                  = 'Prepare screen for display'  "#EC NOTEXT
        exceptions
          system_failure
          communication_failure
        .                                                       "#EC *
      sort i_userexit by type txt modname.
      delete adjacent duplicates from i_userexit comparing txt modname.
    format headings
      write: 'Enhancements from main program'.                  "#EC NOTEXT
      write: /.
      uline.
      format color col_heading.
      write: /    sy-vline,
             (12) c_col1,                    "Enhanmt Type
                  sy-vline,
             (40) c_col2,                    "Enhancement
                  sy-vline,
             (30) c_col3,                    "Program/Include
                  sy-vline,
             (20) c_col4,                    "Enhancement name
                  sy-vline,
             (40) c_col5,                    "Enhancement description
                  sy-vline.
      format reset.
      uline.
    format lines
      loop at i_userexit.
    set line colour
        case i_userexit-type.
          when 'Enhancement'.
            format color 3 intensified off.
          when 'BADI'.
            format color 4 intensified off.
          when 'BusTrEvent'.
            format color 5 intensified off.
          when 'Program Exit'.
            format color 6 intensified off.
          when others.
            format reset.
        endcase.
        write: / sy-vline,
                 i_userexit-type,
                 sy-vline,
                 i_userexit-txt(40),
                 sy-vline,
                 i_userexit-pname(30),
                 sy-vline,
                 i_userexit-modname(20),
                 sy-vline,
                 i_userexit-modtext(40),
                 sy-vline.
      endloop.
      format reset.
      uline.
    user-exits from development class of function modules
      if p_devc = 'X'.
        write: /.
        write: / 'User-exits from function module development class'."#EC
    *NOTEXT
        write: 157''.
        uline (90).
        write: 157''.
        loop at i_devclass.
          clear wa_modsapa.
          select name from modsapa into wa_modsapa
                       where devclass = i_devclass-clas.
         select single name modtext into corresponding fields of wa_modsapt
                                       from modsapt
                                         where name  = wa_modsapa-name
                                           and sprsl = sy-langu.
            format color 3 intensified off.
            write: / sy-vline,
                     (12) 'Enhancement',
                     sy-vline,
                    wa_modsapa-name,
                    sy-vline,
                    wa_modsapt-modtext,
                    sy-vline.
          endselect.
        endloop.
        uline (90).
        format reset.
      endif.
      describe table i_fmodule lines w_linnum.
      write: / c_fmod , at 35 w_linnum.                         "#EC NOTEXT
      write: 157''.
      if p_func = 'X'.
    display fuction modules used in program
        uline (38).
        write: 157''.
        loop at i_fmodule.
          write: sy-vline,
                 i_fmodule-name,
                 sy-vline,
                 i_fmodule-bapi,
                 sy-vline.
          write: 157''.
        endloop.
        uline (38).
      endif.
      describe table i_submit lines w_linnum.
      write: / c_subm , at 35 w_linnum.                         "#EC NOTEXT
      write: 157''.
      if p_subm = 'X'.
    display submit programs used in program
        uline (44).
        write: 157''.
        loop at i_submit.
          write: sy-vline,
                 i_submit-pname,
                 sy-vline.
          write: 157''.
        endloop.
        uline (44).
      endif.
    issue message with number of user-exits displayed
      describe table i_userexit lines w_linnum.
      message s697(56) with w_linnum.
    endform.                        "DATA_DISPLAY
    reward points if it helps
    gunjan

  • Power Mac G5 DP1.8GHz - Bad Logic Board or Power Management Issue?

    I have a Power Mac G5 DP1.8GHz/1.5GB/80GB which I bought non-working. It has not yet been disassembled or examined by a certified tech. This is it's issue (which replicates): the computer powers on. It makes a single warning tone, then the LED flashed at least 15 times (too fast to count). Then the posting chord is heard. Hard drive spins up. Then nothing (no video). Won’t boot from any disk. I have changed the RAM and tested the RAM banks with known-to-be-good RAM from another DP1.8GHz G5. The warning tone stopped once or twice after this switch, but then it didn’t chime. I changed the PRAM battery, but not with as new one. However, after installing the used one and then resetting the PMU, it displayed video briefly for the first time. While installed in the other 1.8GHz G5, the hard drive was formatted, given a clean install of OS X 10.4.11, and then moved into this computer where is never mounts. The computer is not accessible through TDM.
    Do I have a bad logic board? Bad CPUs? A power managment issue? A RAM issue?

    Through my own trial and error troubleshooting, I have found the CPUs to be in good working order and the logic board passes the Apple Service Diagnostic every time. Despite the installation of numerous pairs of modules that worked in another DP1.8GHz, the computer has a RAM issue-it gives the "no good RAM" tone most of the time when it powers up (after a PMU reset it does not). Also the computer boots from disk or into Open Firmware but the disk utility can't see either hard drive so I may have a bad SATA controller.

  • I need help with my remove method on a BST!

    Guys I need some help here, I have to create a remove method for a BST and below is my code:
    public boolean remove(OrderedMap map, K keyOfelementToRemove) {
              boolean result = false;
              if (root == null)
                   result = false;
              else {
                   MapNode curr = root;
                   MapNode prev = root;
                   while (curr.key.equals(keyOfelementToRemove) == false) {
                        prev = curr;
                        if (keyOfelementToRemove.compareTo(curr.key) < 0)
                             curr = curr.left;
                        else if (keyOfelementToRemove.compareTo(curr.key) > 0)
                             curr = curr.right;
                        if (curr == null)
                             break;
                   if (curr == null)
                        return result;
                   else if (curr == root && curr.left == null)
                        root = root.right;
                   else if (curr.left == null) {
                        if (curr.right == null)
                             curr = null;
                        else if (curr == prev.left)
                             prev = curr.right;
                        else if (curr == prev.right){
                             prev = curr.right;
                   else if (curr.left != null) {
                        MapNode temp = curr.left;
                        while (temp.right != null)
                             temp = temp.right;
                        K change = temp.key;
                        temp = null;
                        curr.key = change;
              size--;
              return result;
         }the algorithm that my instructor provides is:
    private boolean remove( BinaryTreeNode t, Comparable elementToRemove )
    Set result to false
    Traverse the tree t until elementToRemove is found. Use curr and prev to find the element
    leaving curr referring the node you want to remove. It may be the case that curr is null indicating
    that elementToRemove was not found. Now there are four cases to consider :
    Case 1: Not found
    return result (false)
    Case 2: The root is to be removed, but it has no left child.
    root = root's right subtree (assuming root refers the the root node in your BST)
    Case 3: The node is further down tree with no left child. Now must adjust one of the parent's links
    if curr is on the left side of prev,
    move parent's left link down to down to curr's right child
    else
    curr is on the right side of prev, so move parent's right down to down to curr's right child
    Case 4: curr has a left child.
    We can no longer ignore the left subtree. So find the maximum in the left subtree and
    move that object to the node referenced by curr . Then eliminate the maximum in the
    left subtree, which is now being reference from the original node to remove.
    however for case 3 and 4 it doesn't work, can someone please tell me why? I don't know where I made a mistake and I tried finding it but I still dont know

    I am sorry about the double post. I'll try not to do this again. My problem here seems to be that prev and curr aren't updating the BST outside this method, which means that it only changes locally but not permanently. I will post the code of the other headings:
    public class OrderedMap<K extends Comparable<K>, V> {
         private class MapNode {
              // Links to other BSTs
              private MapNode left;
              private MapNode right;
              ArrayList<V> temp1 = new ArrayList<V>();
              // The references to the key/value pair of the mapping
              private K key;
              @SuppressWarnings("unused")
              private V value;
              public MapNode(K theKey, V theValue) {
                   key = theKey;
                   value = theValue;
                   left = null;
                   right = null;
         } // end class MapNode
         private MapNode root;
         private int size;
         public OrderedMap() { // Create an empty tree
              root = null;
              size = 0;
         public int size() {
              return size;
         }

  • Howto call the @Remove method of a stateful session bean after JSF page ...

    I use EJB3, JPA, JSF in my web application. There are 2 database tables: Teacher and Student. A teacher can have many (or none) students and a student can have at most 1 teacher.
    I have a JSF page to print the teacher info and all his students' info. I don't want to load the students' info eagerly because there's another JSF page I need to display the teacher info only. So I have a stateful session bean to retrieve the teacher info and all his students' info. The persistence context in that stateful session bean has the type of PersistenceContextType.EXTENDED. The reason I choose a stateful session bean and an extended persistence context is that I want to write something like this without facing the lazy initialization exception:
    <h:dataTable value="#{backingBean.teacher.students}" var="student">
        <h:outputText value="${student.name}"/>
    </h:dataTable>Because my session bean is stateful, I have a method with the @Remove annotation. This method is empty because I don't want to persist anything to the database.
    Now, my question is: How can I make the @Remove method of my stateful session bean be called automatically when my JSF page finishes being rendered?

    Philip Petersen wrote:
    I have a few questions concerning the EJB remove method.
    1) What is the purpose of calling the remove method on stateless session
    bean?There isn't one.
    >
    2) What action does the container take when this method is called?It checks that you were allowed to call remove (a security check) and then
    just returns.
    >
    3) What happens to the stateless session bean if you do not call the remove
    method?Nothing
    >
    4) Is it a good practice to call the remove method, or should the remove
    method be avoided in the case of stateless session beans?
    Personally, I never do it.
    -- Rob
    >
    >
    Thanks in advance for any insight that you may provide.
    Phil--
    AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
    by Michael Girdley, Rob Woollen, and Sandra Emerson
    http://learnWebLogic.com
    [att1.html]

  • Remove method of array

    Implement the following method in the class Project 11 to return a new array that contains all the elements of the array a not in b.
    Public static int [] remove (int[] a, int[] b)
    For example, if the array a is {5,3,2,7,1} and the array b is {8,2,5} the remove method should return the array {3,7,1}.
    Im having trouble getting it run correctly, and i think my problem is with the remove method that i made
    //heres my code
    public static void main(String[]args) {
    int [] first = {2,5,4,1,9};
    int [] second = {5,10,8,1};
    int duplicate =0;
    for (int i = 0; i < first.length; i++) {
                   for (int j =0; j < second.length; j++){
                        if (first[i] == second[j])
                             duplicate++;
                        remove(first, second);
    System.out.println(first);
    public static int [] remove(int[] a, int []b){
    for(int i = 0; i < a.length; i++) {
    if(a[i] == b) {
    int[] c = new int[a.length - 1];
    return c;
    return a;

    im having trouble with the remove method. im suppose to return a new array that contains all the elements of the array a not in b.
    Public static int [] remove (int[] a, int[] b)
    For example, if the array a is {5,3,2,7,1} and the array b is {8,2,5} the remove method should return the array {3,7,1}.
    //heres my code
    public static void main(String[]args) {
    int [] first = {2,5,4,1,9};
    int [] second = {5,10,8,1};
    int duplicate =0;
    for (int i = 0; i < first.length; i++) {
    for (int j =0; j < second.length; j++){
    if (first == second[j])
    duplicate++;
    remove(first, second);
    System.out.println(first);
    public static int [] remove(int[] a, int []b){
    for(int i = 0; i < a.length; i++) {
    if(a[i] == b) {
    int[] c = new int[a.length - 1];
    return c;
    return a;

  • Need help with a remove method..

    Hello. I'm getting started on a project here to implement a recursive remove method that will remove any number from a list. I was given a test that the method must pass, but I'm having some trouble getting started. This is my second interaction with the idea of recursion and it's a bit difficult for me.
    Here is the test I'm writing the method for:
    public void testRemove() {
              int element=0;
              boolean inList = false;
              for (int i = -10; i < 11; i++)list.insert(i);
              int numElements = list.length();
              list.remove(element);
              for (int e : list) {
                   if ( e == element ) inList = true;
              assertTrue(!inList && (list.length()==(numElements-1)));
              element = -10;
              inList = false;
              list.remove(element);
              for (int e : list) {
                   if ( e == element ) inList = true;
              assertTrue(!inList && (list.length()==(numElements-2)));
              element = 10;
              inList = false;
              list.remove(element);
              for (int e : list) {
                   if ( e == element ) inList = true;
              assertTrue(!inList && (list.length()==(numElements-3)));
              //does remove work when element's value greater than value of last item in list
              element = 20;
              inList = false;
              list.remove(element);
              for (int e : list) {
                   if ( e == element ) inList = true;
              assertTrue(!inList && (list.length()==(numElements-3)));
              //does remove work when element's value less than value of first item in list
              element = -20;
              inList = false;
              list.remove(element);
              for (int e : list) {
                   if ( e == element ) inList = true;
              assertTrue(!inList && (list.length()==(numElements-3)));
              System.out.printf("%s\n", "testRemove " + list.toString());
         }Now, clearly I need to test whether or not the number being removed is in the list (too low/too high), but I'm stuck trying to implement this.
    If anyone can give me any ideas or direction it would be greatly appreciated.

    Thanks for the quick reply, from what I had gathered and what you posted I'm starting to see where I need to go from here. I had gotten as far as if list is null return null, and the cod that you posted makes sense, but implementing it into the source code I already have will be troubling for me. The code as you presented it I have no trouble understanding, for example:
    if (list.data == data) return list.next;
    list.next=remove(list.next, data);Is clear to me, however I don't know how to implement that into my code. This is the code for the insert method:
         private Node<ElementType> insertp(Node<ElementType> list, ElementType element) {
              if ( (list == null) || ( element.compareTo(list.getElement() ) < 0 ) ) {
                   // test for insert at head or before current node
                   Node<ElementType> newNode = new Node<ElementType>(element, null);
                   newNode.setNext(list);
                   return newNode;
              else if (list.getNext() == null) { // list with one element
                   Node<ElementType> newNode = new Node<ElementType>(element, null);
                   list.setNext(newNode);         // element goes at end
              else if ( element.compareTo(list.getNext().getElement()) < 0 ) { // insert after list
                   Node<ElementType> newNode = new Node<ElementType>(element, list.getNext());
                   //newNode.setNext(list.getNext());
                   list.setNext(newNode);
              else {
                   insertp(list.getNext(), element); // find insertion point
              return list;
         }I'm still struggling to understand all of the code there. the element.compareTo() and everything. If you (or some one else) can explain to me what is going on with those methods, I may be able to implement it myself. Also, this may be of some use, these are the methods I have available to me:
    public class Node<E> {
      // Instance variables:
      private E element;
      private Node<E> next;
      /** Creates a node with null references to its element and next node. */
      public Node() {
        this(null, null);
      /** Creates a node with the given element and next node. */
      public Node(E e, Node<E> n) {
        element = e;
        next = n;
      // Accessor methods:
      public E getElement() {
        return element;
      public Node<E> getNext() {
        return next;
      // Modifier methods:
      public void setElement(E newElem) {
        element = newElem;
      public void setNext(Node<E> newNext) {
        next = newNext;
      public String toString() {
           return element.toString();
    }

  • Fatal error - bad logical partition 8 : enlarged logical partitions

    Hi,
    I am trying to install Arch after being an Ubuntu user for approximatley two years.
    I re-formatted my drive to create an ~20Gb space in an ext4 extended partition since my previous would not allow more than four primary partitions.
    I am trying to triple boot: Win XP, Ubuntu, and Arch.
    I had read that one swap space would work, however I seem to now have three!
    I partitioned ntfs for Win XP, then  Ubuntu root, Ubuntu Home, Swap (2Gb), then left ~20Gb for Arch.
    However the output from Gparted now states I have three swaps! I cannot install Arch due to the error message:
    'Fatal error - bad logical partition 8 : enlarged logical partitions overlap'
    Is there a way of resolving this without re-formatting everything again, since I have spend hours setting up Win XP and Ubuntu to how I want them.
    I only use Win XP to manage my ipod and use Ubuntu as my primary OS. However, I recently found that by setting up Arch will teach me a hell of a lot about Linux OS which is my goal.
    Thanks in advance!
    fdisk output:
    Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *        2048   112642047    56320000    7  HPFS/NTFS/exFAT
    /dev/sda2       112644094   976496639   431926273    5  Extended
    /dev/sda5       174086144   931846143   378880000   83  Linux
    /dev/sda6       931848192   935944191     2048000   82  Linux swap / Solaris
    /dev/sda7       935946240   976496639    20275200   83  Linux
    /dev/sda8       169897984   174079999     2091008   82  Linux swap / Solaris
    /dev/sda9       112644096   165707775    26531840   83  Linux
    /dev/sda10      165709824   169887743     2088960   82  Linux swap / Solaris

    Oh, ok then, that makes sense ... I don't know the reason to align partitions to cylinders but there must be a good reason, although even if they are not aligned it shouldn't be a big problem (at least gparted allows you to create unaligned partitions).
    Personally gparted is not my first choice when dealing with partitions, it already scared me _big time_ and even if linux doesn't complain about partitions not being in the order they are on disk some programs complain about that (and gparted does make a mess out of that) and even refuse to do anything before they fix that (partition magic for example, and I've never lost any data or even got scared when using it).
    Lately I have been doing it like this, create the partitions with cfdisk which leaves everything in a way no program complains, then I format the partitions with mkfs.whatever or I use gparted just to format the partitions, I've never had problems when doing things like that.
    The last time I've used gparted to resize partitions things went well but on another occasion it did make a huge mess out of the partition layout (there were ntfs partitions involved when it went wrong, and only ext3 when all went well) leaving me with a problem similar to what you have now, luckily testdisk came to the rescue but I reckon I was just lucky that time.
    I've learned my lesson, _always_ make backups or copy things to another disk, besides being probably faster (as gparted does a ton of checks) it is a lot safer and if you have really important stuff on your hard disk you can't afford to be relying on the chance of not loosing it in the process.

  • What happens if you don't define '@Remove' method for Stateful SessionBean?

    Hi,
    I'm new to ejb3.
    I've noticed that the spec doesn't force you to define a "@Remove" method on a stateful Session bean... which seemed a bit weird/dangerous to me...
    Would anyone please happen to know:
    1. Is there a special treatment for Staeful SB's that don't have "@Remove"? Like, for examle, will the container destroy the session automatically at some point (after each remove invocation ? After a fixed timeout ? etc).
    2. And what if the programmer defined '@Remove' but neglected to call it from the client ? Are there different rules ? Session timeout ?
    Thanks a lot !

    There are always ways in which the container can decide to remove a Stateful Session Bean(SFSB) that are completely independent of whether a client explicitly calls a remove method. The container can choose to remove a SFSB because it has timed out. The actual time out is typically configurable, much like HttpSession timeout. The container can also remove a SFSB due to a system exception generated from one of its methods.
    @Remove methods merely expose an application-specific way to force the removal of a SFSB. They are not required to be defined and even if defined are not required to be invoked.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for

  • Removing songs from itunes without removing them from ipod

    Is it possible to remove songs from iTunes without removing them from iPod? When I attempt to delete songs from iTunes I get a warning that they'll be deleted from iPod as well. I've got Manually manage music and videos checked under Options in the S

  • How do I assign a static IP address?

    I bought mSecure from mSeven Software for my iPhone. Had no problem assigning a static IP address to my old PC laptop, but now I've happily switched to Macbook Pro and I can't figure out how to get it done. Need this static IP address to sync my iPho

  • Do I need to get a firewall or anti-virus program for my new IMAC?

    I'm a new Mac user and have heard that firewall or anti-virus programs are unnecessary on Macs, but I'm wary anyway. If I chose to utilize such programs, what should I get? And, is it advisable to shut my system down each night?

  • Audio edit not working. Can't cross fade

    Suddenly when I attempt to select the end of one audio track and the beginning of the other, it does not become high lighted as usual and I can't apply a cross fade. I never had this problem before and it suddenly appeared. If I double click I get an

  • Is it required to deactivate an adobe after effect before formatting a computer??

    Is it required to deactivate an adobe after effect before formatting a computer?? because my adobe after effect is licence version & the windows suddenly cress & i need to format pc --so what i do-..in this case???